|
@@ -59,34 +59,39 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="product-supplier" @click="goSupplier">
|
|
|
+ <text class="title">供应商信息</text>
|
|
|
+ <text class="name">{{shop.name}}</text>
|
|
|
+ <text class="iconfont icon-xiayibu"></text>
|
|
|
+ </view>
|
|
|
<view class="product-details">
|
|
|
<!-- 头部 -->
|
|
|
<view v-if="goodsData.isNoneDisabled" class="navbar" :class="navbarFiexd"
|
|
|
: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 === item.type }" @click="tabClick(index+2)">
|
|
|
<text class="line"></text>
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else class="navbar" :class="navbarFiexd"
|
|
|
:style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
|
|
|
- <view class="nav-item tui-skeleton-fillet" v-for="(item,index) in tabNavList" :key="index" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
|
|
|
+ <view class="nav-item tui-skeleton-fillet" v-for="(item,index) in tabNavList" :key="index" :class="{ current: tabCurrentIndex === item.type }" @click="tabClick(item.type,index)">
|
|
|
<text class="line"></text>
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 商品详情,供应商详情展示,相关推荐,评价-->
|
|
|
- <view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 0">
|
|
|
+ <view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 'details'">
|
|
|
<parser :html="html" :img-mode="widthFix"></parser>
|
|
|
</view>
|
|
|
- <view class="content sup" v-if="tabCurrentIndex === 1">
|
|
|
- <supplier-details :shop="shop"></supplier-details>
|
|
|
- </view>
|
|
|
- <view class="content hot" v-if="tabCurrentIndex === 2">
|
|
|
+ <view class="content hot" v-if="tabCurrentIndex === 'hot'">
|
|
|
<recommend :query-productid="product.productID" v-if="isRecommend"></recommend>
|
|
|
</view>
|
|
|
- <view class="content hot" v-if="tabCurrentIndex === 3">
|
|
|
- <evaluate :query-productid ="product.productID" v-if="isEvaluate"></evaluate>
|
|
|
+ <view class="content param" v-if="tabCurrentIndex === 'param'">
|
|
|
+ <cm-parameter :query-productid="product.productID" v-if="isRarameter"></cm-parameter>
|
|
|
+ </view>
|
|
|
+ <view class="content service" v-if="tabCurrentIndex === 'service'">
|
|
|
+ <cm-service :query-productid="product.productID" v-if="isService"></cm-service>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 底部按钮 -->
|
|
@@ -172,9 +177,9 @@
|
|
|
import uniStars from '@/components/uni-stars/uni-stars.vue'
|
|
|
import parser from "@/components/jyf-Parser/index" //富文本处理
|
|
|
import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
|
|
|
- import supplierDetails from "@/components/cm-module/productDetails/supplierDetails" //供应商详情
|
|
|
- import recommend from "@/components/cm-module/productDetails/recommend" //供应商详情
|
|
|
- import evaluate from "@/components/cm-module/productDetails/evaluate" //供应商详情
|
|
|
+ import recommend from "@/components/cm-module/productDetails/recommend" //相关推荐
|
|
|
+ import cmParameter from "@/components/cm-module/productDetails/cm-parameter" //相关参数
|
|
|
+ import cmService from "@/components/cm-module/productDetails/cm-service" //服务项目
|
|
|
import wxLogin from "@/common/config/wxLogin.js"
|
|
|
import { queryProductDetils } from "@/api/product.js"
|
|
|
import { shoppingAddCart } from "@/api/cart.js"
|
|
@@ -184,17 +189,22 @@
|
|
|
customP,
|
|
|
parser,
|
|
|
tuiSkeleton,
|
|
|
- supplierDetails,
|
|
|
recommend,
|
|
|
- evaluate,
|
|
|
cmPrice,
|
|
|
- cmAttributes
|
|
|
+ cmAttributes,
|
|
|
+ cmParameter,
|
|
|
+ cmService
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
html:'<div style="text-align: center;color:#333333;">暂无内容</div>',
|
|
|
- tabNavList:[{name:'商品详情'},{name:'供应商信息'},{name:'相关推荐'},{name:'评价'}],
|
|
|
- disabledTabNavList:[{name:'相关推荐'},{name:'评价'}],
|
|
|
+ tabNavList:[
|
|
|
+ {name:'商品详情',type:'details'},
|
|
|
+ {name:'相关参数',type:'param'},
|
|
|
+ {name:'服务项目',type:'service'},
|
|
|
+ {name:'相关推荐',type:'hot'},
|
|
|
+ ],
|
|
|
+ disabledTabNavList:[{name:'相关推荐'}],
|
|
|
mode:'round',
|
|
|
specClass: '',//规格弹窗css类,控制开关动画
|
|
|
isBtnType:'',
|
|
@@ -206,6 +216,8 @@
|
|
|
ladderPriceFlag:'',
|
|
|
ladderPriceList:'',
|
|
|
isRecommend:false,
|
|
|
+ isRarameter:true,
|
|
|
+ isService:false,
|
|
|
isEvaluate:false,
|
|
|
isAnimation:false,
|
|
|
skeletonShow:true,
|
|
@@ -213,7 +225,7 @@
|
|
|
isStock:false,
|
|
|
disabled:false,
|
|
|
isNoneDisabled:false,
|
|
|
- tabCurrentIndex:0,
|
|
|
+ tabCurrentIndex:'param',
|
|
|
userID:'',
|
|
|
productID:0,
|
|
|
userIdentity:'',//用户类型
|
|
@@ -293,13 +305,13 @@
|
|
|
if(this.product.validFlag =='3' || this.stock == 0 ){
|
|
|
this.disabled = true
|
|
|
this.isNoneDisabled = true
|
|
|
- this.tabCurrentIndex = 2;// 页面显示是默认选中第一
|
|
|
+ this.tabCurrentIndex = 'hot';// 页面显示是默认选中第一
|
|
|
this.isRecommend = true
|
|
|
this.goodsData.disabledText = '下架'
|
|
|
}else{
|
|
|
this.disabled = false
|
|
|
this.isNoneDisabled = false
|
|
|
- this.tabCurrentIndex = 0;// 页面显示是默认选中第三
|
|
|
+ this.tabCurrentIndex = 'details';// 页面显示是默认选中第三
|
|
|
this.goodsData.disabledText = ''
|
|
|
}
|
|
|
if(this.product.price1TextFlag == "1"){
|
|
@@ -338,18 +350,20 @@
|
|
|
longPressActions:''
|
|
|
})
|
|
|
},
|
|
|
- tabClick(index) {//商品详情&&供应商信息tab切换
|
|
|
- this.tabCurrentIndex = index;
|
|
|
- if(this.tabCurrentIndex == 2){
|
|
|
- this.isRecommend = true
|
|
|
- }
|
|
|
- if(this.tabCurrentIndex == 3){
|
|
|
- this.isEvaluate = true
|
|
|
+ tabClick(type,index) {//商品详情&&供应商信息tab切换
|
|
|
+ this.tabCurrentIndex = type;
|
|
|
+ switch(this.tabCurrentIndex){
|
|
|
+ case 'hot':
|
|
|
+ this.isRecommend = true
|
|
|
+ break;
|
|
|
+ case 'param':
|
|
|
+ this.isRarameter = true
|
|
|
+ break;
|
|
|
+ case 'service':
|
|
|
+ this.isService = true
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
- changeTab(e) {
|
|
|
- this.tabCurrentIndex = e.target.current;
|
|
|
- },
|
|
|
handleContact(e){//跳转小程序客服
|
|
|
|
|
|
},
|
|
@@ -486,6 +500,10 @@
|
|
|
getOptionFn(e){
|
|
|
this.isShareType = e.type
|
|
|
},
|
|
|
+ goSupplier(){
|
|
|
+ this.$api.setStorage('supplierInfo',this.shop)
|
|
|
+ this.$api.navigateTo('/pages/goods/supplier')
|
|
|
+ },
|
|
|
discard(){
|
|
|
//丢弃
|
|
|
}
|
|
@@ -868,6 +886,38 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .product-supplier{
|
|
|
+ width: 702rpx;
|
|
|
+ height: 88rpx;
|
|
|
+ padding: 0 24rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ position: relative;
|
|
|
+ .title{
|
|
|
+ line-height: 88rpx;
|
|
|
+ display: inline-block;
|
|
|
+ float: left;
|
|
|
+ font-size: $font-size-28;
|
|
|
+ color: $text-color;
|
|
|
+ }
|
|
|
+ .name{
|
|
|
+ line-height: 88rpx;
|
|
|
+ display: inline-block;
|
|
|
+ float: left;
|
|
|
+ font-size: $font-size-24;
|
|
|
+ color: #D0D0D0;
|
|
|
+ float: right;
|
|
|
+ padding-right: 48rpx;
|
|
|
+ }
|
|
|
+ .icon-xiayibu{
|
|
|
+ line-height: 88rpx;
|
|
|
+ display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ width: 48rpx;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
.product-details {
|
|
|
height: 100%;
|
|
|
background: #FFFFFF;
|