完善delivery端状态bug
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user