|
@@ -21,11 +21,11 @@
|
|
</uni-swiper-dot>
|
|
</uni-swiper-dot>
|
|
</view>
|
|
</view>
|
|
<view class="product-wrap clearfix">
|
|
<view class="product-wrap clearfix">
|
|
- <view class="wrap-top" :class="goodsData.disabled ? 'none' : ''">
|
|
|
|
|
|
+ <view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
|
|
<view class="p-title tui-skeleton-fillet">
|
|
<view class="p-title tui-skeleton-fillet">
|
|
{{product.name == undefined ? '' : product.name}}
|
|
{{product.name == undefined ? '' : product.name}}
|
|
</view>
|
|
</view>
|
|
- <view class="wrap-top-price" v-if="!goodsData.disabled">
|
|
|
|
|
|
+ <view class="wrap-top-price" v-if="!goodsData.isNoneDisabled">
|
|
<view v-if="!hasLogin" class="p-login grade tui-skeleton-fillet">
|
|
<view v-if="!hasLogin" class="p-login grade tui-skeleton-fillet">
|
|
<text class="p-no">价格:</text>
|
|
<text class="p-no">价格:</text>
|
|
<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
|
|
<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
|
|
@@ -34,31 +34,36 @@
|
|
<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
|
|
<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
|
|
</view>
|
|
</view>
|
|
<view class="wrap-main" v-else>
|
|
<view class="wrap-main" v-else>
|
|
- <view class="p-main" v-if="ladderPriceFlag == '0'">
|
|
|
|
- <view class="p-price tui-skeleton-fillet">
|
|
|
|
- <text class="txt sm">¥</text>
|
|
|
|
- <text class="txt big">{{retailPrice}}</text>
|
|
|
|
- <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="p-minBuy">
|
|
|
|
- 起订量:
|
|
|
|
- <text class="min-text">{{minBuyNumber}}</text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
|
|
|
|
+ <text>该商品尚未公开价格,请联系客服购买</text>
|
|
</view>
|
|
</view>
|
|
- <view class="wrap-ladder" v-else>
|
|
|
|
- <view class="ladder-text">
|
|
|
|
- <text class="ladder-h1">说明:</text>
|
|
|
|
- <text class="ladder-p">本商品有以下优惠购物方案</text>
|
|
|
|
|
|
+ <view class="wrap-main-price" v-else>
|
|
|
|
+ <view class="p-main" v-if="ladderPriceFlag == '0' || product.actFlag == 1">
|
|
|
|
+ <view class="p-price tui-skeleton-fillet">
|
|
|
|
+ <text class="txt sm">¥</text>
|
|
|
|
+ <text class="txt big">{{retailPrice}}</text>
|
|
|
|
+ <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="p-minBuy">
|
|
|
|
+ 起订量:
|
|
|
|
+ <text class="min-text">{{minBuyNumber}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="ladder-main tui-skeleton-fillet">
|
|
|
|
- <view class="ladder-left">
|
|
|
|
- <view class="ladder-b">起订量:</view>
|
|
|
|
- <view class="ladder-b">价格:</view>
|
|
|
|
|
|
+ <view class="wrap-ladder" v-else>
|
|
|
|
+ <view class="ladder-text">
|
|
|
|
+ <text class="ladder-h1">说明:</text>
|
|
|
|
+ <text class="ladder-p">本商品有以下优惠购物方案</text>
|
|
</view>
|
|
</view>
|
|
- <view class="ladder-right">
|
|
|
|
- <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
|
|
|
|
- <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
|
|
|
|
- <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
|
|
|
|
|
|
+ <view class="ladder-main tui-skeleton-fillet">
|
|
|
|
+ <view class="ladder-left">
|
|
|
|
+ <view class="ladder-b">起订量:</view>
|
|
|
|
+ <view class="ladder-b">价格:</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="ladder-right">
|
|
|
|
+ <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
|
|
|
|
+ <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
|
|
|
|
+ <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -69,16 +74,16 @@
|
|
<view class="wrap-label" v-if="product.tagsList.length>0">
|
|
<view class="wrap-label" v-if="product.tagsList.length>0">
|
|
<view class="label-a tui-skeleton-fillet" v-for="(label,index) in product.tagsList" :key="index">{{label}}</view>
|
|
<view class="label-a tui-skeleton-fillet" v-for="(label,index) in product.tagsList" :key="index">{{label}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="wrap-label" v-if="goodsData.disabled">
|
|
|
|
|
|
+ <view class="wrap-label" v-if="goodsData.isNoneDisabled">
|
|
<view class="isLower">此商品已{{disabledText}},请浏览以下推荐商品~</view>
|
|
<view class="isLower">此商品已{{disabledText}},请浏览以下推荐商品~</view>
|
|
</view>
|
|
</view>
|
|
<view class="wrap-info">
|
|
<view class="wrap-info">
|
|
- <view class="info-viewT" :class="goodsData.disabled ? 'none' : ''">
|
|
|
|
|
|
+ <view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''">
|
|
<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
|
|
<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
|
|
<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>
|
|
<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="wrap-seve" :class="goodsData.disabled ? 'none' : ''">
|
|
|
|
|
|
+ <view class="wrap-seve" :class="goodsData.isNoneDisabled ? 'none' : ''">
|
|
<text class="tui-skeleton-rect">服务:</text>
|
|
<text class="tui-skeleton-rect">服务:</text>
|
|
<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
|
|
<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
|
|
<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
|
|
<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
|
|
@@ -88,7 +93,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="product-details">
|
|
<view class="product-details">
|
|
<!-- 头部 -->
|
|
<!-- 头部 -->
|
|
- <view v-if="goodsData.disabled" class="navbar" :class="navbarFiexd"
|
|
|
|
|
|
+ <view v-if="goodsData.isNoneDisabled" class="navbar" :class="navbarFiexd"
|
|
:style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
|
|
:style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
|
|
<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === index+2 }" @click="tabClick(index+2)">
|
|
<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === index+2 }" @click="tabClick(index+2)">
|
|
<text class="line"></text>
|
|
<text class="line"></text>
|
|
@@ -232,6 +237,7 @@
|
|
isQuantity:false,
|
|
isQuantity:false,
|
|
isStock:false,
|
|
isStock:false,
|
|
disabled:false,
|
|
disabled:false,
|
|
|
|
+ isNoneDisabled:false,
|
|
disabledText:'',
|
|
disabledText:'',
|
|
tabCurrentIndex:0,
|
|
tabCurrentIndex:0,
|
|
userID:'',
|
|
userID:'',
|
|
@@ -294,19 +300,28 @@
|
|
}
|
|
}
|
|
//拆分金额并转千分位格式显示
|
|
//拆分金额并转千分位格式显示
|
|
this.retailPrice = this.product.retailPrice.toFixed(2);
|
|
this.retailPrice = this.product.retailPrice.toFixed(2);
|
|
|
|
+ //处理除阶梯价格以外的购买价格
|
|
|
|
+ // if(this.ladderPriceFlag == '0' || this.product.actFlag == 1){
|
|
this.buyRetailPrice = this.product.retailPrice;
|
|
this.buyRetailPrice = this.product.retailPrice;
|
|
|
|
+ // }
|
|
//处理下架商品和售罄商品
|
|
//处理下架商品和售罄商品
|
|
- if(this.product.validFlag =='3' || this.stock == 0){
|
|
|
|
|
|
+ if(this.product.validFlag =='3' || this.stock == 0 ){
|
|
this.disabled = true
|
|
this.disabled = true
|
|
|
|
+ this.isNoneDisabled = true
|
|
this.tabCurrentIndex = 2;// 页面显示是默认选中第一
|
|
this.tabCurrentIndex = 2;// 页面显示是默认选中第一
|
|
this.isRecommend = true
|
|
this.isRecommend = true
|
|
this.disabledText = '下架'
|
|
this.disabledText = '下架'
|
|
}else{
|
|
}else{
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.isNoneDisabled = false
|
|
this.tabCurrentIndex = 0;// 页面显示是默认选中第三
|
|
this.tabCurrentIndex = 0;// 页面显示是默认选中第三
|
|
this.disabledText = ''
|
|
this.disabledText = ''
|
|
}
|
|
}
|
|
|
|
+ if(this.product.price1TextFlag == 1){
|
|
|
|
+ this.disabled = true
|
|
|
|
+ }
|
|
this.goodsData.disabled = this.disabled
|
|
this.goodsData.disabled = this.disabled
|
|
|
|
+ this.goodsData.isNoneDisabled = this.isNoneDisabled
|
|
if(this.product.validFlag =='3'){
|
|
if(this.product.validFlag =='3'){
|
|
this.disabledText = '下架'
|
|
this.disabledText = '下架'
|
|
}
|
|
}
|
|
@@ -363,13 +378,7 @@
|
|
},
|
|
},
|
|
changeCountAdd(){//popup弹窗数量增加按钮
|
|
changeCountAdd(){//popup弹窗数量增加按钮
|
|
this.number++
|
|
this.number++
|
|
- if(this.ladderPriceFlag == '1'){
|
|
|
|
- this.ladderPriceList.forEach((item,index)=>{
|
|
|
|
- if(this.number>=item.buyNum){
|
|
|
|
- this.buyRetailPrice = item.buyPrice
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ this.processActivityPrice()
|
|
},
|
|
},
|
|
changeCountSub(){//popup弹窗数量减按钮
|
|
changeCountSub(){//popup弹窗数量减按钮
|
|
if(this.number<=this.minBuyNumber){
|
|
if(this.number<=this.minBuyNumber){
|
|
@@ -379,13 +388,7 @@
|
|
return
|
|
return
|
|
}else{
|
|
}else{
|
|
this.number--
|
|
this.number--
|
|
- if(this.ladderPriceFlag == '1'){
|
|
|
|
- this.ladderPriceList.forEach((item,index)=>{
|
|
|
|
- if(this.number>=item.buyNum){
|
|
|
|
- this.buyRetailPrice = item.buyPrice
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ this.processActivityPrice()
|
|
this.isQuantity =false
|
|
this.isQuantity =false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -398,6 +401,18 @@
|
|
this.number = this.minBuyNumber
|
|
this.number = this.minBuyNumber
|
|
}else{
|
|
}else{
|
|
this.number = e.detail.value
|
|
this.number = e.detail.value
|
|
|
|
+ this.processActivityPrice()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ processActivityPrice(){//单独处理活动价格和阶梯价格
|
|
|
|
+ if(this.ladderPriceFlag == '1' && this.product.actFlag == 1){
|
|
|
|
+ this.buyRetailPrice = this.product.retailPrice
|
|
|
|
+ }else{
|
|
|
|
+ this.ladderPriceList.forEach((item,index)=>{
|
|
|
|
+ if(this.number>=item.buyNum){
|
|
|
|
+ this.buyRetailPrice = item.buyPrice
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
showSpec(type) {//显示选择数量确认弹窗
|
|
showSpec(type) {//显示选择数量确认弹窗
|
|
@@ -424,7 +439,7 @@
|
|
let productStp ={
|
|
let productStp ={
|
|
allPrice:this.number*this.buyRetailPrice,
|
|
allPrice:this.number*this.buyRetailPrice,
|
|
allCount:this.number,
|
|
allCount:this.number,
|
|
- id:this.product.productID,
|
|
|
|
|
|
+ productID:this.product.productID,
|
|
productCount:this.number
|
|
productCount:this.number
|
|
}
|
|
}
|
|
this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
|
|
this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
|
|
@@ -436,7 +451,7 @@
|
|
console.log(this.number)
|
|
console.log(this.number)
|
|
shoppingAddCart({productID:this.productID,userID:this.userID,productCount:this.number}).then(response => {
|
|
shoppingAddCart({productID:this.productID,userID:this.userID,productCount:this.number}).then(response => {
|
|
this.specClass = 'hide';
|
|
this.specClass = 'hide';
|
|
- this.$util.msg(response.msg,1500,true,'success')
|
|
|
|
|
|
+ this.$util.msg('加入购物车成功',1500,true,'success')
|
|
this.isAnimation = true
|
|
this.isAnimation = true
|
|
setTimeout(() => {this.specClass = 'none'}, 200)
|
|
setTimeout(() => {this.specClass = 'none'}, 200)
|
|
setTimeout(() => {this.isAnimation = false},2000)
|
|
setTimeout(() => {this.isAnimation = false},2000)
|
|
@@ -588,6 +603,12 @@
|
|
margin-bottom: 16rpx;
|
|
margin-bottom: 16rpx;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ .wrap-main-pricenone{
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ color: #FF2A2A;
|
|
|
|
+ font-size: $font-size-28;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ }
|
|
.p-price{
|
|
.p-price{
|
|
height: 44rpx;
|
|
height: 44rpx;
|
|
line-height: 44rpx;
|
|
line-height: 44rpx;
|
|
@@ -780,6 +801,7 @@
|
|
background: #fff;
|
|
background: #fff;
|
|
z-index: 10;
|
|
z-index: 10;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ border-bottom: 1px solid #F8F8F8;
|
|
&.fixed{
|
|
&.fixed{
|
|
position: fixed;
|
|
position: fixed;
|
|
left: 0;
|
|
left: 0;
|