Commit dd53805e authored by hewenhao's avatar hewenhao

feat: 可以选择区域和年级

parent 26ab99ee
...@@ -69,11 +69,10 @@ const userModel: UserModel = { ...@@ -69,11 +69,10 @@ const userModel: UserModel = {
updateNickNameAndPhone: thunk(async (actions, payload, helpers) => { updateNickNameAndPhone: thunk(async (actions, payload, helpers) => {
try { try {
const defaultUserInfo = { city: '成都', grade: '二年级' }
const fns: Promise<any>[] = [ const fns: Promise<any>[] = [
] ]
if (payload.name) { if (payload.name) {
fns.push(updateUserInfo({ nickName: payload.name, ...defaultUserInfo })) fns.push(updateUserInfo({ nickName: payload.name }))
} }
let authPhone let authPhone
...@@ -94,7 +93,7 @@ const userModel: UserModel = { ...@@ -94,7 +93,7 @@ const userModel: UserModel = {
} }
if (payload.name) { if (payload.name) {
current = { ...current, nickName: payload.name, ...defaultUserInfo } current = { ...current, nickName: payload.name }
} }
updateStorage(StorageKeys.userInfo, current) updateStorage(StorageKeys.userInfo, current)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment