fix: 修复扫码进入的问题

This commit is contained in:
2025-11-15 11:35:06 +08:00
parent 7221a86214
commit 86274c1a23
2 changed files with 3 additions and 15 deletions

View File

@@ -24,19 +24,6 @@ class App extends Component<AppProps> {
// 这里可以自定义弹窗(或直接默认同意) // 这里可以自定义弹窗(或直接默认同意)
resolve({ event: 'agree' }); // 同意隐私协议 resolve({ event: 'agree' }); // 同意隐私协议
}); });
// Taro.loadFontFace({
// family: 'Quicksand',
// source: 'url("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/other/57dc951f-f10e-45b7-9157-0b1e468187fd.ttf")',
// global: true, // 全局生效
// success(res) {
// console.log('字体加载成功', res);
// },
// fail(err) {
// console.error('字体加载失败', err);
// }
// })
sceneRedirectLogic(options.query, options.path);
} }
componentDidMount() { componentDidMount() {
@@ -45,7 +32,9 @@ class App extends Component<AppProps> {
// this.getLocation() // this.getLocation()
} }
componentDidShow() { } componentDidShow(options) {
sceneRedirectLogic(options.query, options.path);
}
componentDidHide() { } componentDidHide() { }

View File

@@ -2,7 +2,6 @@ import Taro from "@tarojs/taro";
// 普通函数,不调用 useLoad // 普通函数,不调用 useLoad
export const sceneRedirectLogic = (options, defaultPage: string) => { export const sceneRedirectLogic = (options, defaultPage: string) => {
console.log(options, 12345)
if (!options.scene) return; if (!options.scene) return;
try { try {