自定义title
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "钱包",
|
||||
navigationBarBackgroundColor: "#ffffff",
|
||||
navigationBarTextStyle: "black",
|
||||
backgroundColor: "#f5f5f5",
|
||||
enablePullDownRefresh: false,
|
||||
disableScroll: false,
|
||||
navigationStyle: "custom",
|
||||
});
|
||||
|
||||
@@ -10,6 +10,49 @@
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.custom-navbar {
|
||||
height: 56px;
|
||||
/* 通常与原生导航栏高度一致 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// background-color: #fff;
|
||||
color: #000;
|
||||
padding-top: 44px;
|
||||
/* 适配状态栏 */
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.detail-navigator {
|
||||
height: 30px;
|
||||
width: fit-content;
|
||||
border-radius: 15px;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.detail-navigator-back {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 600;
|
||||
font-style: Semibold;
|
||||
font-size: 20px;
|
||||
letter-spacing: 0.38px;
|
||||
|
||||
& > .detail-navigator-back-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wallet_main_card {
|
||||
background: #000;
|
||||
@@ -33,7 +76,7 @@
|
||||
.modify_password {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #007AFF;
|
||||
color: #007aff;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +94,7 @@
|
||||
gap: 8px;
|
||||
|
||||
.currency_symbol {
|
||||
font-family: 'DingTalk JinBuTi', sans-serif;
|
||||
font-family: "DingTalk JinBuTi", sans-serif;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
line-height: 0.8;
|
||||
@@ -62,14 +105,14 @@
|
||||
align-items: flex-end;
|
||||
|
||||
.main_amount {
|
||||
font-family: 'DingTalk JinBuTi', sans-serif;
|
||||
font-family: "DingTalk JinBuTi", sans-serif;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
line-height: 0.75;
|
||||
}
|
||||
|
||||
.decimal_amount {
|
||||
font-family: 'DingTalk JinBuTi', sans-serif;
|
||||
font-family: "DingTalk JinBuTi", sans-serif;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
line-height: 0.8;
|
||||
@@ -111,7 +154,7 @@
|
||||
|
||||
.function_item {
|
||||
background: white;
|
||||
border: 0.5px solid #EBEBEB;
|
||||
border: 0.5px solid #ebebeb;
|
||||
border-radius: 20px;
|
||||
padding: 4px 8px;
|
||||
display: flex;
|
||||
@@ -150,7 +193,7 @@
|
||||
|
||||
.transaction_history {
|
||||
background: white;
|
||||
border: 0.5px solid #EBEBEB;
|
||||
border: 0.5px solid #ebebeb;
|
||||
border-radius: 20px;
|
||||
box-shadow: 0px 0px 36px 0px rgba(0, 0, 0, 0.1);
|
||||
margin: 0 5px;
|
||||
@@ -181,7 +224,7 @@
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
content: "";
|
||||
display: block;
|
||||
width: 2px;
|
||||
height: 8px;
|
||||
@@ -206,7 +249,6 @@
|
||||
}
|
||||
|
||||
.transaction_list {
|
||||
|
||||
.loading_state,
|
||||
.empty_state {
|
||||
padding: 40px 20px;
|
||||
@@ -364,7 +406,6 @@
|
||||
|
||||
// 过滤弹窗
|
||||
.filter_popup {
|
||||
|
||||
.popup_content {
|
||||
padding: 16px 20px;
|
||||
.form_section {
|
||||
@@ -386,7 +427,7 @@
|
||||
gap: 8px;
|
||||
|
||||
.option_item {
|
||||
background-color: #0000000D;
|
||||
background-color: #0000000d;
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { View, Text, Input, Button, Image } from "@tarojs/components";
|
||||
import Taro, { useDidShow } from "@tarojs/taro";
|
||||
import Taro, { useDidShow, useReachBottom } from "@tarojs/taro";
|
||||
import "./index.scss";
|
||||
import { CommonPopup } from "@/components";
|
||||
import httpService from "@/services/httpService";
|
||||
import { withAuth } from "@/components";
|
||||
import { PopupPicker } from "@/components/Picker/index";
|
||||
import { handleCustomerService } from "@/services/userService";
|
||||
import { useReachBottom } from "@tarojs/taro";
|
||||
import img from "@/config/images";
|
||||
|
||||
// 交易记录类型
|
||||
interface Transaction {
|
||||
@@ -97,6 +97,11 @@ const transaction_type_options: Option<TransactionSubType>[] = [
|
||||
];
|
||||
|
||||
const WalletPage: React.FC = () => {
|
||||
// 获取当前页面的配置
|
||||
const currentPage = Taro.getCurrentInstance();
|
||||
const pageConfig = currentPage.page?.config;
|
||||
const pageTitle = pageConfig?.navigationBarTitleText;
|
||||
|
||||
useReachBottom(() => {
|
||||
if (load_transactions_params.page >= totalPages) return;
|
||||
// 加载更多方法
|
||||
@@ -157,7 +162,7 @@ const WalletPage: React.FC = () => {
|
||||
});
|
||||
|
||||
const modify_load_transactions_params = () => {
|
||||
set_transactions([])
|
||||
set_transactions([]);
|
||||
const { type, transaction_sub_type } = filterParams;
|
||||
set_load_transactions_params((prev) => {
|
||||
return {
|
||||
@@ -431,6 +436,23 @@ const WalletPage: React.FC = () => {
|
||||
|
||||
return (
|
||||
<View className="wallet_page">
|
||||
{/* 导航栏 */}
|
||||
<View className="custom-navbar">
|
||||
<View className="detail-navigator">
|
||||
<View
|
||||
className="detail-navigator-back"
|
||||
onClick={() => {
|
||||
Taro.navigateBack();
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
className="detail-navigator-back-icon"
|
||||
src={img.ICON_NAVIGATOR_BACK}
|
||||
/>
|
||||
<Text>{pageTitle}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{/* 钱包主卡片 */}
|
||||
<View className="wallet_main_card">
|
||||
{/* 头部信息 */}
|
||||
|
||||
Reference in New Issue
Block a user