From 6c3aaa75825359a66b602bb09b8fc84a3a35c9fb Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 14 Mar 2022 14:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mods/AppContent/AppContent.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mods/AppContent/AppContent.vue b/src/mods/AppContent/AppContent.vue index 8626ee7..30f3267 100644 --- a/src/mods/AppContent/AppContent.vue +++ b/src/mods/AppContent/AppContent.vue @@ -64,7 +64,7 @@ export default { onLoad(option) { this.$loading() this.names = option.names; - this.search.areaId = option.areaId || this.user.areaId + this.search.areaId = option.areaId || this.user.areaId || "" this.getName(); if (option.names) { uni.setNavigationBarTitle({ @@ -88,8 +88,8 @@ export default { }).then(res => { if (res?.data) { this.categorys = res.data?.[0]?.categoryList || []; - this.search.moduleId = res.data?.[0]?.id; - this.search.categoryId = res.data?.[0]?.categoryList?.[0]?.id; + this.search.moduleId = res.data?.[0]?.id || ""; + this.search.categoryId = res.data?.[0]?.categoryList?.[0]?.id || ""; this.getCategoryList(); } else { this.$hideLoading() @@ -103,10 +103,7 @@ export default { }, getCategoryList() { this.$instance.post("/app/appcontentinfo/list", null, { - params: { - ...this.search, - size: 10 - } + params: {...this.search, size: 10} }).then(res => { if (res?.data) { this.categoryList = this.current > 1 ? [...this.categoryList, ...res.data.records] : res.data.records;