From 32698819710ea6da4b19637b224c5272fbb1821e Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 16 Oct 2024 11:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config.js | 4 ++-- components/applyForm/index.vue | 9 +++++++-- packages/apply/index.vue | 26 ++++++++++++++++++-------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/common/config.js b/common/config.js index f69e14f..4f0fb9f 100644 --- a/common/config.js +++ b/common/config.js @@ -1,7 +1,7 @@ const mode = 'production'; //devLocal:本地测试、devOnline:线上测试、production:生产环境 let ROOTPATH = ''; //域名 -let baseUrl = "https://suzhoukeji-test.ali251.langye.net" -// let baseUrl = "https://wx.sstbc.com" +// let baseUrl = "https://suzhoukeji-test.ali251.langye.net" +let baseUrl = "https://wx.sstbc.com" switch (mode) { case 'devLocal': ROOTPATH = baseUrl diff --git a/components/applyForm/index.vue b/components/applyForm/index.vue index ab16447..901abb9 100644 --- a/components/applyForm/index.vue +++ b/components/applyForm/index.vue @@ -5,9 +5,14 @@ - + + - + + diff --git a/packages/apply/index.vue b/packages/apply/index.vue index 5f49420..02823d8 100644 --- a/packages/apply/index.vue +++ b/packages/apply/index.vue @@ -36,8 +36,9 @@ onLoad(options) { this.course_id = options.id if (options.type === 'edit') { - this.opType = 'edit' - this.getSignDetail(options.id) + this.opType = 'edit' + this.getCourseDetail(options.id) + // this.getSignDetail(options.id) } else { this.getCourseDetail(options.id) } @@ -61,7 +62,10 @@ }) this.course_forms = res.course_forms.sort((a, b) => (a.sort - b.sort)) } - this.is_fee = res.is_fee + this.is_fee = res.is_fee + if(this.opType == 'edit'){ + this.getSignDetail(id) + } }, // 修改 async getSignDetail(id) { @@ -70,12 +74,18 @@ }) this.sign_id = res.detail.id if (res.detail.data && res.detail.data.length > 0) { - res.detail.data.map(item => { - if (item.value === null) { - item.value = '' - } + res.detail.data.map(item => { + this.course_forms.map(forms=>{ + if(item.field==forms.field){ + forms.value = item.value?item.value:'' + } + }) + + // if (item.value === null) { + // item.value = '' + // } }) - this.course_forms = res.detail.data.sort((a, b) => (a.sort - b.sort)) + // this.course_forms = res.detail.data.sort((a, b) => (a.sort - b.sort)) } }, async backForm(e) {