This commit is contained in:
张成
2025-12-09 14:12:43 +08:00
parent 9475790a3d
commit 0d2d2e8c9f
3 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
export default definePageConfig({
navigationBarTitleText: '',
navigationStyle: 'custom',
navigationBarBackgroundColor: '#FFFFFF',
backgroundColor: '#FFFFFF',
});

View File

@@ -1,6 +1,5 @@
.empty_state_page {
width: 100%;
min-height: 100vh;
// 白色渐变背景(从设计稿参考)
background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
position: relative;

View File

@@ -2,7 +2,7 @@
* 空状态页面
* 当球局不存在或已删除时显示的独立页面
*/
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import { View, Text, Image } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { useGlobalState } from '@/store/global';
@@ -31,25 +31,31 @@ function Index() {
// 跳转到其他球局 - 返回首页列表
const handle_go_to_other_games = () => {
Taro.redirectTo({
(Taro as any).redirectTo({
url: '/main_pages/index',
});
};
// 返回首页
const handle_go_to_home = () => {
const pages = Taro.getCurrentPages();
const pages = (Taro as any).getCurrentPages();
if (pages.length <= 1) {
Taro.redirectTo({
(Taro as any).redirectTo({
url: '/main_pages/index',
});
} else {
Taro.navigateBack();
(Taro as any).navigateBack();
}
};
return (
<View className="empty_state_page" style={{ paddingTop: `${totalHeight}px` }}>
<View
className="empty_state_page"
style={{
paddingTop: `${totalHeight}px`,
backgroundColor: '#FFFFFF'
}}
>
<GeneralNavbar title="" showBack={true} />
<View className="empty_state_page__content">