feat: 重构登录模块并添加验证码功能
- 将登录组件文件名从login.tsx改为Login.tsx - 添加验证码图片显示和验证功能 - 修改登录后默认跳转路径为/ckbox/weChat - 移除第三方登录功能 - 更新项目部署路径为tkb-wechat - 清理无用路由模块
This commit is contained in:
@@ -69,14 +69,7 @@ export const useUserStore = createPersistStore<UserState>(
|
||||
set({ user, token, isLoggedIn: true });
|
||||
|
||||
Toast.show({ content: "登录成功", position: "top" });
|
||||
|
||||
// 根据设备数量判断跳转
|
||||
if (deviceTotal > 0) {
|
||||
window.location.href = "/";
|
||||
} else {
|
||||
// 没有设备,跳转到引导页面
|
||||
window.location.href = "/guide";
|
||||
}
|
||||
window.location.href = "/ckbox/weChat";
|
||||
},
|
||||
login2: token2 => {
|
||||
localStorage.setItem("token2", token2);
|
||||
|
||||
Reference in New Issue
Block a user