|
|
|
@ -2,18 +2,9 @@
|
|
|
|
<!-- 商品详情 -->
|
|
|
|
<!-- 商品详情 -->
|
|
|
|
<view class="container">
|
|
|
|
<view class="container">
|
|
|
|
<!-- 轮播图 -->
|
|
|
|
<!-- 轮播图 -->
|
|
|
|
<swiper
|
|
|
|
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :indicator-color="indicatorColor" :interval="interval"
|
|
|
|
:indicator-dots="indicatorDots"
|
|
|
|
:duration="duration" :indicator-active-color="indicatorActiveColor">
|
|
|
|
:autoplay="autoplay"
|
|
|
|
<block v-for="(item, index) in imgs" :key="index">
|
|
|
|
:indicator-color="indicatorColor"
|
|
|
|
|
|
|
|
:interval="interval"
|
|
|
|
|
|
|
|
:duration="duration"
|
|
|
|
|
|
|
|
:indicator-active-color="indicatorActiveColor"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<block
|
|
|
|
|
|
|
|
v-for="(item, index) in imgs"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<swiper-item>
|
|
|
|
<swiper-item>
|
|
|
|
<image :src="item" />
|
|
|
|
<image :src="item" />
|
|
|
|
</swiper-item>
|
|
|
|
</swiper-item>
|
|
|
|
@ -26,49 +17,42 @@
|
|
|
|
<view class="prod-tit">
|
|
|
|
<view class="prod-tit">
|
|
|
|
{{ prodName }}
|
|
|
|
{{ prodName }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="col" @tap="addOrCannelCollection">
|
|
|
|
class="col"
|
|
|
|
<image v-if="!isCollection" src="@/static/images/icon/prod-col.png" />
|
|
|
|
@tap="addOrCannelCollection"
|
|
|
|
<image v-if="isCollection" src="@/static/images/icon/prod-col-red.png" />
|
|
|
|
>
|
|
|
|
|
|
|
|
<image
|
|
|
|
|
|
|
|
v-if="!isCollection"
|
|
|
|
|
|
|
|
src="@/static/images/icon/prod-col.png"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<image
|
|
|
|
|
|
|
|
v-if="isCollection"
|
|
|
|
|
|
|
|
src="@/static/images/icon/prod-col-red.png"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
收藏
|
|
|
|
收藏
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="sales-p">
|
|
|
|
<view class="sales-p">
|
|
|
|
{{ brief }}
|
|
|
|
{{ brief }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="prod-price">
|
|
|
|
<view class="prod-price" v-if="productType ==0 || productType==1">
|
|
|
|
<text
|
|
|
|
<text v-if="defaultSku && defaultSku.price" class="price">
|
|
|
|
v-if="defaultSku && defaultSku.price"
|
|
|
|
|
|
|
|
class="price"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
¥
|
|
|
|
¥
|
|
|
|
<text class="price-num">
|
|
|
|
<text class="price-num">
|
|
|
|
{{ wxs.parsePrice(defaultSku.price)[0] }}
|
|
|
|
{{ wxs.parsePrice(defaultSku.price)[0] }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
.{{ wxs.parsePrice(defaultSku.price)[1] }}
|
|
|
|
.{{ wxs.parsePrice(defaultSku.price)[1] }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text
|
|
|
|
<text v-if="defaultSku && defaultSku.oriPrice" class="ori-price">
|
|
|
|
v-if="defaultSku && defaultSku.oriPrice"
|
|
|
|
|
|
|
|
class="ori-price"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
¥{{ wxs.parsePrice(defaultSku.oriPrice)[0] }}.{{ wxs.parsePrice(defaultSku.oriPrice)[1] }}
|
|
|
|
¥{{ wxs.parsePrice(defaultSku.oriPrice)[0] }}.{{ wxs.parsePrice(defaultSku.oriPrice)[1] }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text class="sales" />
|
|
|
|
<text class="sales" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="prod-price" v-if="productType ==2">
|
|
|
|
|
|
|
|
<text class="price">
|
|
|
|
|
|
|
|
<text class="price-num">
|
|
|
|
|
|
|
|
{{payScore }}
|
|
|
|
|
|
|
|
</text>
|
|
|
|
|
|
|
|
积分
|
|
|
|
|
|
|
|
</text>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<text class="sales" />
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 已选规格 -->
|
|
|
|
<!-- 已选规格 -->
|
|
|
|
<view
|
|
|
|
<view class="sku" @tap="showSku">
|
|
|
|
class="sku"
|
|
|
|
|
|
|
|
@tap="showSku"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="sku-tit">
|
|
|
|
<view class="sku-tit">
|
|
|
|
已选
|
|
|
|
已选
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -81,10 +65,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 评价 -->
|
|
|
|
<!-- 评价 -->
|
|
|
|
<view class="cmt-wrap">
|
|
|
|
<view class="cmt-wrap">
|
|
|
|
<view
|
|
|
|
<view class="cmt-tit" @tap="showComment">
|
|
|
|
class="cmt-tit"
|
|
|
|
|
|
|
|
@tap="showComment"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="cmt-t">
|
|
|
|
<view class="cmt-t">
|
|
|
|
评价
|
|
|
|
评价
|
|
|
|
<text class="cmt-good">
|
|
|
|
<text class="cmt-good">
|
|
|
|
@ -97,10 +78,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="cmt-cont">
|
|
|
|
<view class="cmt-cont">
|
|
|
|
<view
|
|
|
|
<view class="cmt-tag" @tap="showComment">
|
|
|
|
class="cmt-tag"
|
|
|
|
|
|
|
|
@tap="showComment"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text>全部({{ prodCommData.number }})</text>
|
|
|
|
<text>全部({{ prodCommData.number }})</text>
|
|
|
|
<text>好评({{ prodCommData.praiseNumber }})</text>
|
|
|
|
<text>好评({{ prodCommData.praiseNumber }})</text>
|
|
|
|
<text>中评({{ prodCommData.secondaryNumber }})</text>
|
|
|
|
<text>中评({{ prodCommData.secondaryNumber }})</text>
|
|
|
|
@ -108,20 +86,13 @@
|
|
|
|
<text>有图({{ prodCommData.picNumber }})</text>
|
|
|
|
<text>有图({{ prodCommData.picNumber }})</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="cmt-items">
|
|
|
|
<view class="cmt-items">
|
|
|
|
<view
|
|
|
|
<view v-for="(item, index) in littleCommPage" :key="index" class="cmt-item">
|
|
|
|
v-for="(item, index) in littleCommPage"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
class="cmt-item"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="cmt-user">
|
|
|
|
<view class="cmt-user">
|
|
|
|
<text class="date">
|
|
|
|
<text class="date">
|
|
|
|
{{ item.recTime }}
|
|
|
|
{{ item.recTime }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<view class="cmt-user-info">
|
|
|
|
<view class="cmt-user-info">
|
|
|
|
<image
|
|
|
|
<image class="user-img" :src="item.pic" />
|
|
|
|
class="user-img"
|
|
|
|
|
|
|
|
:src="item.pic"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<view class="nickname">
|
|
|
|
<view class="nickname">
|
|
|
|
{{ item.nickName }}
|
|
|
|
{{ item.nickName }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -130,23 +101,12 @@
|
|
|
|
<view class="cmt-cnt">
|
|
|
|
<view class="cmt-cnt">
|
|
|
|
{{ item.content }}
|
|
|
|
{{ item.content }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<scroll-view
|
|
|
|
<scroll-view v-if="item.pics.length" class="cmt-attr" scroll-x="true">
|
|
|
|
v-if="item.pics.length"
|
|
|
|
<image v-for="(commPic, index2) in item.pics" :key="index2" :src="commPic" />
|
|
|
|
class="cmt-attr"
|
|
|
|
|
|
|
|
scroll-x="true"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<image
|
|
|
|
|
|
|
|
v-for="(commPic, index2) in item.pics"
|
|
|
|
|
|
|
|
:key="index2"
|
|
|
|
|
|
|
|
:src="commPic"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</scroll-view>
|
|
|
|
</scroll-view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view v-if="prodCommPage.records.length > 2" class="cmt-more-v">
|
|
|
|
v-if="prodCommPage.records.length > 2"
|
|
|
|
|
|
|
|
class="cmt-more-v"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text @tap="showComment">
|
|
|
|
<text @tap="showComment">
|
|
|
|
查看全部评价
|
|
|
|
查看全部评价
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
@ -163,98 +123,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部按钮 -->
|
|
|
|
<!-- 底部按钮 -->
|
|
|
|
<view class="cart-footer">
|
|
|
|
<view class="cart-footer">
|
|
|
|
<view
|
|
|
|
<view class="btn icon" @tap="toHomePage">
|
|
|
|
class="btn icon"
|
|
|
|
|
|
|
|
@tap="toHomePage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<image src="@/static/images/tabbar/homepage.png" />
|
|
|
|
<image src="@/static/images/tabbar/homepage.png" />
|
|
|
|
首页
|
|
|
|
首页
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="btn icon" @tap="toCartPage">
|
|
|
|
class="btn icon"
|
|
|
|
|
|
|
|
@tap="toCartPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<image src="@/static/images/tabbar/basket.png" />
|
|
|
|
<image src="@/static/images/tabbar/basket.png" />
|
|
|
|
购物车
|
|
|
|
购物车
|
|
|
|
<view
|
|
|
|
<view v-if="totalCartNum>0" class="badge badge-1">
|
|
|
|
v-if="totalCartNum>0"
|
|
|
|
|
|
|
|
class="badge badge-1"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ totalCartNum }}
|
|
|
|
{{ totalCartNum }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="btn cart" @tap="showSku">
|
|
|
|
class="btn cart"
|
|
|
|
|
|
|
|
@tap="showSku"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text>加入购物车</text>
|
|
|
|
<text>加入购物车</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="btn buy" @tap="showSku">
|
|
|
|
class="btn buy"
|
|
|
|
|
|
|
|
@tap="showSku"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text>立即购买</text>
|
|
|
|
<text>立即购买</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- end 底部按钮 -->
|
|
|
|
<!-- end 底部按钮 -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 规格弹窗 -->
|
|
|
|
<!-- 规格弹窗 -->
|
|
|
|
<view
|
|
|
|
<view v-if="skuShow" class="pup-sku">
|
|
|
|
v-if="skuShow"
|
|
|
|
|
|
|
|
class="pup-sku"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="pup-sku-main">
|
|
|
|
<view class="pup-sku-main">
|
|
|
|
<view class="pup-sku-header">
|
|
|
|
<view class="pup-sku-header">
|
|
|
|
<image
|
|
|
|
<image class="pup-sku-img" :src="defaultSku.pic?defaultSku.pic:pic" />
|
|
|
|
class="pup-sku-img"
|
|
|
|
<view class="pup-sku-price" v-if="productType != 2">
|
|
|
|
:src="defaultSku.pic?defaultSku.pic:pic"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<view class="pup-sku-price">
|
|
|
|
|
|
|
|
¥
|
|
|
|
¥
|
|
|
|
<text
|
|
|
|
<text v-if="defaultSku && defaultSku.price" class="pup-sku-price-int">
|
|
|
|
v-if="defaultSku && defaultSku.price"
|
|
|
|
|
|
|
|
class="pup-sku-price-int"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ wxs.parsePrice(defaultSku.price)[0] }}
|
|
|
|
{{ wxs.parsePrice(defaultSku.price)[0] }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
.{{ wxs.parsePrice(defaultSku.price)[1] }}
|
|
|
|
.{{ wxs.parsePrice(defaultSku.price)[1] }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="pup-sku-price" v-if="productType == 2">
|
|
|
|
|
|
|
|
<text v-if="defaultSku && defaultSku.price" class="pup-sku-price-int">
|
|
|
|
|
|
|
|
{{payScore}}
|
|
|
|
|
|
|
|
</text>
|
|
|
|
|
|
|
|
积分
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="pup-sku-prop">
|
|
|
|
<view class="pup-sku-prop">
|
|
|
|
<text>已选</text>
|
|
|
|
<text>已选</text>
|
|
|
|
{{ selectedProp.length > 0 ? selectedProp + ',' : '' }}{{ prodNum }}件
|
|
|
|
{{ selectedProp.length > 0 ? selectedProp + ',' : '' }}{{ prodNum }}件
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="close" @tap="closePopup" />
|
|
|
|
class="close"
|
|
|
|
|
|
|
|
@tap="closePopup"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="pup-sku-body">
|
|
|
|
<view class="pup-sku-body">
|
|
|
|
<view class="pup-sku-area">
|
|
|
|
<view class="pup-sku-area">
|
|
|
|
<view
|
|
|
|
<view v-if="skuList.length" class="sku-box">
|
|
|
|
v-if="skuList.length"
|
|
|
|
<block v-for="(skuGroupItem, skuGroupItemIndex) in skuGroupList" :key="skuGroupItemIndex">
|
|
|
|
class="sku-box"
|
|
|
|
<view v-for="(skuLine, key) in skuGroupItem" :key="key" class="items sku-text">
|
|
|
|
>
|
|
|
|
|
|
|
|
<block
|
|
|
|
|
|
|
|
v-for="(skuGroupItem, skuGroupItemIndex) in skuGroupList"
|
|
|
|
|
|
|
|
:key="skuGroupItemIndex"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view
|
|
|
|
|
|
|
|
v-for="(skuLine, key) in skuGroupItem"
|
|
|
|
|
|
|
|
:key="key"
|
|
|
|
|
|
|
|
class="items sku-text"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text class="sku-kind">
|
|
|
|
<text class="sku-kind">
|
|
|
|
{{ key }}
|
|
|
|
{{ key }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<view class="con">
|
|
|
|
<view class="con">
|
|
|
|
<text
|
|
|
|
<text v-for="skuLineItem in skuLine" :key="skuLineItem" class="sku-choose-item"
|
|
|
|
v-for="skuLineItem in skuLine"
|
|
|
|
|
|
|
|
:key="skuLineItem"
|
|
|
|
|
|
|
|
class="sku-choose-item"
|
|
|
|
|
|
|
|
:class="[selectedPropList.indexOf(key + ':' + skuLineItem) !== -1?'active':'',
|
|
|
|
:class="[selectedPropList.indexOf(key + ':' + skuLineItem) !== -1?'active':'',
|
|
|
|
isSkuLineItemNotOptional(allProperties,selectedPropObj,key,skuLineItem,propKeys)? 'dashed' : '']"
|
|
|
|
isSkuLineItemNotOptional(allProperties,selectedPropObj,key,skuLineItem,propKeys)? 'dashed' : '']" @click="toChooseItem(skuGroupItemIndex, skuLineItem, key)">
|
|
|
|
@click="toChooseItem(skuGroupItemIndex, skuLineItem, key)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ skuLineItem }}
|
|
|
|
{{ skuLineItem }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -264,23 +188,13 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="pup-sku-count">
|
|
|
|
<view class="pup-sku-count">
|
|
|
|
<view class="num-wrap">
|
|
|
|
<view class="num-wrap">
|
|
|
|
<view
|
|
|
|
<view class="minus" @tap="onCountMinus">
|
|
|
|
class="minus"
|
|
|
|
|
|
|
|
@tap="onCountMinus"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text class="row" />
|
|
|
|
<text class="row" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="text-wrap">
|
|
|
|
<view class="text-wrap">
|
|
|
|
<input
|
|
|
|
<input type="number" :value="prodNum" disabled>
|
|
|
|
type="number"
|
|
|
|
</view>
|
|
|
|
:value="prodNum"
|
|
|
|
<view class="plus" @tap="onCountPlus">
|
|
|
|
disabled
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view
|
|
|
|
|
|
|
|
class="plus"
|
|
|
|
|
|
|
|
@tap="onCountPlus"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text class="row" />
|
|
|
|
<text class="row" />
|
|
|
|
<text class="col" />
|
|
|
|
<text class="col" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -291,16 +205,10 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="pup-sku-footer">
|
|
|
|
<view class="pup-sku-footer">
|
|
|
|
<view
|
|
|
|
<view class="btn cart" @tap="addToCart">
|
|
|
|
class="btn cart"
|
|
|
|
|
|
|
|
@tap="addToCart"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
加入购物车
|
|
|
|
加入购物车
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="btn buy" @tap="buyNow">
|
|
|
|
class="btn buy"
|
|
|
|
|
|
|
|
@tap="buyNow"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
立即购买
|
|
|
|
立即购买
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -308,10 +216,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 评价弹窗 -->
|
|
|
|
<!-- 评价弹窗 -->
|
|
|
|
<view
|
|
|
|
<view v-if="commentShow" class="cmt-popup">
|
|
|
|
v-if="commentShow"
|
|
|
|
|
|
|
|
class="cmt-popup"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="cmt-tit">
|
|
|
|
<view class="cmt-tit">
|
|
|
|
<view class="cmt-t">
|
|
|
|
<view class="cmt-t">
|
|
|
|
商品评价
|
|
|
|
商品评价
|
|
|
|
@ -319,65 +224,35 @@
|
|
|
|
好评度{{ prodCommData.positiveRating }}%
|
|
|
|
好评度{{ prodCommData.positiveRating }}%
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<text
|
|
|
|
<text class="close" @tap="closePopup" />
|
|
|
|
class="close"
|
|
|
|
|
|
|
|
@tap="closePopup"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="cmt-cont">
|
|
|
|
<view class="cmt-cont">
|
|
|
|
<view class="cmt-tag">
|
|
|
|
<view class="cmt-tag">
|
|
|
|
<text
|
|
|
|
<text data-evaluate="-1" :class="evaluate==-1?'selected':''" @tap="getProdCommPage">
|
|
|
|
data-evaluate="-1"
|
|
|
|
|
|
|
|
:class="evaluate==-1?'selected':''"
|
|
|
|
|
|
|
|
@tap="getProdCommPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
全部({{ prodCommData.number }})
|
|
|
|
全部({{ prodCommData.number }})
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text
|
|
|
|
<text data-evaluate="0" :class="evaluate==0?'selected':''" @tap="getProdCommPage">
|
|
|
|
data-evaluate="0"
|
|
|
|
|
|
|
|
:class="evaluate==0?'selected':''"
|
|
|
|
|
|
|
|
@tap="getProdCommPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
好评({{ prodCommData.praiseNumber }})
|
|
|
|
好评({{ prodCommData.praiseNumber }})
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text
|
|
|
|
<text data-evaluate="1" :class="evaluate==1?'selected':''" @tap="getProdCommPage">
|
|
|
|
data-evaluate="1"
|
|
|
|
|
|
|
|
:class="evaluate==1?'selected':''"
|
|
|
|
|
|
|
|
@tap="getProdCommPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
中评({{ prodCommData.secondaryNumber }})
|
|
|
|
中评({{ prodCommData.secondaryNumber }})
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text
|
|
|
|
<text data-evaluate="2" :class="evaluate==2?'selected':''" @tap="getProdCommPage">
|
|
|
|
data-evaluate="2"
|
|
|
|
|
|
|
|
:class="evaluate==2?'selected':''"
|
|
|
|
|
|
|
|
@tap="getProdCommPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
差评({{ prodCommData.negativeNumber }})
|
|
|
|
差评({{ prodCommData.negativeNumber }})
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<text
|
|
|
|
<text data-evaluate="3" :class="evaluate==3?'selected':''" @tap="getProdCommPage">
|
|
|
|
data-evaluate="3"
|
|
|
|
|
|
|
|
:class="evaluate==3?'selected':''"
|
|
|
|
|
|
|
|
@tap="getProdCommPage"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
有图({{ prodCommData.picNumber }})
|
|
|
|
有图({{ prodCommData.picNumber }})
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="cmt-items">
|
|
|
|
<view class="cmt-items">
|
|
|
|
<block v-if="prodCommPage.records.length">
|
|
|
|
<block v-if="prodCommPage.records.length">
|
|
|
|
<view
|
|
|
|
<view v-for="(item, index) in prodCommPage.records" :key="index" class="cmt-item">
|
|
|
|
v-for="(item, index) in prodCommPage.records"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
class="cmt-item"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="cmt-user">
|
|
|
|
<view class="cmt-user">
|
|
|
|
<text class="date">
|
|
|
|
<text class="date">
|
|
|
|
{{ item.recTime }}
|
|
|
|
{{ item.recTime }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<view class="cmt-user-info">
|
|
|
|
<view class="cmt-user-info">
|
|
|
|
<image
|
|
|
|
<image class="user-img" :src="item.pic" />
|
|
|
|
class="user-img"
|
|
|
|
|
|
|
|
:src="item.pic"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<view class="nickname">
|
|
|
|
<view class="nickname">
|
|
|
|
{{ item.nickName }}
|
|
|
|
{{ item.nickName }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -386,21 +261,10 @@
|
|
|
|
<view class="cmt-cnt">
|
|
|
|
<view class="cmt-cnt">
|
|
|
|
{{ item.content }}
|
|
|
|
{{ item.content }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<scroll-view
|
|
|
|
<scroll-view v-if="item.pics.length" class="cmt-attr" scroll-x="true">
|
|
|
|
v-if="item.pics.length"
|
|
|
|
<image v-for="(commPic, index2) in item.pics" :key="index2" :src="commPic" />
|
|
|
|
class="cmt-attr"
|
|
|
|
|
|
|
|
scroll-x="true"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<image
|
|
|
|
|
|
|
|
v-for="(commPic, index2) in item.pics"
|
|
|
|
|
|
|
|
:key="index2"
|
|
|
|
|
|
|
|
:src="commPic"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</scroll-view>
|
|
|
|
</scroll-view>
|
|
|
|
<view
|
|
|
|
<view v-if="item.replyContent" class="cmt-reply">
|
|
|
|
v-if="item.replyContent"
|
|
|
|
|
|
|
|
class="cmt-reply"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text class="reply-tit">
|
|
|
|
<text class="reply-tit">
|
|
|
|
店铺回复:
|
|
|
|
店铺回复:
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
@ -408,17 +272,11 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</block>
|
|
|
|
<view
|
|
|
|
<view v-if="!prodCommPage.records.length" class="empty">
|
|
|
|
v-if="!prodCommPage.records.length"
|
|
|
|
|
|
|
|
class="empty"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
暂无评价
|
|
|
|
暂无评价
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view v-if="prodCommPage.pages > prodCommPage.current" class="load-more">
|
|
|
|
v-if="prodCommPage.pages > prodCommPage.current"
|
|
|
|
|
|
|
|
class="load-more"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<text @tap="getMoreCommPage">
|
|
|
|
<text @tap="getMoreCommPage">
|
|
|
|
点击加载更多
|
|
|
|
点击加载更多
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
@ -482,7 +340,9 @@ const getCollection = () => {
|
|
|
|
prodId
|
|
|
|
prodId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(({ data }) => {
|
|
|
|
.then(({
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
isCollection.value = data
|
|
|
|
isCollection.value = data
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -512,6 +372,9 @@ const imgs = ref('')
|
|
|
|
const prodName = ref('')
|
|
|
|
const prodName = ref('')
|
|
|
|
const price = ref(0)
|
|
|
|
const price = ref(0)
|
|
|
|
const content = ref('')
|
|
|
|
const content = ref('')
|
|
|
|
|
|
|
|
let payScore = 1000
|
|
|
|
|
|
|
|
let giveScore = 0
|
|
|
|
|
|
|
|
const productType = ref(0)
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取商品信息
|
|
|
|
* 获取商品信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -524,7 +387,9 @@ const getProdInfo = () => {
|
|
|
|
prodId // userType: 0
|
|
|
|
prodId // userType: 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(({ data }) => {
|
|
|
|
.then(({
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -540,6 +405,9 @@ const getProdInfo = () => {
|
|
|
|
brief.value = data.brief
|
|
|
|
brief.value = data.brief
|
|
|
|
skuList.value = data.skuList
|
|
|
|
skuList.value = data.skuList
|
|
|
|
pic.value = data.pic
|
|
|
|
pic.value = data.pic
|
|
|
|
|
|
|
|
productType.value = data.productType
|
|
|
|
|
|
|
|
payScore = data.payScore
|
|
|
|
|
|
|
|
giveScore = data.giveScore
|
|
|
|
// 组装sku
|
|
|
|
// 组装sku
|
|
|
|
groupSkuProp(data.skuList, data.price)
|
|
|
|
groupSkuProp(data.skuList, data.price)
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
@ -555,7 +423,9 @@ const getProdCommData = () => {
|
|
|
|
prodId
|
|
|
|
prodId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(({ data }) => {
|
|
|
|
.then(({
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
prodCommData.value = data
|
|
|
|
prodCommData.value = data
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -607,7 +477,9 @@ const getProdCommPage = (e) => {
|
|
|
|
evaluate: evaluate.value
|
|
|
|
evaluate: evaluate.value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(({ data }) => {
|
|
|
|
.then(({
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
data.records.forEach(item => {
|
|
|
|
data.records.forEach(item => {
|
|
|
|
if (item.pics) {
|
|
|
|
if (item.pics) {
|
|
|
|
item.pics = item.pics.split(',')
|
|
|
|
item.pics = item.pics.split(',')
|
|
|
|
|