From 6c47f20f9d5ce5803ab245f8895ddeace3b08a34 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Mon, 27 Mar 2023 15:29:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#10892=E3=80=8110953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/Apply/Save/components/EditForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/system/Apply/Save/components/EditForm.vue b/src/views/system/Apply/Save/components/EditForm.vue index 15d0c6be..fd76d769 100644 --- a/src/views/system/Apply/Save/components/EditForm.vue +++ b/src/views/system/Apply/Save/components/EditForm.vue @@ -1673,6 +1673,10 @@ function init() { watch( () => form.data.provider, (n) => { + form.data.page.baseUrl = ''; + form.data.page.parameters = []; + form.data.apiClient.baseUrl = ''; + form.data.apiClient.parameters = []; emit('changeApplyType', n); if (routeQuery.id) return; if (n === 'wechat-webapp' || n === 'dingtalk-ent-app') { @@ -1710,6 +1714,7 @@ function getInfo(id: string) { }), ); form.data = { + ...initForm, // 查询详情, 赋值初始字段. 解决编辑改变接入方式报错的问题: bug#10892 ...resp.result, integrationModes: resp.result.integrationModes.map( (item: any) => item.value, @@ -1813,7 +1818,7 @@ function clickSave() { if (resp.status === 200) { const isPage = params.integrationModes.includes('page'); if (isPage) { - form.data = params; + // form.data = params; dialog.selectId = routeQuery.id || resp.result.id; dialog.selectProvider = form.data.provider; dialog.visible = true;