main
fanfan 10 months ago
parent fe753b116d
commit 47d650ef06
  1. 30
      pages/goods/detail.vue
  2. 13
      pages/goods/seckillDetail.vue

@ -49,10 +49,10 @@
v-else>{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}</text>
</view>
<view class="rightBox" v-if="isSeckill" style="background:unset;padding:unset;">
<text class="span" style="color: #ffffff;font-size: 45rpx;font-family: STXinwei;"
>限时抢购</text>
<text class="span" style="color: #ffffff;font-size: 45rpx;font-family: STXinwei;">限时抢购</text>
</view>
<view class="rest" v-if="isSeckill" style="display: inline-flex;color:#ffffff;font-size: 30rpx;margin-top: 5rpx;float: right;font-family: STXinwei;width: 300rpx;">
<view class="rest" v-if="isSeckill"
style="display: inline-flex;color:#ffffff;font-size: 30rpx;margin-top: 5rpx;float: right;font-family: STXinwei;width: 300rpx;">
<text style="margin-right: 20rpx;font-family: STXinwei;">距活动{{seckillText}}</text>
<u-count-down :timestamp="isBuy" format="HH:mm:ss" autoStart
@change="onChangeSeckillCutDownTime">
@ -684,9 +684,20 @@
})
.catch()
},
findItemById(items, id) {
return items.find(item => item.goods_id == id);
},
setPirce() {
console.log(this.$refs.setRange)
let item = this.findItemById(this.goods.skuList, this.goods.goods_id)
if (item) {
this.$refs.setRange.startTime = item.sec_start_time;
this.$refs.setRange.sec_hour = item.sec_hour
this.$refs.setRange.secondPrice = item.seckill_price
this.$refs.setRange.secondQuota = item.is_limit == 1 ? true : false
this.$refs.setRange.quotaNum = item.limit_times
}
this.$refs.setRange.afterSale = true;
},
//
getCartTotal() {
@ -970,8 +981,10 @@
info.content = info.content
.replace(/style=""/g, '')
.replace(/<img " src=/g, '<img src=')
.replace(/<img src=/g, '<img style="width: 100%; display:inline-block;height:auto" src=')
info.content=info.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
.replace(/<img src=/g,
'<img style="width: 100%; display:inline-block;height:auto" src=')
info.content = info.content.replace(/\<img/gi,
'<img style="max-width:100%;height:auto" ');
info.contentLink = that.getValueAfterSymbol(that.getLinksFromRichText(info
.content), 'client://')
info.isLink = that.containsLetterMix(info.contentLink, 'http') ? true : false
@ -1116,7 +1129,8 @@
page_title: that.goods.goods_name
})
if (res.data.url) {
let str = `型号:${that.goods.goods_name}\n前台价:¥${that.goods.goods_price_max}\n推广价:¥${that.goods.goods_price_min}\nSKU:${that.goods.goods_no}\n小程序链接:${res.data.url}`
let str =
`型号:${that.goods.goods_name}\n前台价:¥${that.goods.goods_price_max}\n推广价:¥${that.goods.goods_price_min}\nSKU:${that.goods.goods_no}\n小程序链接:${res.data.url}`
uni.setClipboardData({
data: str, // value
success: function() {
@ -1413,6 +1427,7 @@
align-items: center;
justify-content: center;
float: right;
image {
width: 38rpx;
height: 38rpx;
@ -2307,6 +2322,7 @@
text-align: center;
margin-right: 12rpx;
}
.detail-content {
overflow: hidden;
}

@ -595,9 +595,20 @@
})
.catch()
},
findItemById(items, id) {
return items.find(item => item.goods_id == id);
},
setPirce() {
console.log(this.$refs.setRange)
let item = this.findItemById(this.goods.skuList, this.goods.goods_id)
if (item) {
this.$refs.setRange.startTime = item.sec_start_time;
this.$refs.setRange.sec_hour = item.sec_hour
this.$refs.setRange.secondPrice = item.seckill_price
this.$refs.setRange.secondQuota = item.is_limit == 1 ? true : false
this.$refs.setRange.quotaNum = item.limit_times
}
this.$refs.setRange.afterSale = true;
},
//
getCartTotal() {

Loading…
Cancel
Save