From 8cd4edef16fd38a6cdbca6b3df33cf957c9f00fe Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Fri, 29 Apr 2022 21:16:30 +0800 Subject: [PATCH] bug --- src/apps/AppInfotainment/newsList.vue | 42 ++++++++++----------------- src/apps/AppInfotainment/select.vue | 10 +++++-- src/apps/AppMonitoringObject/Add.vue | 2 +- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/apps/AppInfotainment/newsList.vue b/src/apps/AppInfotainment/newsList.vue index 3a418621..8b9385d0 100644 --- a/src/apps/AppInfotainment/newsList.vue +++ b/src/apps/AppInfotainment/newsList.vue @@ -3,31 +3,10 @@
- - +
- -

{{ item.title }}

@@ -64,15 +43,24 @@ export default { onLoad(params) { this.parentId = params.id this.parentName = params.parentName + uni.$on('update', (tabIndex) => { + this.currIndex = tabIndex + // setTimeout(() => { + // this.getListInit() + // },600) + }) }, onShow() { document.title = this.parentName this.getList().then(() => this.getListInit()) - - uni.$on('update', (tabIndex) => { - this.currIndex = tabIndex - this.getListInit() - }) + // setTimeout(() => { + // this.currIndex = 8 + // // this.getListInit() + // },600) + + + + // }) }, methods: { diff --git a/src/apps/AppInfotainment/select.vue b/src/apps/AppInfotainment/select.vue index 3d07ae37..94459fcf 100644 --- a/src/apps/AppInfotainment/select.vue +++ b/src/apps/AppInfotainment/select.vue @@ -21,13 +21,17 @@ this.tabIndex = option.index, this.parentId = option.parentId this.getList() + this.$forceUpdate() }, methods: { tabClick(index) { - this.tabIndex = index - uni.$emit('update',this.tabIndex) - uni.navigateBack({delta: 1}) + this.tabIndex = index + uni.navigateBack({ + success: ()=>{ + uni.$emit('update',this.tabIndex) + } + }) }, getList() { this.$http.post('/app/apppublicitycategory/list',null,{ diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 2364f1bc..09420a3a 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -587,7 +587,7 @@ export default { nextStep() { - if (!this.isEdit) { + if (!this.form.id) { if (!this.form.objectType) { return this.$u.toast('请选择监测对象类型') }