feat: 优化
This commit is contained in:
@@ -224,15 +224,13 @@ async function handleSmsLogin(event) {
|
||||
|
||||
// 更新用户登录状态
|
||||
const userInfo = info?.userInfo || {}
|
||||
await userStore.loginWithPhone({
|
||||
profile: {
|
||||
userId: String(userInfo.id || userInfo.userId || smsForm.mobile),
|
||||
nickname: userInfo.nickname || userInfo.username || '用户',
|
||||
avatar: userInfo.avatar || '',
|
||||
balance: userInfo.balance ?? 0,
|
||||
vipLevel: userInfo.vipLevel ?? 0,
|
||||
credits: userInfo.credits ?? 0,
|
||||
}
|
||||
userStore.login({
|
||||
userId: String(userInfo.id || userInfo.userId || smsForm.mobile),
|
||||
nickname: userInfo.nickname || userInfo.username || '用户',
|
||||
avatar: userInfo.avatar || '',
|
||||
balance: userInfo.balance ?? 0,
|
||||
vipLevel: userInfo.vipLevel ?? 0,
|
||||
credits: userInfo.credits ?? 0,
|
||||
})
|
||||
|
||||
// 获取完整的用户信息
|
||||
@@ -240,10 +238,7 @@ async function handleSmsLogin(event) {
|
||||
|
||||
message.success('登录成功')
|
||||
|
||||
// 获取redirect参数,跳转到之前的页面或默认首页
|
||||
router.push({
|
||||
name: '对标分析'
|
||||
})
|
||||
router.push({ name: '对标分析' })
|
||||
} catch (error) {
|
||||
if (error?.response?.data?.message) {
|
||||
message.error(error.response.data.message)
|
||||
@@ -537,6 +532,8 @@ onBeforeUnmount(() => {
|
||||
border: none;
|
||||
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-btn:hover {
|
||||
|
||||
Reference in New Issue
Block a user