feat: refactor application creation to await user profile update

--bug=1062377 --user=刘瑞斌 【应用】新建简易应用没有打开应用编辑界面 https://www.tapd.cn/62980211/s/1780590
This commit is contained in:
CaptainB 2025-09-28 17:11:04 +08:00
parent 2922f9e8f2
commit 6f392b775c

View File

@ -239,7 +239,8 @@ const submitHandle = async (formEl: FormInstance | undefined) => {
}
applicationApi
.postApplication({ ...applicationForm.value, folder_id: currentFolder.value }, loading)
.then((res) => {
.then(async (res) => {
await user.profile()
MsgSuccess(t('common.createSuccess'))
emit('refresh')
if (isWorkFlow(applicationForm.value.type)) {
@ -249,11 +250,6 @@ const submitHandle = async (formEl: FormInstance | undefined) => {
}
dialogVisible.value = false
})
.then((res) => {
return user.profile().then(() => {
return res
})
})
}
})
}