审核模式

This commit is contained in:
Dev
2026-10-15 15:16:17 +08:00
parent 1c9927efd5
commit 3bc5ea70fe
11 changed files with 75 additions and 8 deletions
@@ -6,6 +6,7 @@ import {
} from '../../../services/good/fetchGoodsDetailsComments';
import { cdnBase } from '../../../config/index';
import { fetchGoodsCaseView } from '../../../services/home/home';
import { withPromoter, promoterQuery } from '../../../utils/promoter';
const imgPrefix = `${cdnBase}/`;
@@ -74,6 +75,7 @@ Page({
duration: 500,
interval: 5000,
soldNum: 0, // 已售数量
caseView: wx.getStorageSync('goodsCaseView') === true, // 案例展示:使用默认标题,不显示购买和规格
},
handlePopupHide() {
@@ -409,8 +411,20 @@ Page({
this.setData({
spuId: spuId,
});
this.applyCaseView();
this.getDetail(spuId);
this.getCommentsList(spuId);
this.getCommentsStatistics(spuId);
},
async applyCaseView() {
if (this.data.caseView) {
wx.setNavigationBarTitle({ title: '' });
}
const caseView = await fetchGoodsCaseView();
this.setData({ caseView });
if (caseView) {
wx.setNavigationBarTitle({ title: '' });
}
},
});
@@ -1,4 +1,4 @@
<view class="goods-detail-page">
<view class="goods-detail-page {{caseView ? 'goods-detail-page--case' : ''}}">
<view class="goods-head">
<view class="goods-gallery">
<t-swiper wx:if="{{details.images.length > 0}}" height="750rpx" current="{{current}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" list="{{details.images}}"></t-swiper>
@@ -45,7 +45,7 @@
<view class="goods-intro" wx:if="{{details.intro}}">{{details.intro}}</view>
</view>
<view class="spu-select" bindtap="onSelectSkuTap">
<view class="spu-select" wx:if="{{!caseView}}" bindtap="onSelectSkuTap">
<view class="label">已选</view>
<view class="content">
<view class="content-text {{!selectedAttrStr ? 'tintColor' : ''}}">
@@ -97,7 +97,7 @@
</view>
</view>
<view class="goods-bottom-operation">
<view class="goods-bottom-operation" wx:if="{{!caseView}}">
<buy-bar soldout="{{soldout}}" isStock="{{isStock}}" buttonType="{{buttonType}}" bind:toBuyNow="buyItNow" />
</view>
@@ -11,6 +11,10 @@ page {
background-color: var(--bg-page);
}
.goods-detail-page--case {
padding-bottom: calc(env(safe-area-inset-bottom) + 32rpx);
}
.goods-head {
--td-swiper-radius: 0;
}