1
This commit is contained in:
@@ -37,12 +37,13 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
// 第一个卡片(最下面)
|
// 第三个卡片(最上面)
|
||||||
&--1 {
|
&--3 {
|
||||||
width: 303.45px;
|
width: 311.91px;
|
||||||
left: 9px;
|
left: 0;
|
||||||
top: 114px;
|
top: 0;
|
||||||
transform: rotate(-2deg);
|
transform: rotate(2deg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 第二个卡片(中间)
|
// 第二个卡片(中间)
|
||||||
@@ -50,16 +51,19 @@
|
|||||||
width: 301.91px;
|
width: 301.91px;
|
||||||
left: 22px;
|
left: 22px;
|
||||||
top: 58px;
|
top: 58px;
|
||||||
transform: rotate(1.5deg);
|
transform: rotate(-2deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 第三个卡片(最上面)
|
|
||||||
&--3 {
|
// 第一个卡片(最下面)
|
||||||
width: 311.91px;
|
&--1 {
|
||||||
left: 0;
|
width: 303.45px;
|
||||||
top: 0;
|
left: 9px;
|
||||||
transform: rotate(-1deg);
|
top: 114px;
|
||||||
|
transform: rotate(4deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__avatar {
|
&__avatar {
|
||||||
@@ -91,6 +95,9 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.67;
|
line-height: 1.67;
|
||||||
color: rgba(0, 0, 0, 0.8);
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标题区域
|
// 标题区域
|
||||||
@@ -159,6 +166,22 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__qr_placeholder {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__qr_loading {
|
||||||
|
font-family: 'PingFang SC';
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
&__qr_text {
|
&__qr_text {
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -169,4 +192,3 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,49 @@
|
|||||||
import React from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { View, Text, Image } from '@tarojs/components';
|
import { View, Text, Image } from '@tarojs/components';
|
||||||
import { GeneralNavbar } from '@/components';
|
import { GeneralNavbar } from '@/components';
|
||||||
import { useGlobalState } from '@/store/global';
|
import { useGlobalState } from '@/store/global';
|
||||||
|
import httpService from '@/services/httpService';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
|
||||||
const EnableNotificationPage: React.FC = () => {
|
const EnableNotificationPage: React.FC = () => {
|
||||||
const { statusNavbarHeightInfo } = useGlobalState() || {};
|
const { statusNavbarHeightInfo } = useGlobalState() || {};
|
||||||
const { totalHeight = 98 } = statusNavbarHeightInfo || {};
|
const { totalHeight = 98 } = statusNavbarHeightInfo || {};
|
||||||
|
const [qrCodeUrl, setQrCodeUrl] = useState<string>('');
|
||||||
|
|
||||||
|
// 获取二维码
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchQRCode = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httpService.post('/parameter/many_key', {
|
||||||
|
keys: 'ServiceAccountQRCode',
|
||||||
|
});
|
||||||
|
if (res.code === 0 && res.data?.ServiceAccountQRCode) {
|
||||||
|
setQrCodeUrl(res.data.ServiceAccountQRCode);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取二维码失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
fetchQRCode();
|
||||||
|
}, []);
|
||||||
|
|
||||||
// 示例消息数据
|
// 示例消息数据
|
||||||
const exampleMessages = [
|
const exampleMessages = [
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
avatar: require('@/static/userInfo/default_avatar.svg'),
|
avatar: require('@/static/other_pages/albert-avatar.png'),
|
||||||
name: 'Albert',
|
name: 'Albert',
|
||||||
content: '发现一家宝藏新球场,周末一起去试试吗?',
|
content: '发现一家宝藏新球场,周末一起去试试吗?',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
avatar: require('@/static/userInfo/default_avatar.svg'),
|
avatar: require('@/static/other_pages/evelyn-avatar.png'),
|
||||||
name: 'Evelyn',
|
name: 'Evelyn',
|
||||||
content: '周五晚混双比赛,寻找NTRP 3.5队友!',
|
content: '周五晚混双比赛,寻找NTRP 3.5队友!',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '3',
|
id: '3',
|
||||||
avatar: require('@/static/userInfo/default_avatar.svg'),
|
avatar: require('@/static/other_pages/cici-avatar.png'),
|
||||||
name: 'CiCi',
|
name: 'CiCi',
|
||||||
content: '我也在黄浦,明早8点晨练打球吗?',
|
content: '我也在黄浦,明早8点晨练打球吗?',
|
||||||
},
|
},
|
||||||
@@ -64,11 +83,17 @@ const EnableNotificationPage: React.FC = () => {
|
|||||||
{/* 二维码区域 */}
|
{/* 二维码区域 */}
|
||||||
<View className="enable_notification_page__qr_section">
|
<View className="enable_notification_page__qr_section">
|
||||||
<View className="enable_notification_page__qr_wrapper">
|
<View className="enable_notification_page__qr_wrapper">
|
||||||
<Image
|
{qrCodeUrl ? (
|
||||||
className="enable_notification_page__qr_image"
|
<Image
|
||||||
src={require('@/static/other_pages/qr_code.svg')}
|
className="enable_notification_page__qr_image"
|
||||||
mode="aspectFit"
|
src={qrCodeUrl}
|
||||||
/>
|
mode="aspectFit"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<View className="enable_notification_page__qr_placeholder">
|
||||||
|
<Text className="enable_notification_page__qr_loading">加载中...</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
<Text className="enable_notification_page__qr_text">长按关注👆开启提醒</Text>
|
<Text className="enable_notification_page__qr_text">长按关注👆开启提醒</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
BIN
src/static/other_pages/albert-avatar.png
Normal file
BIN
src/static/other_pages/albert-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
BIN
src/static/other_pages/cici-avatar.png
Normal file
BIN
src/static/other_pages/cici-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/static/other_pages/evelyn-avatar.png
Normal file
BIN
src/static/other_pages/evelyn-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user