|
|
@ -6,7 +6,8 @@ import './app.scss' |
|
|
|
import {loginByOpenId} from "@/api/layout"; |
|
|
|
import {TenantId} from "@/config/app"; |
|
|
|
import {saveStorageByLoginUser} from "@/utils/server"; |
|
|
|
import {parseInviteParams, saveInviteParams, trackInviteSource, handleInviteRelation, debugInviteInfo} from "@/utils/invite"; |
|
|
|
import {parseInviteParams, saveInviteParams, trackInviteSource, handleInviteRelation} from "@/utils/invite"; |
|
|
|
import {configWebsiteField} from "@/api/cms/cmsWebsiteField"; |
|
|
|
|
|
|
|
function App(props: { children: any; }) { |
|
|
|
const reload = () => { |
|
|
@ -52,6 +53,7 @@ function App(props: { children: any; }) { |
|
|
|
// 处理小程序启动参数中的邀请信息
|
|
|
|
const options = Taro.getLaunchOptionsSync() |
|
|
|
handleLaunchOptions(options) |
|
|
|
handleTheme() |
|
|
|
}) |
|
|
|
|
|
|
|
// 处理启动参数
|
|
|
@ -80,10 +82,6 @@ function App(props: { children: any; }) { |
|
|
|
}) |
|
|
|
}, 1000) |
|
|
|
|
|
|
|
// 打印调试信息
|
|
|
|
setTimeout(() => { |
|
|
|
debugInviteInfo() |
|
|
|
}, 2000) |
|
|
|
} else { |
|
|
|
console.log('❌ 未检测到邀请参数') |
|
|
|
} |
|
|
@ -94,6 +92,15 @@ function App(props: { children: any; }) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleTheme = () => { |
|
|
|
configWebsiteField().then(data => { |
|
|
|
// 设置主题
|
|
|
|
if(data.theme && !Taro.getStorageSync('user_theme')){ |
|
|
|
Taro.setStorageSync('user_theme', data.theme) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 对应 onHide
|
|
|
|
useDidHide(() => { |
|
|
|
}) |
|
|
|