feat: 微信群加入判断
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
AtAccordion,
|
AtAccordion,
|
||||||
AtList,
|
AtList,
|
||||||
AtListItem,
|
AtListItem,
|
||||||
AtMessage
|
AtMessage,
|
||||||
} from "taro-ui";
|
} from "taro-ui";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import beijing from "@/images/city/beijing.jpg";
|
import beijing from "@/images/city/beijing.jpg";
|
||||||
@@ -32,12 +32,27 @@ import { useEffect, useState } from "react";
|
|||||||
const JoinWechat = () => {
|
const JoinWechat = () => {
|
||||||
const [open, setopen] = useState(false);
|
const [open, setopen] = useState(false);
|
||||||
const [isOpened, setisOpened] = useState(false);
|
const [isOpened, setisOpened] = useState(false);
|
||||||
|
// 用户基本信息
|
||||||
|
const [localuserInfo, setlocaluserInfo] = useState(
|
||||||
|
Taro.getStorageSync("userInfo")
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
className="JoinWechat"
|
className="JoinWechat"
|
||||||
onClick={() => {
|
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>
|
<View className="CustomHeader">🥂加入微信群-meetup</View>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user