修改用户授权调用位置和逻辑
This commit is contained in:
10
src/app.ts
10
src/app.ts
@@ -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() { }
|
||||
|
||||
Reference in New Issue
Block a user