完善delivery端状态bug

This commit is contained in:
2026-05-26 18:39:43 +08:00
parent 2f528c049f
commit c26f2c5431
5 changed files with 460 additions and 30 deletions

View File

@@ -152,7 +152,7 @@
</view>
</view>
<button class="save-button" :disabled="isSaving" :loading="isSaving" @click="saveProfile">
<button class="save-button" :disabled="isSaving" :loading="isSaving" @click="saveProfile(true)">
保存修改
</button>
</view>
@@ -1260,7 +1260,7 @@ const buildProfileUpdatePayload = (): UTSJSONObject => {
return payload
}
const saveProfile = async (): Promise<void> => {
const saveProfile = async (shouldReturn: boolean = false): Promise<void> => {
const userid: string = profileRowId.value != '' ? profileRowId.value : (profile.value.id ?? '')
const updatePayload = buildProfileUpdatePayload()
if (UTSJSONObject.keys(updatePayload).length == 0) {
@@ -1289,6 +1289,13 @@ const saveProfile = async (): Promise<void> => {
title: '保存成功',
icon: 'success'
})
if (shouldReturn) {
setTimeout((): void => {
uni.navigateBack({
delta: 1
})
}, 500)
}
} else {
console.log('saveProfile update ak_users error:', JSON.stringify(result.error))
uni.showToast({