|
@@ -5,8 +5,7 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="one_1">
|
|
|
- <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
|
- indicator-active-color="#FB1438" :interval="3000" :duration="1000">
|
|
|
+ <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :interval="3000" :duration="1000">
|
|
|
<swiper-item class="list" v-for="(item,index) in info.goods.file" :key="index">
|
|
|
<image class="image" :src="item.url" mode="aspectFit">
|
|
|
</image>
|
|
@@ -14,8 +13,7 @@
|
|
|
</swiper>
|
|
|
<!-- 是否关注商品 -->
|
|
|
<view class="goodsColect">
|
|
|
- <text @tap="toGoodscolect"
|
|
|
- :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
|
|
|
+ <text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
|
|
|
</view>
|
|
|
<view class="acttags" v-if="info.goods.act_tags&&info.goods.act_tags.length>0">
|
|
|
<text v-for="i in info.goods.act_tags" :key="i">{{i.label}}</text>
|
|
@@ -27,10 +25,8 @@
|
|
|
<text class="money"><text>¥</text>{{infospecs.flow_money||0}}</text>
|
|
|
</view>
|
|
|
<view class="one_3" v-if="discount">
|
|
|
- <text v-if="discount.full_decrement" class="act"
|
|
|
- v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
|
|
|
- <text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold"
|
|
|
- :key="index">{{item}}</text>
|
|
|
+ <text v-if="discount.full_decrement" class="act" v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
|
|
|
+ <text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold" :key="index">{{item}}</text>
|
|
|
</view>
|
|
|
<view class="one_4">
|
|
|
<view class="name">
|
|
@@ -71,9 +67,7 @@
|
|
|
<view class="one_7">
|
|
|
<view class="one_7_1">
|
|
|
<view class="shop_1">
|
|
|
- <image class="image"
|
|
|
- :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''"
|
|
|
- mode="aspectFit"></image>
|
|
|
+ <image class="image" :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="shop_2">
|
|
|
<view class="name">{{info.shop.name}}</view>
|
|
@@ -112,8 +106,7 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
- <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft"
|
|
|
- @buttonClick="toNavright" />
|
|
|
+ <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft" @buttonClick="toNavright" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 跳转菜单 -->
|
|
@@ -121,8 +114,7 @@
|
|
|
<text @tap="toMenubar" class="iconfont icon-gengduo"></text>
|
|
|
</view>
|
|
|
<view class="bar_2" v-if="is_menu">
|
|
|
- <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'"
|
|
|
- @click="toPath(item)">
|
|
|
+ <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'" @click="toPath(item)">
|
|
|
<image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
|
|
|
<text class="name"> {{item.name}}</text>
|
|
|
</view>
|
|
@@ -140,16 +132,12 @@
|
|
|
<view class="one">
|
|
|
<view class="one_1">
|
|
|
<view class="l">
|
|
|
- <image class="image"
|
|
|
- :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url"
|
|
|
- mode="aspectFill" @tap="diaView"></image>
|
|
|
+ <image class="image" :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url" mode="aspectFill" @tap="diaView"></image>
|
|
|
</view>
|
|
|
<view class="r">
|
|
|
<view class="money">
|
|
|
- <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 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">
|
|
@@ -167,9 +155,7 @@
|
|
|
规格
|
|
|
</view>
|
|
|
<view class="one_2_2">
|
|
|
- <view
|
|
|
- :class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']"
|
|
|
- v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
|
|
|
+ <view :class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']" v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -179,8 +165,7 @@
|
|
|
<text>数量</text>
|
|
|
</view>
|
|
|
<view class="one_3_1">
|
|
|
- <uni-number-box v-model="buy_num" @change="toCount" :min="1"
|
|
|
- :max="specsInfo.num">
|
|
|
+ <uni-number-box v-model="buy_num" @change="toCount" :min="1" :max="specsInfo.num">
|
|
|
</uni-number-box>
|
|
|
</view>
|
|
|
<view class="one_3_1">
|
|
@@ -222,8 +207,7 @@
|
|
|
<view class="title_2" v-if="item.type=='2'">
|
|
|
<view class="specList" v-for="(tag,indexx) in item.list" :key="indexx">
|
|
|
<view class="name">规格:{{tag.spec_name}}</view>
|
|
|
- <view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs"
|
|
|
- @tap.stop="tags.type=='0' && getDetail(tags)">
|
|
|
+ <view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs" @tap.stop="tags.type=='0' && getDetail(tags)">
|
|
|
<view class="left">
|
|
|
<view class="goods">{{tags.goods_name}}{{tags.spec_name}}</view>
|
|
|
<view class="goods">{{tags.desc}}</view>
|
|
@@ -245,8 +229,7 @@
|
|
|
<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>
|
|
@@ -432,7 +415,7 @@
|
|
|
// 显示最低价格的规格信息,不考虑库存问题
|
|
|
if (data.specs && data.specs.length > 0) {
|
|
|
// 规格排序
|
|
|
- data.specs.sort(function(a, b) {
|
|
|
+ let indexSpecs = data.specs.sort(function(a, b) {
|
|
|
let i, j;
|
|
|
if (a.price) i = 'price'
|
|
|
else i = 'sell_money'
|
|
@@ -440,7 +423,7 @@
|
|
|
else j = 'sell_money'
|
|
|
return a[i] - b[j];
|
|
|
})
|
|
|
- that.$set(that, `infospecs`, data.specs[0])
|
|
|
+ that.$set(that, `infospecs`, indexSpecs[0])
|
|
|
}
|
|
|
that.$set(that, `info`, data);
|
|
|
// 优惠
|