修复了一些问题

This commit is contained in:
李琦
2026-05-15 16:28:11 +08:00
parent cd369ddf09
commit 6294a3db0c
9 changed files with 572 additions and 417 deletions

View File

@@ -102,16 +102,19 @@
}
}).then((res) => {
// console.log(res, 'list');
if (res.data.errcode == 0) {
// console.log(res, 'res');
this.categoryLists = res.data.data.list
this.cid = res.data.data.list.map(x => x.id)
this.num = res.data.data.list[0].id //初始选中
// this.current = res.data.data[0].subs[0].id //初始选中2
if (res.data.code == 0) {
const list = (res.data.result && res.data.result.list) || []
this.categoryLists = list
if (!list.length) {
this.infoList = []
return
}
const firstId = list[0].id
this.num = firstId
this.cid = firstId
this.getArticleList()
}
})
this.getArticleList()
},
// 文章列表
getArticleList() {
@@ -123,8 +126,8 @@
}
}).then((res) => {
// console.log(res, 'list');
if (res.data.errcode == 0) {
this.infoList = res.data.data.list
if (res.data.code == 0) {
this.infoList = (res.data.result && res.data.result.list) || []
// console.log(res, 'list')
}

View File

@@ -44,9 +44,9 @@
}
}).then((res) => {
// console.log(res, 'list');
if (res.data.errcode == 0) {
this.infoList = res.data.data
this.content = res.data.data.content
if (res.data.code == 0 && res.data.result) {
this.infoList = res.data.result
this.content = res.data.result.content
}
})
},

View File

@@ -117,7 +117,8 @@
{{item.good_at}}
</view>
</view>
<view class="consult-btn">咨询</view>
<!-- <view class="consult-btn">咨询</view>-->
<view class="consult-btn">查看</view>
</view>
<view class="doc-stats-bar">
<view class="stat-item">
@@ -275,10 +276,10 @@ export default {
},
onReady() {
console.log('调试静默登陆', isLoggedIn());
// console.log('调试静默登陆', isLoggedIn());
// 判断是否已登录
if (!isLoggedIn()) {
console.log('调试静默登陆2', isLoggedIn());
// console.log('调试静默登陆2', isLoggedIn());
// 未登录时设置guest模式标记和store_id
// setGuestMode();
@@ -660,6 +661,7 @@ export default {
},
onShow() {
this.storeId = uni.getStorageSync('store_id');
this.toChang(this.storeId)
this.getStore();
this.getList();
this.getProductList();