|
@@ -22,6 +22,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="one_2">
|
|
|
+ <text v-if="info.specs[0].price_name" class="money"><text>特价商品</text></text>
|
|
|
<text
|
|
|
class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
|
|
|
<text
|
|
@@ -141,7 +142,10 @@
|
|
|
</view>
|
|
|
<view class="r">
|
|
|
<view class="money">
|
|
|
- <text class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
|
|
|
+ <text v-if="specsInfo.price"
|
|
|
+ class="money_1"><text>特价¥</text>{{specsInfo.price}}</text>
|
|
|
+ <text v-if="!specsInfo.price"
|
|
|
+ class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
|
|
|
<text class="money_1"><text>¥</text>{{specsInfo.flow_money}}</text>
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
@@ -233,7 +237,8 @@
|
|
|
<swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
|
|
|
<swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
|
|
|
<view class="list_1">
|
|
|
- <image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFit"></image>
|
|
|
+ <image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url"
|
|
|
+ mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="name">
|
|
|
<text>{{item.name}}</text>
|
|
@@ -406,6 +411,15 @@
|
|
|
let specs = data.specs.sort((a, b) => {
|
|
|
return a.sell_money - b.sell_money
|
|
|
})
|
|
|
+ let act = data.act.find(i => i.type == '3')
|
|
|
+ if (act) {
|
|
|
+ for (let val of act.list) {
|
|
|
+ for (let [index, arr] of specs.entries()) {
|
|
|
+ if (index == 0) arr.price_name = val.price
|
|
|
+ if (val.spec == arr._id) arr.price = val.price
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
data.specs = specs;
|
|
|
that.$set(that, `info`, data);
|
|
|
// 查询规格
|