From ce31b6914f68833ff8a9d596bdad69d42dac336d Mon Sep 17 00:00:00 2001 From: Ultrame <1019265060@qq.com> Date: Tue, 28 Oct 2025 22:10:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BackNavbar/index.tsx | 5 +++- src/user_pages/downloadBill/index.tsx | 25 ++++++++++++------- src/user_pages/downloadBillRecords/index.tsx | 15 ++++++++--- src/user_pages/edit/index.tsx | 22 +++++++++++----- src/user_pages/queryTransactions/index.tsx | 15 ++++++++--- .../setTransactionPassword/index.tsx | 14 +++++++++-- src/user_pages/validPhone/index.tsx | 14 +++++++++-- src/user_pages/wallet/index.tsx | 15 ++++++++--- src/user_pages/withdrawal/index.tsx | 20 ++++++++++++--- 9 files changed, 113 insertions(+), 32 deletions(-) diff --git a/src/components/BackNavbar/index.tsx b/src/components/BackNavbar/index.tsx index 80c7669..a5d1770 100644 --- a/src/components/BackNavbar/index.tsx +++ b/src/components/BackNavbar/index.tsx @@ -9,6 +9,7 @@ interface BackNavbarProps { title?: string; showAvatar?: boolean; showBackButton?: boolean; + backgroundColor?: string; onBack?: () => void; className?: string; } @@ -17,6 +18,7 @@ const BackNavbar: React.FC = ({ title = '消息', showAvatar = true, showBackButton = false, + backgroundColor, onBack, className = '' }) => { @@ -36,7 +38,8 @@ const BackNavbar: React.FC = ({ className={`back-navbar ${className}`} style={{ paddingTop: `${statusBarHeight}px`, - height: `${totalHeight}px` + height: `${totalHeight}px`, + backgroundColor: backgroundColor || "#ffffff" }} > { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> 最长可导出三个月的账单 @@ -306,9 +315,8 @@ const DownloadBill: React.FC = () => { 近一周 { selectDateRange("month"); }} @@ -316,9 +324,8 @@ const DownloadBill: React.FC = () => { 近一月 { selectDateRange("custom"); }} diff --git a/src/user_pages/downloadBillRecords/index.tsx b/src/user_pages/downloadBillRecords/index.tsx index d6edf52..fdd6aa7 100644 --- a/src/user_pages/downloadBillRecords/index.tsx +++ b/src/user_pages/downloadBillRecords/index.tsx @@ -5,7 +5,7 @@ import "./index.scss"; import httpService from "@/services/httpService"; import Taro, { useReachBottom } from "@tarojs/taro"; import img from "@/config/images"; -import { EmptyState } from "@/components"; +import { EmptyState, BackNavbar } from "@/components"; interface BillRecord { id: number; @@ -65,7 +65,7 @@ const DownloadBillRecords: React.FC = () => { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> {records.length ? records.map((record) => ( diff --git a/src/user_pages/edit/index.tsx b/src/user_pages/edit/index.tsx index d2a3a6c..313b06a 100644 --- a/src/user_pages/edit/index.tsx +++ b/src/user_pages/edit/index.tsx @@ -6,7 +6,7 @@ import "./index.scss"; import { UserService, PickerOption } from "@/services/userService"; import { clear_login_state } from "@/services/loginService"; import { convert_db_gender_to_display } from "@/utils/genderUtils"; -import { EditModal } from "@/components"; +import { EditModal, BackNavbar } from "@/components"; import img from "@/config/images"; import CommonDialog from "@/components/CommonDialog"; import { useUserActions, useUserInfo } from "@/store/userStore"; @@ -350,7 +350,7 @@ const EditProfilePage: React.FC = () => { return ( {/* 导航栏 */} - + {/* { /> - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> {/* 主要内容 */} {loading ? ( @@ -593,9 +603,9 @@ const EditProfilePage: React.FC = () => { > {form_data.phone ? form_data.phone.replace( - /(\d{3})(\d{4})(\d{4})/, - "$1 $2 $3" - ) + /(\d{3})(\d{4})(\d{4})/, + "$1 $2 $3" + ) : "未绑定"} { <> {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> {/* 搜索 */} diff --git a/src/user_pages/setTransactionPassword/index.tsx b/src/user_pages/setTransactionPassword/index.tsx index 8ef29c2..8a1871d 100644 --- a/src/user_pages/setTransactionPassword/index.tsx +++ b/src/user_pages/setTransactionPassword/index.tsx @@ -6,6 +6,7 @@ import "./index.scss"; import httpService from "@/services/httpService"; import { useKeyboardHeight } from "@/store/keyboardStore"; import img from "@/config/images"; +import { BackNavbar } from "@/components"; interface FormFields { new_password: string; @@ -137,7 +138,7 @@ const SetTransactionPassword: React.FC = () => { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> 交易密码 { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> 手机号 diff --git a/src/user_pages/wallet/index.tsx b/src/user_pages/wallet/index.tsx index 9c06dc9..3b6a1a5 100644 --- a/src/user_pages/wallet/index.tsx +++ b/src/user_pages/wallet/index.tsx @@ -4,7 +4,7 @@ import Taro, { useDidShow, useReachBottom } from "@tarojs/taro"; import "./index.scss"; import { CommonPopup, EmptyState } from "@/components"; import httpService from "@/services/httpService"; -import { withAuth } from "@/components"; +import { withAuth, BackNavbar } from "@/components"; import { PopupPicker } from "@/components/Picker/index"; import { handleCustomerService } from "@/services/userService"; import img from "@/config/images"; @@ -460,7 +460,7 @@ const WalletPage: React.FC = () => { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + Taro.navigateBack(); + }} + /> {/* 钱包主卡片 */} {/* 头部信息 */} diff --git a/src/user_pages/withdrawal/index.tsx b/src/user_pages/withdrawal/index.tsx index a5bba61..b43ef01 100644 --- a/src/user_pages/withdrawal/index.tsx +++ b/src/user_pages/withdrawal/index.tsx @@ -4,7 +4,7 @@ import Taro, { useDidShow } from "@tarojs/taro"; import httpService from "@/services/httpService"; import "./index.scss"; -import { CommonPopup } from "@/components"; +import { CommonPopup, BackNavbar } from "@/components"; import { useKeyboardHeight } from "@/store/keyboardStore"; import img from "@/config/images"; @@ -276,7 +276,7 @@ const Withdrawal: React.FC = () => { return ( {/* 导航栏 */} - + {/* { {pageTitle} - + */} + {/* 顶部导航栏 */} + { + const pages = Taro.getCurrentPages() + const prevPage = pages[pages.length - 2] + prevPage.setData({ + updateList: withdrawSuccess + }) + Taro.navigateBack(); + }} + /> 提现金额