mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:03:27 +08:00
uniapp【修复】:服务商品详情去掉商品参数评价
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
:agentProductsList="props.agentProductsList"></GoodsDetailAgent>
|
:agentProductsList="props.agentProductsList"></GoodsDetailAgent>
|
||||||
|
|
||||||
<!-- 商品评价 -->
|
<!-- 商品评价 -->
|
||||||
<GoodsDetailEvaluate :id="props.goodsId" :commentsCount="state.commentsCount"
|
<GoodsDetailEvaluate v-if="state.commentsList.length > 0" :id="props.goodsId" :commentsCount="state.commentsCount"
|
||||||
:commentsList="state.commentsList">
|
:commentsList="state.commentsList">
|
||||||
</GoodsDetailEvaluate>
|
</GoodsDetailEvaluate>
|
||||||
|
|
||||||
@@ -79,6 +79,8 @@
|
|||||||
spesDesc : string,
|
spesDesc : string,
|
||||||
isCustomService : boolean,
|
isCustomService : boolean,
|
||||||
shareType : ShareEnum,
|
shareType : ShareEnum,
|
||||||
|
isShowGoodsComment:boolean,
|
||||||
|
isShowGoodsParams:boolean,
|
||||||
}>(), {
|
}>(), {
|
||||||
isActivityGoods: false, /** 是否是活动商品 */
|
isActivityGoods: false, /** 是否是活动商品 */
|
||||||
goodsId: 0, /** 商品id */
|
goodsId: 0, /** 商品id */
|
||||||
@@ -91,6 +93,8 @@
|
|||||||
spesDesc: '', /** 商品规格 */
|
spesDesc: '', /** 商品规格 */
|
||||||
isCustomService: false, /** 是否自定义商品服务模块 */
|
isCustomService: false, /** 是否自定义商品服务模块 */
|
||||||
shareType: ShareEnum.index, /** 分享类型 - 默认分享首页 */
|
shareType: ShareEnum.index, /** 分享类型 - 默认分享首页 */
|
||||||
|
isShowGoodsComment:true, /** 是否显示评价 */
|
||||||
|
isShowGoodsParams:true, /** 是否显示商品参数 */
|
||||||
});
|
});
|
||||||
|
|
||||||
const emits = defineEmits(['hanldeShowGoodSku', 'handleToggleGoodsCollection']);
|
const emits = defineEmits(['hanldeShowGoodSku', 'handleToggleGoodsCollection']);
|
||||||
@@ -113,10 +117,16 @@
|
|||||||
|
|
||||||
watch(() => props.goodsId, (newVal : number) => {
|
watch(() => props.goodsId, (newVal : number) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
/** 获取商品评价 */
|
/** 获取商品评价 */
|
||||||
getGoodsComment();
|
if(props.isShowGoodsComment){
|
||||||
/** 获取商品参数 */
|
getGoodsComment();
|
||||||
getGoodsParams();
|
}
|
||||||
|
|
||||||
|
/** 获取商品参数 */
|
||||||
|
if(props.isShowGoodsParams){
|
||||||
|
getGoodsParams();
|
||||||
|
}
|
||||||
|
|
||||||
/** 如果用户登录,添加商品足迹 */
|
/** 如果用户登录,添加商品足迹 */
|
||||||
if (uni.getStorageSync(UserToken)) {
|
if (uni.getStorageSync(UserToken)) {
|
||||||
handleGoodsBrowsing();
|
handleGoodsBrowsing();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="layout-goods-detail">
|
<view class="layout-goods-detail">
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
||||||
:isCustomService="true" :isActivityGoods="true" :shareType=ShareEnum.serviceGoods>
|
:isCustomService="true" :isActivityGoods="true" :isShowGoodsComment="false" :isShowGoodsParams="false" :shareType=ShareEnum.serviceGoods>
|
||||||
<template #countDown>
|
<template #countDown>
|
||||||
<view class="time-box"
|
<view class="time-box"
|
||||||
v-if="(state.goodsDetailData.openStatus == ServiceGoodsOpenEnum.start || state.goodsDetailData.openStatus == ServiceGoodsOpenEnum.noStart) && state.goodsDetailData.timestamp > 0">
|
v-if="(state.goodsDetailData.openStatus == ServiceGoodsOpenEnum.start || state.goodsDetailData.openStatus == ServiceGoodsOpenEnum.noStart) && state.goodsDetailData.timestamp > 0">
|
||||||
|
|||||||
Reference in New Issue
Block a user