From 488e2298de9cd383398be778fb90ec5bb823e4f1 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 8 Aug 2022 14:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E5=BE=AE=E6=9E=84=E5=BB=BA=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8C=87=E5=AE=9A=E9=BB=98=E8=AE=A4=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oms/apps/develop/AppDeployCustom/add.vue | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/project/oms/apps/develop/AppDeployCustom/add.vue b/project/oms/apps/develop/AppDeployCustom/add.vue index 7ae5350f..b184d60d 100644 --- a/project/oms/apps/develop/AppDeployCustom/add.vue +++ b/project/oms/apps/develop/AppDeployCustom/add.vue @@ -60,6 +60,9 @@ + + + @@ -158,11 +161,11 @@ export default { submit() { this.$refs.AddForm.validate(v => { if (v) { - const {tabBar, form: {type, appId, isSingleService}} = this + const {tabBar, form: {type, appId, isSingleService, homePage}} = this if (type == 'mp') { this.form.extra = {tabBar, appId} } else if (v == 'wxwork') { - this.form.extra = {isSingleService} + this.form.extra = {isSingleService, homePage} } this.instance.post("/node/custom/addOrUpdate", this.form).then(res => { if (res?.code == 0) { @@ -173,13 +176,15 @@ export default { } }) }, - handleSysTypeChange(v, data) { + handleSysTypeChange(v, data = {}) { + let values = this.$copy(data) if (v == 'mp') { - this.form.appId = data.appId - this.tabBar = data?.tabBar || this.tabBar - } else if (v == 'wxwork') { - this.form.isSingleService = data.isSingleService + if (values?.tabBar) { + this.tabBar = values.tabBar || this.tabBar + delete values.tabBar + } } + Object.keys(values).map(e => this.$set(this.form, e, values[e])) }, handleTabbarChange(row, {name, label}) { row.text = label