提交 751ee552 编写于 作者: ping zhang's avatar ping zhang

模拟点击 自动唤醒app

上级 e0144cfd
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
/> />
</no-ssr> </no-ssr>
<finish-toast v-if="isGameOver"></finish-toast> <finish-toast v-if="isGameOver"></finish-toast>
<div ref="ck" style="display: none" @click="openApp"></div>
</section> </section>
</template> </template>
...@@ -186,12 +187,6 @@ ...@@ -186,12 +187,6 @@
}, },
mounted() { mounted() {
if (this.$rocNative.isWeb) {
import('pica-call-app').then(module => {
module.callApp();
});
// window.location.href = `picado://picahealth/${window.location.href}`;
}
this.$rocNative.appInit(); this.$rocNative.appInit();
this.isWeb = this.$rocNative.isWeb; this.isWeb = this.$rocNative.isWeb;
this.shareObj = { this.shareObj = {
...@@ -227,9 +222,18 @@ ...@@ -227,9 +222,18 @@
window.__refresh = function(params) { window.__refresh = function(params) {
_this.getUserInfo(); // 判断是否登录 _this.getUserInfo(); // 判断是否登录
} }
setTimeout(() => {
this.$refs['ck'].click();
}, 0);
}, },
methods: { methods: {
openApp() {
if (this.$rocNative.isWeb) {
import('pica-call-app').then(module => {
module.callApp();
});
}
},
goToRule() { goToRule() {
if(this.isWeb) { if(this.isWeb) {
window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=628' window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=628'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册