下单须知

h5
fanfan 10 months ago
parent 96b84472f7
commit 56eb0e6e3a
  1. 51
      pages/goods/detail.vue
  2. 8
      pages/goods/seckillDetail.vue

@ -215,20 +215,15 @@
<text class="li" style="margin-right: 5rpx;">全程跟踪</text> <text class="li" style="margin-right: 5rpx;">全程跟踪</text>
</view> </view>
</view> </view>
<!-- <view class="chosed"> <view class="chosed" v-if="goods.remark">
<view class="title">须知</view> <view class="title">须知</view>
<view class="info"> <view class="info">
<view class="notice" :class="[!isToggle ? 'text-clamp' : 'text-ellipsis']"> <u-read-more :toggle="true" font-size='24' text-indent='0' show-height="200" open-text='收起' close-text='展开'>
请您在签收电视之前务必检查电视外包装完好无损并且通电正常点亮再签收如果有明显破损或者屏幕有明显运损或者通电后电视屏幕请您在签收电视之前务必检查电视外包装完好无损并且通电正常点亮再签收如果有明显破损或者屏幕有明显运损或者通电后电视屏幕请您在签收电视之前务必检查电视外包装完好无损并且通电正常点亮再签收如果有明显破损或者屏幕有明显运损或者通电后电视屏幕 <rich-text :nodes="goods.remark"></rich-text>
</u-read-more>
</view> </view>
<view class="moreKnow" @click="toggleItem()" v-if="hasMoreLines">
{{isToggle == false?'展开':'收起'}}
<u-icon v-if="isToggle == false" style="margin-left: 10rpx;" name="arrow-down"></u-icon>
<u-icon v-else style="margin-left: 10rpx;" name="arrow-up"></u-icon>
</view> </view>
</view> </view>
</view> -->
</view>
<!-- <view class="about"> <!-- <view class="about">
<view class="aboutHead"> <view class="aboutHead">
<view class="aboutSuggest"> <view class="aboutSuggest">
@ -558,8 +553,6 @@
district: '玄武区' district: '玄武区'
}, },
seckillCountTime: 0, seckillCountTime: 0,
isToggle: false,
hasMoreLines: false
} }
}, },
computed: { computed: {
@ -626,19 +619,6 @@
} }
}, },
methods: { methods: {
checkTextLines() {
const query = uni.createSelectorQuery().in(this);
query.select('.notice').boundingClientRect(data => {
if (data && data.height > 0) {
//
const lineHeight = 21; //
this.hasMoreLines = data.height / lineHeight > 3;
}
}).exec();
},
toggleItem() {
this.isToggle = !this.isToggle;
},
onLook(isLink, url) { onLook(isLink, url) {
if (isLink) { if (isLink) {
uni.navigateTo({ uni.navigateTo({
@ -1079,7 +1059,6 @@
} }
} }
} }
this.checkTextLines()
}) })
.catch() .catch()
}) })
@ -2464,26 +2443,4 @@
.detail-content { .detail-content {
overflow: hidden; overflow: hidden;
} }
.notice {
line-height: 21px;
}
.moreKnow {
width: 100%;
text-align: right;
font-size: 24rpx;
color: #B7B7B7
}
.text-clamp {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.text-ellipsis {
-webkit-line-clamp: none;
}
</style> </style>

@ -188,6 +188,14 @@
<text class="li" style="margin-right: 5rpx;">全程跟踪</text> <text class="li" style="margin-right: 5rpx;">全程跟踪</text>
</view> </view>
</view> </view>
<view class="chosed" v-if="goods.remark">
<view class="title">须知</view>
<view class="info">
<u-read-more :toggle="true" font-size='24' text-indent='0' show-height="200" open-text='收起' close-text='展开'>
<rich-text :nodes="goods.remark"></rich-text>
</u-read-more>
</view>
</view>
</view> </view>
<view class="detail-content" @click="onLook(goods.isLink,goods.contentLink)" v-if="goods.isLink" <view class="detail-content" @click="onLook(goods.isLink,goods.contentLink)" v-if="goods.isLink"
v-html="goods.content"></view> v-html="goods.content"></view>

Loading…
Cancel
Save