feat: add guide route and message page and empty person page

This commit is contained in:
2025-08-26 19:29:34 +08:00
parent e51015b447
commit 924afbb3cf
18 changed files with 417 additions and 2 deletions

View File

@@ -0,0 +1,88 @@
@use '~@/scss/images.scss' as img;
.guide-bar-container {
padding-top: calc(60px + 20px + env(safe-area-inset-bottom));
}
.guide-bar {
position: fixed;
bottom: 0;
width: 100%;
height: calc(60px + 20px + env(safe-area-inset-bottom));
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 12px env(safe-area-inset-bottom);
&-pages {
display: flex;
justify-content: space-between;
align-items: center;
display: inline-flex;
height: 60px;
padding: 8px 6px;
box-sizing: border-box;
flex-shrink: 0;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.20);
background: rgba(255, 255, 255, 0.40);
box-shadow: 0 4px 64px 0 rgba(0, 0, 0, 0.16);
backdrop-filter: blur(16px);
&-item {
display: flex;
width: 76px;
height: 48px;
padding: 14px 22px;
box-sizing: border-box;
justify-content: center;
align-items: center;
gap: 10px;
color: rgba(60, 60, 67, 0.60);
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 20px; /* 125% */
}
&-item-active {
display: flex;
width: 76px;
height: 48px;
padding: 14px 22px;
box-sizing: border-box;
justify-content: center;
align-items: center;
gap: 10px;
border-radius: 999px;
border: 0.5px solid rgba(0, 0, 0, 0.06);
background: #FFF;
box-shadow: 0 4px 48px 0 rgba(0, 0, 0, 0.08);
color: #000;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 20px; /* 125% */
}
}
&-publish {
display: flex;
width: 60px;
height: 60px;
justify-content: center;
align-items: center;
flex-shrink: 0;
border-radius: 999px;
// border: 2px solid rgba(0, 0, 0, 0.06);
background: radial-gradient(75.92% 98.69% at 26.67% 8.33%, #BDFF4A 16.88%, #95F23E 54.19%, #32D838 100%);
box-shadow: 0 4px 48px 0 rgba(0, 0, 0, 0.08);
backdrop-filter: blur(16px);
&-icon {
width: 36px;
height: 36px;
}
}
}

View File

@@ -0,0 +1,70 @@
import React, { useState } from 'react'
import { View, Text, Image } from '@tarojs/components'
import Taro from '@tarojs/taro'
import img from '@/config/images'
import './index.scss'
export type currentPageType = 'games' | 'message' | 'personal'
const GuideBar = (props) => {
const { currentPage } = props
const guideItems = [
{
code: 'list',
text: '球局',
},
{
code: 'message',
text: '消息',
},
{
code: 'personal',
text: '我的',
},
]
const handlePublish = () => {
Taro.navigateTo({
url: '/pages/publishBall/index',
})
}
const handlePageChange = (code: string) => {
if (code === currentPage) {
return
}
Taro.navigateTo({
url: `/pages/${code}/index`,
}).then(() => {
Taro.pageScrollTo({
scrollTop: 0,
duration: 300,
})
})
}
return (
<View className='guide-bar-container'>
<View className='guide-bar'>
{/* guide area on the left */}
<View className='guide-bar-pages'>
{guideItems.map((item) => (
<View
className={`guide-bar-pages-item ${currentPage === item.code ? 'guide-bar-pages-item-active' : ''}`}
onClick={() => handlePageChange(item.code)}
>
<Text>{item.text}</Text>
</View>
))}
</View>
{/* publish button on the right */}
<View className='guide-bar-publish' onClick={handlePublish}>
<Image className='guide-bar-publish-icon' src={img.ICON_GUIDE_BAR_PUBLISH} />
</View>
</View>
</View>
)
}
export default GuideBar