|
@@ -40,142 +40,19 @@
|
|
<view v-if="!hasLogin" class="p-login tui-skeleton-fillet">
|
|
<view v-if="!hasLogin" class="p-login tui-skeleton-fillet">
|
|
<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="" v-if="userIdentity == 1">
|
|
|
|
- <view class="wrap-main-price">
|
|
|
|
- <view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
|
|
|
|
- <view class="p-active" v-if="product.actStatus == 1">
|
|
|
|
- <image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
|
|
|
|
- </view>
|
|
|
|
- <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 class="wrap-ladder" v-else>
|
|
|
|
- <view class="ladder-text">
|
|
|
|
- <text class="ladder-h1">说明:</text>
|
|
|
|
- <text class="ladder-p">本商品有以下优惠购物方案</text>
|
|
|
|
- </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 class="" v-if="userIdentity == 4">
|
|
|
|
- <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
|
|
|
|
- <text>未公开价格</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 2">
|
|
|
|
- <text>未公开价格</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-main-none" v-if="product.price1TextFlag == 2" @click.stop="goUpgradeApply">
|
|
|
|
- <text>上传营业执照升级为会员机构即可查看价格 >></text>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-main-price" v-else>
|
|
|
|
- <view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
|
|
|
|
- <view class="p-active" v-if="product.actStatus == 1">
|
|
|
|
- <image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
|
|
|
|
- </view>
|
|
|
|
- <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 class="wrap-ladder" v-else>
|
|
|
|
- <view class="ladder-text">
|
|
|
|
- <text class="ladder-h1">说明:</text>
|
|
|
|
- <text class="ladder-p">本商品有以下优惠购物方案</text>
|
|
|
|
- </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 class="" v-if="userIdentity == 2">
|
|
|
|
- <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
|
|
|
|
- <text>未公开价格</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-main-price" v-else>
|
|
|
|
- <view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
|
|
|
|
- <view class="p-active" v-if="product.actStatus == 1">
|
|
|
|
- <image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
|
|
|
|
- </view>
|
|
|
|
- <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 class="wrap-ladder" v-else>
|
|
|
|
- <view class="ladder-text">
|
|
|
|
- <text class="ladder-h1">说明:</text>
|
|
|
|
- <text class="ladder-p">本商品有以下优惠购物方案</text>
|
|
|
|
- </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 class="cm-price" v-else>
|
|
|
|
+ <cm-price v-if="isRequest"
|
|
|
|
+ :product="product"
|
|
|
|
+ :userIdentity="userIdentity"
|
|
|
|
+ :ladderPriceList="ladderPriceList"
|
|
|
|
+ :retailPrice="retailPrice"
|
|
|
|
+ :smallMoney="smallMoney"
|
|
|
|
+ :minBuyNumber="minBuyNumber"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="wrap-active" v-if="product.actStatus == 1">
|
|
|
|
- <text>活动时间:</text>
|
|
|
|
- <text>{{ product.beginTime }} ~ {{ product.endTime }}</text>
|
|
|
|
- </view>
|
|
|
|
- <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>
|
|
|
|
- <view class="wrap-label" v-if="goodsData.isNoneDisabled">
|
|
|
|
- <view class="isLower">此商品已{{disabledText}},请浏览以下推荐商品~</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-info">
|
|
|
|
- <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-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="wrap-seve" :class="goodsData.isNoneDisabled ? 'none' : ''">
|
|
|
|
- <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>
|
|
|
|
|
|
+ <view class="attributes">
|
|
|
|
+ <cm-attributes v-if="isRequest":product="product" :goodsData="goodsData" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -286,6 +163,8 @@
|
|
<script>
|
|
<script>
|
|
import { mapState,mapMutations } from 'vuex'
|
|
import { mapState,mapMutations } from 'vuex'
|
|
import headerPoduct from '@/components/cm-module/headerNavbar/header-poduct' //自定义导航
|
|
import headerPoduct from '@/components/cm-module/headerNavbar/header-poduct' //自定义导航
|
|
|
|
+ import cmPrice from "@/components/cm-module/productDetails/cm-price.vue" //价格显示
|
|
|
|
+ import cmAttributes from "@/components/cm-module/productDetails/cm-attributes.vue" //规格信息
|
|
import authorize from '@/common/config/authorize.js'
|
|
import authorize from '@/common/config/authorize.js'
|
|
import uniStars from '@/components/uni-stars/uni-stars.vue'
|
|
import uniStars from '@/components/uni-stars/uni-stars.vue'
|
|
import parser from "@/components/jyf-Parser/index" //富文本处理
|
|
import parser from "@/components/jyf-Parser/index" //富文本处理
|
|
@@ -296,7 +175,6 @@
|
|
import wxLogin from "@/common/config/wxLogin.js"
|
|
import wxLogin from "@/common/config/wxLogin.js"
|
|
import { queryProductDetils } from "@/api/product.js"
|
|
import { queryProductDetils } from "@/api/product.js"
|
|
import { shoppingAddCart } from "@/api/cart.js"
|
|
import { shoppingAddCart } from "@/api/cart.js"
|
|
-
|
|
|
|
var isPreviewImg;
|
|
var isPreviewImg;
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
@@ -305,7 +183,9 @@
|
|
tuiSkeleton,
|
|
tuiSkeleton,
|
|
supplierDetails,
|
|
supplierDetails,
|
|
recommend,
|
|
recommend,
|
|
- evaluate
|
|
|
|
|
|
+ evaluate,
|
|
|
|
+ cmPrice,
|
|
|
|
+ cmAttributes
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
@@ -315,6 +195,7 @@
|
|
mode:'round',
|
|
mode:'round',
|
|
specClass: '',//规格弹窗css类,控制开关动画
|
|
specClass: '',//规格弹窗css类,控制开关动画
|
|
isBtnType:'',
|
|
isBtnType:'',
|
|
|
|
+ isRequest:false,
|
|
current:0,
|
|
current:0,
|
|
isShareType:'',
|
|
isShareType:'',
|
|
isHeaderPoduct:false,
|
|
isHeaderPoduct:false,
|
|
@@ -329,7 +210,6 @@
|
|
isStock:false,
|
|
isStock:false,
|
|
disabled:false,
|
|
disabled:false,
|
|
isNoneDisabled:false,
|
|
isNoneDisabled:false,
|
|
- disabledText:'',
|
|
|
|
tabCurrentIndex:0,
|
|
tabCurrentIndex:0,
|
|
userID:'',
|
|
userID:'',
|
|
productID:0,
|
|
productID:0,
|
|
@@ -411,12 +291,12 @@
|
|
this.isNoneDisabled = true
|
|
this.isNoneDisabled = true
|
|
this.tabCurrentIndex = 2;// 页面显示是默认选中第一
|
|
this.tabCurrentIndex = 2;// 页面显示是默认选中第一
|
|
this.isRecommend = true
|
|
this.isRecommend = true
|
|
- this.disabledText = '下架'
|
|
|
|
|
|
+ this.goodsData.disabledText = '下架'
|
|
}else{
|
|
}else{
|
|
this.disabled = false
|
|
this.disabled = false
|
|
this.isNoneDisabled = false
|
|
this.isNoneDisabled = false
|
|
this.tabCurrentIndex = 0;// 页面显示是默认选中第三
|
|
this.tabCurrentIndex = 0;// 页面显示是默认选中第三
|
|
- this.disabledText = ''
|
|
|
|
|
|
+ this.goodsData.disabledText = ''
|
|
}
|
|
}
|
|
if(this.userIdentity == 4){
|
|
if(this.userIdentity == 4){
|
|
if(this.product.price1TextFlag == "2"){
|
|
if(this.product.price1TextFlag == "2"){
|
|
@@ -429,14 +309,14 @@
|
|
this.disabled = true
|
|
this.disabled = true
|
|
}
|
|
}
|
|
this.goodsData.disabled = this.disabled
|
|
this.goodsData.disabled = this.disabled
|
|
- console.log(this.goodsData.disabled)
|
|
|
|
this.goodsData.isNoneDisabled = this.isNoneDisabled
|
|
this.goodsData.isNoneDisabled = this.isNoneDisabled
|
|
if(this.product.validFlag =='3'){
|
|
if(this.product.validFlag =='3'){
|
|
- this.disabledText = '下架'
|
|
|
|
|
|
+ this.goodsData.disabledText = '下架'
|
|
}
|
|
}
|
|
if(this.stock == 0){
|
|
if(this.stock == 0){
|
|
- this.disabledText = '售罄'
|
|
|
|
|
|
+ this.goodsData.disabledText = '售罄'
|
|
}
|
|
}
|
|
|
|
+ this.isRequest = true
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000);
|
|
this.$util.msg(error.msg,2000);
|
|
})
|
|
})
|