Files
mini-programs/src/user_pages/joinGroup/index.tsx
2025-12-01 16:58:40 +08:00

58 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React, { useState, useEffect } from "react";
import { View, Text, Image } from "@tarojs/components";
import Taro from "@tarojs/taro";
import "./index.scss";
import { useGlobalState } from "@/store/global";
import { GeneralNavbar } from "@/components";
import httpService from "@/services/httpService";
const JoinGroupPage: React.FC = () => {
// 获取导航栏高度信息
const { statusNavbarHeightInfo } = useGlobalState() || {};
const { totalHeight = 98 } = statusNavbarHeightInfo || {};
const [url, setUrl] = useState("");
useEffect(() => {
const getQrCode = async () => {
const res = await httpService.post("/parameter/many_key", {
keys: "QRCode",
});
setUrl(res.data.QRCode);
};
getQrCode();
}, []);
return (
<View className="page_container">
{/* 顶部导航栏 */}
<GeneralNavbar
title=""
showBack={true}
showAvatar={false}
onBack={() => {
Taro.navigateBack();
}}
/>
{/* 主要内容 */}
<View className="main_content" style={{ paddingTop: `${totalHeight}px` }}>
<Text className="title-text"></Text>
<Text></Text>
<Image
className="qrcode"
mode="scaleToFill"
src={url}
showMenuByLongpress
></Image>
<Text className="hint-text">👆使</Text>
<Text></Text>
<Text></Text>
<Text></Text>
<Text></Text>
</View>
</View>
);
};
export default JoinGroupPage;