feat: 幕帘-二维码加好友

This commit is contained in:
hackrobot
2024-03-20 00:20:55 +08:00
parent 0335e02af9
commit cf671a6388
8 changed files with 152 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ import shanghai from "@/images/city/shanghai.jpg";
import shenzhen from "@/images/city/shenzhen.jpg";
import touxiang from "@/images/index/touxiang.jpg";
import TabbarCom from "@/componments/TabbarCom";
import QrCode from "@/componments/QrCode";
import { useEffect, useState } from "react";
// import beijing from "../../images/city/beijing.jpg";
@@ -16,6 +17,7 @@ import { useEffect, useState } from "react";
export default function Index() {
// 用户基本信息
const [userInfo, setuserInfo] = useState({});
const [isOpened, setisOpened] = useState(false);
useLoad(() => {
console.log("Page loaded.");
@@ -46,9 +48,14 @@ export default function Index() {
}, []);
// 自定义组件
const CustomTest = () => {
const JoinWechat = () => {
return (
<View className="CustomTest">
<View
className="CustomTest"
onClick={() => {
setisOpened(true);
}}
>
<View className="CustomHeader">🥂加入微信群-meetup</View>
{/* <View className="CustomAvatar">
<AtAvatar
@@ -59,7 +66,7 @@ export default function Index() {
></AtAvatar>
</View> */}
<View className="CustomAvatar">
{[1, 2, 3, 4,5,6,7].map((item, index) => {
{[1, 2, 3, 4, 5, 6, 7].map((item, index) => {
return (
<AtAvatar
className="AtAvatar"
@@ -85,10 +92,10 @@ export default function Index() {
},
// 双数插入
{
cityName: "上海",
cityName: "加入微信群",
imagePath: shanghai,
isCustom: true,
customCom: <CustomTest />,
customCom: <JoinWechat />,
},
{
cityName: "上海",
@@ -97,10 +104,10 @@ export default function Index() {
customCom: "test",
},
// {
// cityName: "上海",
// cityName: "同城活动",
// imagePath: shanghai,
// isCustom: true,
// customCom: <CustomTest />,
// customCom: <JoinWechat />,
// },
{
cityName: "广州",
@@ -112,7 +119,7 @@ export default function Index() {
// cityName: "上海",
// imagePath: shanghai,
// isCustom: true,
// customCom: <CustomTest />,
// customCom: <JoinWechat />,
// },
{
cityName: "深圳",
@@ -120,6 +127,12 @@ export default function Index() {
isCustom: false,
customCom: "test",
},
// {
// cityName: "腾讯云推广",
// imagePath: shanghai,
// isCustom: true,
// customCom: <JoinWechat />,
// },
].map((item, index) => {
return (
// 设置自动换行
@@ -187,6 +200,7 @@ export default function Index() {
{/* 底部tabbar */}
<TabbarCom active={0} />
<QrCode isOpened={isOpened} setisOpened={setisOpened} />
</View>
);
}

View File

@@ -32,20 +32,20 @@ const my = () => {
{/* 头像 */}
<AtAvatar circle image={touxiang}></AtAvatar>
<View>
<AtTag size="small">昵称</AtTag>
<AtTag size="small"></AtTag>
<AtTag size="small">星球新居民</AtTag>
{/* <AtTag size="small">女</AtTag> */}
</View>
</View>
{/* 列表 */}
<View className="mylist">
<AtListItem
title="标题文字1"
title="我参加的"
arrow="right"
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
/>
<AtListItem
title="标题文字2"
title="个人资料"
// note="描述信息"
arrow="right"
thumb="http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png"

View File

@@ -9,7 +9,8 @@
flex-direction: column;
align-items: center;
justify-content: center;
background-color: yellow;
background-color: #f4ffb8;
border-radius: 20px;
}
.mylist {