feat: 幕帘-二维码加好友
This commit is contained in:
28
src/componments/Model/index.jsx
Normal file
28
src/componments/Model/index.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
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 { useEffect, useState } from "react";
|
||||
const Model = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return <View className="Model"></View>;
|
||||
};
|
||||
|
||||
export default Model;
|
||||
0
src/componments/Model/index.scss
Normal file
0
src/componments/Model/index.scss
Normal file
83
src/componments/QrCode/index.jsx
Normal file
83
src/componments/QrCode/index.jsx
Normal file
@@ -0,0 +1,83 @@
|
||||
import { View, Text, Image, Button, Icon, Dialog } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtModal,
|
||||
AtModalHeader,
|
||||
AtModalContent,
|
||||
AtModalAction,
|
||||
AtCurtain,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import QRcodePng from "@/images/index/QRcode.png";
|
||||
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const QrCode = (props) => {
|
||||
console.log("props", props);
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
useEffect(() => {
|
||||
setisOpened(props.isOpened);
|
||||
}, [props.isOpened]);
|
||||
|
||||
const Qrcode = () => {
|
||||
return (
|
||||
<View className="wechatCode">
|
||||
<View>长按识别二维码</View>
|
||||
<Image
|
||||
style={{ width: "100px", height: "100px" }}
|
||||
showMenuByLongpress={true}
|
||||
src={QRcodePng}
|
||||
// src='cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/touxiang/download-1.jpg'
|
||||
></Image>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<View className="QrCode">
|
||||
{/* <AtModal
|
||||
isOpened={isOpened}
|
||||
title="长按识别二维码"
|
||||
cancelText="取消"
|
||||
confirmText="确认"
|
||||
onClose={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
onCancel={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
onConfirm={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
content={Qrcode}
|
||||
/> */}
|
||||
|
||||
<AtCurtain
|
||||
isOpened={isOpened}
|
||||
closeBtnPosition="top-right"
|
||||
onClose={() => {
|
||||
setisOpened(false);
|
||||
// 设置父组件状态
|
||||
props.setisOpened(false);
|
||||
}}
|
||||
>
|
||||
<Qrcode />
|
||||
</AtCurtain>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default QrCode;
|
||||
13
src/componments/QrCode/index.scss
Normal file
13
src/componments/QrCode/index.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.QrCode{
|
||||
|
||||
.wechatCode{
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user