fix:编辑资料页昵称未填时增加 Toast 提示
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user