From 1cc35b8e33f1b9df09865c552120b52c4af41154 Mon Sep 17 00:00:00 2001 From: tcubic <123456> Date: Mon, 1 Aug 2022 17:16:19 +0800 Subject: [PATCH] forceauth --- src/components/Index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Index.vue b/src/components/Index.vue index 1a92b43..cd852d3 100644 --- a/src/components/Index.vue +++ b/src/components/Index.vue @@ -180,7 +180,7 @@ const btn = () => { // 抽奖按钮 const drawBtn = ()=>{ console.log("抽奖:"); - console.log("授权:",getAuthorize(1)); +// console.log("授权:",getAuthorize(1)); // let href = window.location.href; // let h_idx = window.location.href.indexOf("#"); // let out_href = href.slice(0, h_idx); @@ -193,6 +193,16 @@ const drawBtn = ()=>{ // console.log("招商授权结果:",res); // }) + if (h5plugin.getQueryString("forceauth")) { + // H5P.getSetCookie('authState',1,{expires:0.5}) + console.log('yes-forceauth'); + getAuthorize(0); + } else { + // H5P.getSetCookie('authState',1,{expires:0.5}) + console.log('no-forceauth'); + getAuthorize(1); + } + }