From 4e16b51e2c53defa86cf9689d0e31aeed3cae2bc Mon Sep 17 00:00:00 2001 From: hackrobot Date: Mon, 25 Mar 2024 09:38:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E5=8A=A0=E7=BE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index/componments/KeywordJoin/index.jsx | 21 +++++++++++++------ src/pages/index/index.jsx | 5 +++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/pages/index/componments/KeywordJoin/index.jsx b/src/pages/index/componments/KeywordJoin/index.jsx index c2f8c0c..a5753ed 100644 --- a/src/pages/index/componments/KeywordJoin/index.jsx +++ b/src/pages/index/componments/KeywordJoin/index.jsx @@ -26,10 +26,8 @@ const KeywordJoin = () => { const [current, setcurrent] = useState(0); const [value, setvalue] = useState(null); - const [userInfo, setuserInfo] = useState({ - wxid: null, - openId: null, - }); + const [localuserInfo, setlocaluserInfo] = useState(Taro.getStorageSync("userInfo")); + @@ -124,15 +122,26 @@ const KeywordJoin = () => { 群公告 {/* 文本段落 */} - 这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本段落。 + 交流自由职业/副业,数字游民等话题 - 这是文本段落。这是文本段落。 + 请不要打广告 { // 通过hook加入微信群邀请 + //发起网络请求 + Taro.request({ + // url: "http://127.0.0.1:28369/joingroup", + url: "https://kunpeng.hackrobot.cn/joingroup", + data: { + wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid + }, + success: function (resUser) { + console.log('加入微信群成功'); + }, + }); }}> 点击加入 diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index 47f26f3..4f24862 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -71,7 +71,7 @@ export default function Index() { // const [wxid, openId] = params; // debug - params.wxid = "wxid_4413224132412"; + // params.wxid = "wxid_4413224132412"; if (params?.wxid) { setuserInfo({ wxid: params?.wxid, //个人号wxid @@ -84,7 +84,8 @@ export default function Index() { if (res.code) { //发起网络请求 Taro.request({ - url: "http://127.0.0.1:28369/login", + // url: "http://127.0.0.1:28369/login", + url: "https://kunpeng.hackrobot.cn/login", data: { code: res.code, wxid: params?.wxid ?? null, //debug eric 的wxid