mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 00:49:49 +08:00
【新增】普通商品详情新增显示代理商价格体系,只有登陆后的代理商才会显示。
This commit is contained in:
@@ -124,6 +124,59 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!--代理价格体系-->
|
||||
<view class="coreshop-margin-left-8 coreshop-margin-right-8 coreshop-margin-top-12 coreshop-padding-8 coreshop-border-radius-9 coreshop-bg-white" v-if="userAgentGrade && userAgent">
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-font-sm coreshop-flex-direction-row">
|
||||
<view class="coreshop-basis-4">
|
||||
<text class="coreshop-text-black coreshop-font-weight-bold coreshop-font-15">代理价格</text>
|
||||
</view>
|
||||
<view class="coreshop-basis-6">
|
||||
<view class="coreshop-float-right">
|
||||
您的等级:{{userAgentGrade.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="agentProducts.length">
|
||||
<view class="goods-agent-box">
|
||||
<view class="goods-agent-line">
|
||||
<view class="name coreshop-line-height-34">
|
||||
<text>货品名称</text>
|
||||
</view>
|
||||
<view class="productPrice coreshop-line-height-34">
|
||||
<text>销售价</text>
|
||||
</view>
|
||||
<view class="agentGradePrice coreshop-line-height-34">
|
||||
<text>代理价</text>
|
||||
</view>
|
||||
<view class="profit coreshop-line-height-34">
|
||||
<text>利润</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-agent-line" v-for="(item, index) in agentProducts" :key="index">
|
||||
<view class="name coreshop-line-height-24 coreshop-padding-4">
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view class="productPrice coreshop-display-flex coreshop-align-center coreshop-justify-center">
|
||||
<text>{{item.productPrice}}</text>
|
||||
</view>
|
||||
<view class="agentGradePrice coreshop-display-flex coreshop-align-center coreshop-justify-center">
|
||||
<text>{{item.agentGradePrice}}</text>
|
||||
</view>
|
||||
<view class="profit coreshop-display-flex coreshop-align-center coreshop-justify-center">
|
||||
<text>{{ parseFloat(item.productPrice-item.agentGradePrice).toFixed(2)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-font-12 coreshop-line-height-34">
|
||||
注:此利润不为最终用户下单后利润,因为订单可能存在优惠。
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8" v-else>
|
||||
<text class="coreshop-text-gray coreshop-font-12">该商品暂未录入商品池价格</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--评论-->
|
||||
<view class="coreshop-margin-left-8 coreshop-margin-right-8 coreshop-margin-top-12 coreshop-padding-8 coreshop-border-radius-9 coreshop-bg-white">
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-font-sm coreshop-flex-direction-row">
|
||||
@@ -439,6 +492,9 @@
|
||||
service: [],
|
||||
},
|
||||
autoplay: true,
|
||||
userAgent: {},
|
||||
userAgentGrade: {},
|
||||
agentProducts: []
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -662,7 +718,24 @@
|
||||
_this.product = res.data.product;
|
||||
_this.goodsInfo = info;
|
||||
_this.goodsSkuInfo = res.data.skuList;
|
||||
|
||||
if (res.otherData.agentProducts) {
|
||||
for (var i = 0; i < res.otherData.agentProducts.length; i++) {
|
||||
for (var j = 0; j < res.data.skuList.sku_list.length; j++) {
|
||||
if (res.data.skuList.sku_list[j]._id == res.otherData.agentProducts[i].productId) {
|
||||
res.otherData.agentProducts[i].name = res.data.skuList.sku_list[j].sku_name_arr[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(res.otherData.agentProducts);
|
||||
_this.agentProducts = res.otherData.agentProducts;
|
||||
}
|
||||
if (res.otherData.userAgentGrade) {
|
||||
_this.userAgentGrade = res.otherData.userAgentGrade;
|
||||
}
|
||||
if (res.otherData.userAgent) {
|
||||
_this.userAgent = res.otherData.userAgent;
|
||||
}
|
||||
|
||||
//价格区间
|
||||
if (res.data.minPrice != res.data.maxPrice) {
|
||||
|
||||
@@ -359,6 +359,11 @@ view, text { box-sizing: border-box; }
|
||||
.coreshop-min-height-#{$i} { min-height: $i + px; }
|
||||
}
|
||||
|
||||
// 定义字体(px)单位
|
||||
@for $i from 0 through 100 {
|
||||
.coreshop-line-height-#{$i} { line-height: $i + px; }
|
||||
}
|
||||
|
||||
// 定义flex等分
|
||||
@for $i from 0 through 12 {
|
||||
.coreshop-flex-#{$i} { flex: $i; }
|
||||
|
||||
@@ -688,6 +688,18 @@ u-icon { line-height: 0; }
|
||||
.goods-param-line .name { background: #f3f3f3; border-right: 0.5px solid #c3c3c3; color: #616161; font-size: 12px; height: 34px; line-height: 34px; text-align: center; width: 95px; }
|
||||
.goods-param-line .value { color: #2f2f2f; font-size: 12px; padding-left: 12px; width: 215px; }
|
||||
|
||||
|
||||
/*代理价格表格*/
|
||||
.goods-agent-box { border: 0.5px solid #c3c3c3; border-radius: 0px; margin-top: 12rpx; }
|
||||
.goods-agent-line { border-bottom: 0.5px solid #c3c3c3; display: flex;
|
||||
.name { background: #f3f3f3; border-right: 0.5px solid #c3c3c3; color: #616161; font-size: 12px; text-align: center; width: 216px; }
|
||||
.productPrice { color: #2f2f2f; border-right: 0.5px solid #c3c3c3; font-size: 12px; width: 50px; text-align: center; }
|
||||
.agentGradePrice { color: #2f2f2f; border-right: 0.5px solid #c3c3c3; font-size: 12px; width: 50px; text-align: center; }
|
||||
.profit { color: #2f2f2f; font-size: 12px; width: 50px; text-align: center; }
|
||||
}
|
||||
.goods-agent-line:last-child { border-bottom: 0; }
|
||||
|
||||
|
||||
.line-70 { background: #c3c3c3; height: 1px; margin-top: 3px; width: 34.5px; }
|
||||
|
||||
/*购买按钮*/
|
||||
|
||||
@@ -688,6 +688,18 @@ u-icon { line-height: 0; }
|
||||
.goods-param-line .name { background: #f3f3f3; border-right: 0.5px solid #c3c3c3; color: #616161; font-size: 12px; height: 34px; line-height: 34px; text-align: center; width: 95px; }
|
||||
.goods-param-line .value { color: #2f2f2f; font-size: 12px; padding-left: 12px; width: 215px; }
|
||||
|
||||
|
||||
/*代理价格表格*/
|
||||
.goods-agent-box { border: 0.5px solid #c3c3c3; border-radius: 0px; margin-top: 12rpx; }
|
||||
.goods-agent-line { border-bottom: 0.5px solid #c3c3c3; display: flex;
|
||||
.name { background: #f3f3f3; border-right: 0.5px solid #c3c3c3; color: #616161; font-size: 12px; text-align: center; width: 216px;}
|
||||
.productPrice { color: #2f2f2f; border-right: 0.5px solid #c3c3c3; font-size: 12px; width: 50px; text-align: center; }
|
||||
.agentGradePrice { color: #2f2f2f; border-right: 0.5px solid #c3c3c3; font-size: 12px; width: 50px; text-align: center; }
|
||||
.profit { color: #2f2f2f; font-size: 12px; width: 50px; text-align: center; }
|
||||
}
|
||||
.goods-agent-line:last-child { border-bottom: 0; }
|
||||
|
||||
|
||||
.line-70 { background: #c3c3c3; height: 1px; margin-top: 3px; width: 34.5px; }
|
||||
|
||||
/*购买按钮*/
|
||||
|
||||
Reference in New Issue
Block a user