From 5819705f545e71aef85bd3f3295e31be7a6c9ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Sun, 5 Feb 2023 15:28:18 +0800 Subject: [PATCH] =?UTF-8?q?dengjie=20:=20=E4=BF=AE=E6=94=B9=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=90=8E=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/ideasAndNeeds/ideasAndNeeds.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/ideasAndNeeds/ideasAndNeeds.vue b/pages/ideasAndNeeds/ideasAndNeeds.vue index ecddecc..a5d40c9 100644 --- a/pages/ideasAndNeeds/ideasAndNeeds.vue +++ b/pages/ideasAndNeeds/ideasAndNeeds.vue @@ -177,8 +177,8 @@ console.log(options.item) this.imgUrl = uni.getStorageSync('img_url') //我的发布点击修改回显数据 - if(options && options.item && uni.getStorageSync(options.item)) { - try{ + if (options && options.item && uni.getStorageSync(options.item)) { + try { let publishFormList = uni.getStorageSync(options.item) console.log(publishFormList.images) this.fileList1 = publishFormList.images.map(item => { @@ -189,7 +189,7 @@ }) console.log(this.fileList1) this.needsPublishForm = publishFormList - } catch(error) { + } catch (error) { this.$toast.warn(error) } } @@ -380,7 +380,7 @@ if (this.fileList1.length > 0) { this.fileList1.map(item => { const url = item.url - temp.push(url.replace(this.imgUrl+'/', '')) + temp.push(url.replace(this.imgUrl + '/', '')) }) } this.needsPublishForm.images = temp.join(';') @@ -403,10 +403,10 @@ apiService.submitIdeasAndNeeds(data).then(res => { this.$toast.success('提交成功') console.log('esf=', res); - if(this.needsPublishForm.id) { - uni.navigateTo({ - url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1) - }) + if (res.data.code == 1) { + uni.navigateTo({ + url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1) + }) } this.tabCurrent = 0 this.fileList1 = []