|
@@ -200,7 +200,7 @@ const App = () => {
|
|
|
const appInitData=()=>{
|
|
const appInitData=()=>{
|
|
|
// scroll to top on route change
|
|
// scroll to top on route change
|
|
|
checkInviteCode();
|
|
checkInviteCode();
|
|
|
- checkOpenInstallBox();
|
|
|
|
|
|
|
+ checkOpenInChrome();
|
|
|
loadFont();
|
|
loadFont();
|
|
|
//请求routes
|
|
//请求routes
|
|
|
startReqRoutes();
|
|
startReqRoutes();
|
|
@@ -239,20 +239,24 @@ const App = () => {
|
|
|
checkOpenCheckin();
|
|
checkOpenCheckin();
|
|
|
}
|
|
}
|
|
|
const checkOpenInstallBox=()=>{
|
|
const checkOpenInstallBox=()=>{
|
|
|
- if (global.installed===1)return;
|
|
|
|
|
- global.installed=1;
|
|
|
|
|
|
|
+ if (promoteInstall>0){
|
|
|
|
|
+ if (global.installed===1)return;
|
|
|
|
|
+ global.installed=1;
|
|
|
|
|
+ let time=promoteInstall*1000;
|
|
|
|
|
+ // time=1000;
|
|
|
|
|
+ setTimeout(async ()=>{
|
|
|
|
|
+ if (!isShowInstallBox())return;
|
|
|
|
|
+ global.showInstallBox();
|
|
|
|
|
+ },time);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ const checkOpenInChrome=()=>{
|
|
|
let time=200;
|
|
let time=200;
|
|
|
- // global.showBindPhone();
|
|
|
|
|
- // time=1000;
|
|
|
|
|
setTimeout(async ()=>{
|
|
setTimeout(async ()=>{
|
|
|
- // if (window.progressier==null)return ;
|
|
|
|
|
- // if (window.progressier.detection.isStandalone())return;
|
|
|
|
|
- // window.progressier.flow.init("install",true)
|
|
|
|
|
if (!isShowInstallBox())return;
|
|
if (!isShowInstallBox())return;
|
|
|
if (isInAppBrowser()){
|
|
if (isInAppBrowser()){
|
|
|
openUrlUseChrome();
|
|
openUrlUseChrome();
|
|
|
}
|
|
}
|
|
|
- global.showInstallBox();
|
|
|
|
|
},time);
|
|
},time);
|
|
|
}
|
|
}
|
|
|
//app Effect
|
|
//app Effect
|
|
@@ -311,23 +315,7 @@ const App = () => {
|
|
|
},[serverKick])
|
|
},[serverKick])
|
|
|
//监听安装提示
|
|
//监听安装提示
|
|
|
useEffect(()=>{
|
|
useEffect(()=>{
|
|
|
- // if (promoteInstall>0){
|
|
|
|
|
- // if (global.installed===1)return;
|
|
|
|
|
- // global.installed=1;
|
|
|
|
|
- // let time=promoteInstall*1000;
|
|
|
|
|
- // // global.showBindPhone();
|
|
|
|
|
- // // time=1000;
|
|
|
|
|
- // setTimeout(async ()=>{
|
|
|
|
|
- // // if (window.progressier==null)return ;
|
|
|
|
|
- // // if (window.progressier.detection.isStandalone())return;
|
|
|
|
|
- // // window.progressier.flow.init("install",true)
|
|
|
|
|
- // if (!isShowInstallBox())return;
|
|
|
|
|
- // if (isInAppBrowser()){
|
|
|
|
|
- // openUrlUseChrome();
|
|
|
|
|
- // }
|
|
|
|
|
- // global.showInstallBox();
|
|
|
|
|
- // },time);
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ checkOpenInstallBox();
|
|
|
},[promoteInstall])
|
|
},[promoteInstall])
|
|
|
//监听打开pay
|
|
//监听打开pay
|
|
|
useEffect(()=>{
|
|
useEffect(()=>{
|