小程序适配
All checks were successful
Deploy to Server / deploy (push) Successful in 25s

This commit is contained in:
jeremygan2021
2026-02-26 15:32:45 +08:00
parent 6910582b18
commit 6fee334ebf
2 changed files with 10 additions and 0 deletions

View File

@@ -198,6 +198,7 @@ export default function UserIndex() {
console.log('code:', code)
if (res.statusCode === 200 && res.data.token) {
console.log('登录成功,后端返回用户信息:', res.data)
Taro.setStorageSync('token', res.data.token)
Taro.setStorageSync('userInfo', res.data)
setUserInfo(res.data)
@@ -237,6 +238,7 @@ export default function UserIndex() {
Taro.hideLoading()
if (res.statusCode === 200 && res.data.token) {
console.log('手机号登录成功,后端返回用户信息:', res.data)
Taro.setStorageSync('token', res.data.token)
Taro.setStorageSync('userInfo', res.data)
setUserInfo(res.data)