fix:编辑资料页昵称未填时增加 Toast 提示

This commit is contained in:
2026-06-23 21:47:32 +08:00
parent eb50358e3d
commit 0eaf44ed93
+7 -1
View File
@@ -308,7 +308,13 @@ const addCustomHobby = () => {
} }
const saveProfile = async () => { const saveProfile = async () => {
if (!form.nickname.trim() || saving.value) return if (saving.value) return
if (!form.nickname.trim()) {
uni.showToast({ title: '请填写昵称', icon: 'none' })
return
}
saving.value = true saving.value = true
store.updateRegistration(JSON.parse(JSON.stringify({ ...form, birthday: birthday.value }))) store.updateRegistration(JSON.parse(JSON.stringify({ ...form, birthday: birthday.value })))
const res = await store.saveUserProfile() const res = await store.saveUserProfile()