审核模式
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { fetchGoodsList } from '../../../services/good/fetchGoodsList';
|
||||
import { getCategoryList } from '../../../services/good/fetchCategoryList';
|
||||
import { fetchGoodsCaseView } from '../../../services/home/home';
|
||||
import Toast from 'tdesign-miniprogram/toast/index';
|
||||
|
||||
const initFilters = {
|
||||
@@ -27,6 +28,7 @@ Page({
|
||||
loadMoreStatus: 0,
|
||||
loading: true,
|
||||
tabList: [],
|
||||
caseView: wx.getStorageSync('goodsCaseView') === true, // 案例展示:标题改为软件案例,不显示价格和购物车
|
||||
},
|
||||
|
||||
handleFilterChange(e) {
|
||||
@@ -147,10 +149,20 @@ Page({
|
||||
|
||||
|
||||
onLoad() {
|
||||
this.applyCaseView();
|
||||
this.init();
|
||||
this.loadGoodsList(true);
|
||||
},
|
||||
|
||||
async applyCaseView() {
|
||||
if (this.data.caseView) {
|
||||
wx.setNavigationBarTitle({ title: '软件案例' });
|
||||
}
|
||||
const caseView = await fetchGoodsCaseView();
|
||||
this.setData({ caseView });
|
||||
wx.setNavigationBarTitle({ title: caseView ? '软件案例' : '软件列表' });
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
const { goodsList, total } = this.data;
|
||||
if (goodsList.length === total) {
|
||||
|
||||
Reference in New Issue
Block a user