|
@@ -29,7 +29,11 @@
|
|
|
<text
|
|
|
class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].flow_money:0}}</text>
|
|
|
</view>
|
|
|
- <view class="one_3">
|
|
|
+ <view class="one_3" v-if="discount">
|
|
|
+ <text v-if="discount.full_decrement" class="act">{{discount.full_decrement}}</text>
|
|
|
+ <text v-if="discount.full_fold" class="act">{{discount.full_fold}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="one_4">
|
|
|
<view class="name">
|
|
|
{{info.goods.name}}
|
|
|
</view>
|
|
@@ -41,7 +45,7 @@
|
|
|
<text>{{info.goods.send_time}}内发货</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_4" @tap="toActivity">
|
|
|
+ <view class="one_5" @tap="toActivity">
|
|
|
<view class="l">
|
|
|
<text>{{info.act.length>0?`活动`:`暂无活动`}}</text>
|
|
|
</view>
|
|
@@ -49,7 +53,7 @@
|
|
|
<text class="iconfont icon-jiantouyou"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_4" @tap="toSpec">
|
|
|
+ <view class="one_5" @tap="toSpec">
|
|
|
<view class="l">
|
|
|
选择规格
|
|
|
</view>
|
|
@@ -57,7 +61,7 @@
|
|
|
<text class="iconfont icon-jiantouyou"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_5" @tap="toEvaluate">
|
|
|
+ <view class="one_6" @tap="toEvaluate">
|
|
|
<view class="l">
|
|
|
<text>{{evaluate_num>0?`商品评价(${evaluate_num})`:`暂无评价`}}</text>
|
|
|
</view>
|
|
@@ -65,8 +69,8 @@
|
|
|
<text class="iconfont icon-jiantouyou"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_6">
|
|
|
- <view class="one_6_1">
|
|
|
+ <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:''"
|
|
@@ -77,7 +81,7 @@
|
|
|
<view class="num"><text>宝贝数:</text>{{info.shop.goods_num||0}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_6_2">
|
|
|
+ <view class="one_7_2">
|
|
|
<view class="score_1">
|
|
|
<text>商品:</text>
|
|
|
<text>{{info.shop.goods_score||5}}</text>
|
|
@@ -93,7 +97,7 @@
|
|
|
<text>{{info.shop.service_score||5}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_6_3">
|
|
|
+ <view class="one_7_3">
|
|
|
<view class="btn">
|
|
|
<button size="mini" @tap="toShop">进入店铺</button>
|
|
|
</view>
|
|
@@ -102,7 +106,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="one_7">
|
|
|
+ <view class="one_8">
|
|
|
<rich-text :nodes="info.goods.brief"></rich-text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -199,7 +203,7 @@
|
|
|
<view class="info_3" v-else-if="popupShow=='2'">
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="list" v-for="(item,index) in info.act" :key="index">
|
|
|
- <view class="list_1 textOver" @tap="toAct(item)">
|
|
|
+ <view class="list_1" @tap="toAct(item)">
|
|
|
<view class="title_1">
|
|
|
<view class="l">
|
|
|
<text>{{item.tag||'暂无'}}</text>{{item.act_time.title}}
|
|
@@ -208,11 +212,11 @@
|
|
|
<text class="iconfont icon-jiantouyou"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="title_2" v-if="item.type=='5'||item.type=='6'">
|
|
|
- <view class="text">{{item.text}}</view>
|
|
|
+ <view class="title_2">
|
|
|
+ <view class="text" v-if="item.type=='5'||item.type=='6'">{{item.text}}</view>
|
|
|
<view class="time">{{item.config.time_start}}-{{item.config.time_end}}</view>
|
|
|
</view>
|
|
|
- <view class="title_2" v-else-if="item.type=='2'">
|
|
|
+ <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"
|
|
@@ -271,6 +275,8 @@
|
|
|
evaluate_num: 2,
|
|
|
// 商品详情
|
|
|
info: {},
|
|
|
+ // 优惠
|
|
|
+ discount: {},
|
|
|
// 底部菜单
|
|
|
options: [ //
|
|
|
{
|
|
@@ -409,6 +415,7 @@
|
|
|
let data = res.data;
|
|
|
if (data.goods.brief) data.goods.brief = data.goods.brief.replace(/\<img/gi,
|
|
|
'<img class="rich-img"');
|
|
|
+ // 特价
|
|
|
let act = data.act.find(i => i.type == '3')
|
|
|
if (act) {
|
|
|
for (let val of act.list) {
|
|
@@ -417,6 +424,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 规格排序
|
|
|
var temp;
|
|
|
for (var i = 0; i < data.specs.length - 1; i++) { //确定轮数
|
|
|
for (var j = 0; j < data.specs.length - i - 1; j++) { //确定每次比较的次数
|
|
@@ -433,6 +441,12 @@
|
|
|
}
|
|
|
}
|
|
|
that.$set(that, `info`, data);
|
|
|
+ // 优惠
|
|
|
+ let discount;
|
|
|
+ discount = data.act.find(i => i.type == '5')
|
|
|
+ if (discount) that.$set(that.discount, `full_decrement`, discount.text);
|
|
|
+ discount = data.act.find(i => i.type == '6')
|
|
|
+ if (discount) that.$set(that.discount, `full_fold`, discount.text);
|
|
|
// 查询规格
|
|
|
that.searchSpecs(data.specs);
|
|
|
// 查询评价数
|
|
@@ -821,6 +835,18 @@
|
|
|
}
|
|
|
|
|
|
.one_3 {
|
|
|
+ padding: 0 0 0 1vw;
|
|
|
+
|
|
|
+ .act {
|
|
|
+ font-size: 12px;
|
|
|
+ border: 1px solid var(--fFB1Color);
|
|
|
+ margin: 0 1vw 0 0;
|
|
|
+ color: var(--fFB1Color);
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .one_4 {
|
|
|
border-bottom: 0.5vw solid var(--f9Color);
|
|
|
padding: 2vw;
|
|
|
|
|
@@ -846,7 +872,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .one_4 {
|
|
|
+ .one_5 {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
padding: 2vw;
|
|
@@ -854,7 +880,7 @@
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
- .one_5 {
|
|
|
+ .one_6 {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
padding: 2vw;
|
|
@@ -862,11 +888,11 @@
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
- .one_6 {
|
|
|
+ .one_7 {
|
|
|
padding: 2vw;
|
|
|
border-bottom: 0.5vw solid var(--f9Color);
|
|
|
|
|
|
- .one_6_1 {
|
|
|
+ .one_7_1 {
|
|
|
margin: 0 0 1vw 0;
|
|
|
display: flex;
|
|
|
|
|
@@ -901,7 +927,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .one_6_2 {
|
|
|
+ .one_7_2 {
|
|
|
margin: 0 0 2vw 0;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -923,7 +949,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .one_6_3 {
|
|
|
+ .one_7_3 {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
|
|
@@ -939,7 +965,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .one_7 {
|
|
|
+ .one_8 {
|
|
|
padding: 2vw;
|
|
|
|
|
|
.rich-img {
|
|
@@ -1228,7 +1254,6 @@
|
|
|
}
|
|
|
|
|
|
.giftList {
|
|
|
- width: 90vw;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
@@ -1239,12 +1264,8 @@
|
|
|
.left {
|
|
|
width: 85vw;
|
|
|
|
|
|
- .goods {
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
+ .num {
|
|
|
+ color: var(--fFB1Color);
|
|
|
}
|
|
|
}
|
|
|
}
|