feat: 修改域名加群

This commit is contained in:
hackrobot
2024-03-25 09:38:13 +08:00
parent 21c927b483
commit 4e16b51e2c
2 changed files with 18 additions and 8 deletions

View File

@@ -26,10 +26,8 @@ const KeywordJoin = () => {
const [current, setcurrent] = useState(0); const [current, setcurrent] = useState(0);
const [value, setvalue] = useState(null); const [value, setvalue] = useState(null);
const [userInfo, setuserInfo] = useState({ const [localuserInfo, setlocaluserInfo] = useState(Taro.getStorageSync("userInfo"));
wxid: null,
openId: null,
});
@@ -124,15 +122,26 @@ const KeywordJoin = () => {
<View className="at-article__h3">群公告</View> <View className="at-article__h3">群公告</View>
{/* 文本段落 */} {/* 文本段落 */}
<View className="at-article__p"> <View className="at-article__p">
这是文本段落这是文本段落这是文本段落这是文本段落这是文本段落 交流自由职业/副业,数字游民等话题
</View> </View>
<View className="at-article__p">这是文本段落这是文本段落</View> <View className="at-article__p">请不要打广告</View>
</View> </View>
</View> </View>
</View> </View>
<View className="tabbbarDiv"></View> <View className="tabbbarDiv"></View>
<AtButton type="primary" className="jsonWechatBtn" onClick={()=>{ <AtButton type="primary" className="jsonWechatBtn" onClick={()=>{
// 通过hook加入微信群邀请 // 通过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('加入微信群成功');
},
});
}}> }}>
点击加入 点击加入
</AtButton> </AtButton>

View File

@@ -71,7 +71,7 @@ export default function Index() {
// const [wxid, openId] = params; // const [wxid, openId] = params;
// debug // debug
params.wxid = "wxid_4413224132412"; // params.wxid = "wxid_4413224132412";
if (params?.wxid) { if (params?.wxid) {
setuserInfo({ setuserInfo({
wxid: params?.wxid, //个人号wxid wxid: params?.wxid, //个人号wxid
@@ -84,7 +84,8 @@ export default function Index() {
if (res.code) { if (res.code) {
//发起网络请求 //发起网络请求
Taro.request({ 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: { data: {
code: res.code, code: res.code,
wxid: params?.wxid ?? null, //debug eric 的wxid wxid: params?.wxid ?? null, //debug eric 的wxid