修改用户授权调用位置和逻辑

This commit is contained in:
张成
2025-11-18 08:00:38 +08:00
parent 4568e758a7
commit 988f57aa5e
12 changed files with 343 additions and 81 deletions

View File

@@ -5,8 +5,7 @@ import "./app.scss";
import "./scss/qweather-icons/qweather-icons.css";
import { useGlobalStore } from "./store/global";
import { removeStorage } from "./store/storage";
import { sceneRedirectLogic } from './utils/helper'
import { silentLogin } from "./services/loginService";
import { sceneRedirectLogic } from './utils/helper';
interface AppProps {
children: ReactNode;
@@ -25,9 +24,9 @@ class App extends Component<AppProps> {
// 这里可以自定义弹窗(或直接默认同意)
resolve({ event: 'agree' }); // 同意隐私协议
});
// 移除这里的静默登录调用,避免重复调用
// 静默登录在 home_pages/index.tsx统一执行
// 微信授权逻辑已转移到 main_pages/index.tsx 中
// 不再在 app.ts 中执行静默登录
}
componentDidMount() {
@@ -40,6 +39,7 @@ class App extends Component<AppProps> {
componentDidShow(options) {
sceneRedirectLogic(options.query, options.path);
// 微信授权逻辑已转移到 main_pages/index.tsx 中
}
componentDidHide() { }