From 61e588affed5f19f3bfafa4f9dbc034a21532fb1 Mon Sep 17 00:00:00 2001 From: hackrobot Date: Thu, 11 Apr 2024 10:41:28 +0800 Subject: [PATCH] wqqwfwq --- src/pages/index/index.jsx | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index 8d7623a..32010ba 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -55,27 +55,7 @@ const Index = () => { - // // 获取用户标识符 - // useEffect(() => { - // // 获取路由参数 - // const params = Taro.getCurrentInstance().router.params; - // console.log("params", params); - // let localwxid = window.localStorage.getItem("wxid"); - // let localh5openid = window.localStorage.getItem("h5openid"); - // if ( - // params?.wxid && - // (!localh5openid || - // localh5openid == "undefined" || - // localh5openid == "null") - // ) { - // // 本地存储 - // window.localStorage.setItem("wxid", params?.wxid ?? ""); - // // alert(params?.wxid); - // setwxid(params?.wxid); - // getopenId(); - // } - // }, []); const onBridgeReady = () => { WeixinJSBridge.call("hideOptionMenu"); @@ -90,9 +70,6 @@ const Index = () => { const params = Taro.getCurrentInstance().router.params; let hashopenid = window.localStorage.getItem("h5openid"); let localwxid = window.localStorage.getItem("wxid"); - // window.alert("hashopenid1", hashopenid); - // window.alert("localwxid2", localwxid); - //发起网络请求 Taro.request({ // url: "/api/addH5openid", @@ -108,7 +85,6 @@ const Index = () => { }, }); } catch (e) { - // alert(e); } finally { } }; @@ -145,10 +121,8 @@ const Index = () => { if (params?.wxid) { // 本地存储 window.localStorage.setItem("wxid", params?.wxid ?? ""); - // alert(params?.wxid); setwxid(params?.wxid); let nowUrl = window.location.href; - // alert(nowUrl); let payUrl = `https://payjs.cn/api/openid?mchid=1561724891&callback_url=${nowUrl}`; window.location.href = payUrl; }else{ @@ -159,17 +133,8 @@ const Index = () => { } }; - // useEffect(() => { - // let nowUrl = window.location.href; - // let localh5openid = window.localStorage.getItem("h5openid"); - // let localwxid = window.localStorage.getItem("wxid"); - // alert("localh5openid==>" + localh5openid); - // alert("localwxid==>" + localwxid); - // alert(nowUrl); - // }); const joinmeet = () => { - // alert(window.localStorage.getItem("openid")); Taro.request({ method: "POST", url: "/api/payh5", //仅为示例,并非真实的接口地址 @@ -227,7 +192,6 @@ const Index = () => { }, success: function (resUser) { console.log("resUser--", resUser); - // alert(resUser?.data?.success); console.log("加入微信群成功"); if (resUser?.data?.success == "fail") { //已经在群聊中