个人页、他人页优化

This commit is contained in:
2025-11-08 20:14:54 +08:00
parent 40ea0f2eed
commit 5a15a5886d
8 changed files with 126 additions and 23 deletions

View File

@@ -219,10 +219,10 @@ const DownloadBill: React.FC = () => {
transaction_sub_type,
date_range,
});
const { bill_example, fileName } = res.data;
const { fileUrl, fileName } = res.data;
// 调用下载文件接口
wx.downloadFile({
url: bill_example, // 文件路径
url: fileUrl, // 文件路径
success: function (res) {
// 只有200状态码表示下载成功
if (res.statusCode === 200) {

View File

@@ -173,6 +173,10 @@ const MyselfPage: React.FC = () => {
});
};
const handleOnTab = (tab) => {
setActiveTab(tab)
}
return (
<View className="myself_page">
{/* 主要内容 */}
@@ -184,6 +188,7 @@ const MyselfPage: React.FC = () => {
is_current_user={is_current_user}
is_following={is_following}
on_follow={handle_follow}
onTab={handleOnTab}
/>
{/* 球局订单和收藏功能 */}
<View className="quick_actions_section">
@@ -219,9 +224,8 @@ const MyselfPage: React.FC = () => {
<Text className="tab_text"></Text>
</View>
<View
className={`tab_item ${
active_tab === "participated" ? "active" : ""
}`}
className={`tab_item ${active_tab === "participated" ? "active" : ""
}`}
onClick={() => setActiveTab("participated")}
>
<Text className="tab_text"></Text>
@@ -243,7 +247,10 @@ const MyselfPage: React.FC = () => {
btnImg="ICON_ADD"
reload={goPublish}
isShowNoData={game_records.length === 0}
loadMoreMatches={() => {}}
loadMoreMatches={() => { }}
collapse={true}
style={{ paddingBottom: 0, overflow: "hidden" }}
defaultShowNum={3}
/>
</ScrollView>
</View>
@@ -267,7 +274,10 @@ const MyselfPage: React.FC = () => {
error={null}
errorImg="ICON_LIST_EMPTY"
isShowNoData={ended_game_records.length === 0}
loadMoreMatches={() => {}}
loadMoreMatches={() => { }}
collapse={true}
style={{ paddingBottom: "90px", overflow: "hidden" }}
defaultShowNum={3}
/>
</ScrollView>
{/* </View> */}

View File

@@ -205,6 +205,10 @@ const OtherUserPage: React.FC = () => {
}&nickname=${user_info.nickname || ""}`,
});
};
const handleOnTab = (tab) => {
setActiveTab(tab)
}
// 处理球局详情
// const handle_game_detail = (game_id: string) => {
@@ -236,6 +240,7 @@ const OtherUserPage: React.FC = () => {
is_following={is_following}
on_follow={handle_follow}
on_message={handle_send_message}
onTab={handleOnTab}
/>
</View>
@@ -265,6 +270,9 @@ const OtherUserPage: React.FC = () => {
errorImg="ICON_LIST_EMPTY"
emptyText="暂无消息,去互动看看吧"
loadMoreMatches={() => {}}
collapse={true}
style={{ paddingBottom: 0, overflow: "hidden" }}
defaultShowNum={3}
/>
</ScrollView>
{/* </View> */}
@@ -301,6 +309,9 @@ const OtherUserPage: React.FC = () => {
errorImg="ICON_LIST_EMPTY"
emptyText="暂无消息,去互动看看吧"
loadMoreMatches={() => {}}
collapse={true}
style={{ paddingBottom: "90px", overflow: "hidden" }}
defaultShowNum={3}
/>
</ScrollView>
{/* </View> */}

View File

@@ -92,9 +92,8 @@ const SetTransactionPassword: React.FC = () => {
title: "设置交易密码成功",
icon: "success",
});
Taro.redirectTo({
url: "/user_pages/wallet/index",
});
let delta = handleType === "set" ? 1 : 2;
Taro.navigateBack({ delta })
} catch (error) {
Taro.showToast({
title: "设置交易密码失败",