自定义title
This commit is contained in:
@@ -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