feat: 微信群加入判断
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtMessage
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
@@ -32,12 +32,27 @@ import { useEffect, useState } from "react";
|
||||
const JoinWechat = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
|
||||
// 用户基本信息
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
return (
|
||||
<View
|
||||
className="JoinWechat"
|
||||
onClick={() => {
|
||||
setisOpened(true);
|
||||
// 判断群组内是否包含wxid
|
||||
// pass
|
||||
|
||||
// 判断目前是否辨识wxid
|
||||
if (localuserInfo?.wxid) {
|
||||
// 跳转答题页面=入群
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/KeywordJoin/index",
|
||||
});
|
||||
} else {
|
||||
// 显示二维码-个人名片
|
||||
setisOpened(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<View className="CustomHeader">🥂加入微信群-meetup</View>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user