From 0d2d2e8c9fb3c73861bf121cde76c344d274e62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Tue, 9 Dec 2025 14:12:43 +0800 Subject: [PATCH] 1 --- src/other_pages/emptyState/index.config.ts | 2 ++ src/other_pages/emptyState/index.scss | 1 - src/other_pages/emptyState/index.tsx | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/other_pages/emptyState/index.config.ts b/src/other_pages/emptyState/index.config.ts index f8662af..84727d0 100644 --- a/src/other_pages/emptyState/index.config.ts +++ b/src/other_pages/emptyState/index.config.ts @@ -1,5 +1,7 @@ export default definePageConfig({ navigationBarTitleText: '', navigationStyle: 'custom', + navigationBarBackgroundColor: '#FFFFFF', + backgroundColor: '#FFFFFF', }); diff --git a/src/other_pages/emptyState/index.scss b/src/other_pages/emptyState/index.scss index 66ab5ed..9a5b7cd 100644 --- a/src/other_pages/emptyState/index.scss +++ b/src/other_pages/emptyState/index.scss @@ -1,6 +1,5 @@ .empty_state_page { width: 100%; - min-height: 100vh; // 白色渐变背景(从设计稿参考) background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%); position: relative; diff --git a/src/other_pages/emptyState/index.tsx b/src/other_pages/emptyState/index.tsx index 78b1f21..b2e86d9 100644 --- a/src/other_pages/emptyState/index.tsx +++ b/src/other_pages/emptyState/index.tsx @@ -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 ( - +