debug: 删除wxid=toast调试代码
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
import { View, Text, Image } from "@tarojs/components";
|
import { View, Text, Image } from "@tarojs/components";
|
||||||
import { useLoad } from "@tarojs/taro";
|
import { useLoad } from "@tarojs/taro";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import { AtAvatar, AtTag, AtIcon, AtTabBar, AtButton } from "taro-ui";
|
import {
|
||||||
|
AtAvatar,
|
||||||
|
AtTag,
|
||||||
|
AtIcon,
|
||||||
|
AtTabBar,
|
||||||
|
AtButton,
|
||||||
|
AtMessage,
|
||||||
|
} from "taro-ui";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import beijing from "@/images/city/beijing.jpg";
|
import beijing from "@/images/city/beijing.jpg";
|
||||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||||
@@ -40,17 +47,16 @@ export default function Index() {
|
|||||||
const params = Taro.getCurrentInstance().router.params;
|
const params = Taro.getCurrentInstance().router.params;
|
||||||
console.log("params", params);
|
console.log("params", params);
|
||||||
// const [wxid, openId] = params;
|
// const [wxid, openId] = params;
|
||||||
setuserInfo({
|
|
||||||
wxid: params?.wxid, //个人号wxid
|
if (params.wxid) {
|
||||||
// openId: params?.openId, //小程序openid
|
setuserInfo({
|
||||||
});
|
wxid: params?.wxid, //个人号wxid
|
||||||
if (wxid) {
|
// openId: params?.openId, //小程序openid
|
||||||
|
});
|
||||||
// 本地存储
|
// 本地存储
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Taro.setStorage({
|
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||||
wxid: wxid,
|
|
||||||
openId: openId,
|
|
||||||
});
|
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@@ -197,7 +203,15 @@ export default function Index() {
|
|||||||
return ["北京", "上海", "广东", "浙江", "湖北"].map((item, index) => {
|
return ["北京", "上海", "广东", "浙江", "湖北"].map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<AtTag type="primary" circle>
|
<AtTag
|
||||||
|
onClick={() => {
|
||||||
|
Taro.redirectTo({
|
||||||
|
url: "/pages/index/index?wxid=1111111",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
type="primary"
|
||||||
|
circle
|
||||||
|
>
|
||||||
{item}
|
{item}
|
||||||
</AtTag>
|
</AtTag>
|
||||||
</View>
|
</View>
|
||||||
@@ -232,6 +246,7 @@ export default function Index() {
|
|||||||
|
|
||||||
<TabbarCom active={0} />
|
<TabbarCom active={0} />
|
||||||
<QrCode isOpened={isOpened} setisOpened={setisOpened} />
|
<QrCode isOpened={isOpened} setisOpened={setisOpened} />
|
||||||
|
<AtMessage />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user