修复一些问题,个人账号功能完善,注册功能完善,收藏,购物车功能完善,初版基本完成,投入测试
This commit is contained in:
@@ -330,10 +330,10 @@
|
||||
>
|
||||
<a-select-option
|
||||
v-for="artist in artists"
|
||||
:key="artist.id"
|
||||
:value="artist.id.toString()"
|
||||
:key="artist?.id"
|
||||
:value="artist?.id?.toString()"
|
||||
>
|
||||
{{ artist.nickname }}
|
||||
{{ artist?.nickname || '' }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
@@ -534,14 +534,15 @@ const handleDelete = async (record: UserVO) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 在删除前先重命名账号,添加删除时间戳
|
||||
// 在删除前先重命名账号和手机号,添加删除时间戳
|
||||
const timestamp = new Date().getTime()
|
||||
const newAccount = `${record.account}_deleted_${timestamp}`
|
||||
const newPhone = `${record.phone}_deleted_${timestamp}`
|
||||
|
||||
try {
|
||||
await userApi.updateUser(record.id, { account: newAccount })
|
||||
await userApi.updateUser(record.id, { account: newAccount, phone: newPhone })
|
||||
} catch (renameError) {
|
||||
console.error('重命名账号失败:', renameError)
|
||||
console.error('重命名账号和手机号失败:', renameError)
|
||||
// 重命名失败也继续删除流程
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user