From d8eb826469f4798d7ffab2a2465f104b0ebbb3ee Mon Sep 17 00:00:00 2001 From: renjianbo <18691577328@163.com> Date: Sun, 7 Jun 2026 12:15:27 +0800 Subject: [PATCH] fix: add back button and nav bar to wallet page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add van-nav-bar with back arrow to qianbao.wxml - Fix JSON title from "我的收藏" to "我的钱包" - Simplify JS: remove unused navHeight/menuButtonInfo, use getNavBarHeight() - Add navigationStyle:custom for consistent custom nav bar Co-Authored-By: Claude Opus 4.6 --- coupon/pages/wodeqianbao/qianbao.js | 10 ++---- coupon/pages/wodeqianbao/qianbao.json | 9 ++++-- coupon/pages/wodeqianbao/qianbao.wxml | 44 ++++++++++++++++----------- 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/coupon/pages/wodeqianbao/qianbao.js b/coupon/pages/wodeqianbao/qianbao.js index ec4d297..66b476a 100644 --- a/coupon/pages/wodeqianbao/qianbao.js +++ b/coupon/pages/wodeqianbao/qianbao.js @@ -5,11 +5,7 @@ Page({ data: { order_list: [], - navHeight: '', - menuButtonInfo: {}, - searchMarginTop: 0, - searchWidth: 0, - searchHeight: 0, + height: '', page: 1, firstLoad: true }, @@ -18,8 +14,8 @@ Page({ wx.navigateBack() }, - onLoad: function (options) { - wx.setNavigationBarTitle({ title: '我的钱包' }) + onLoad: function () { + this.setData(getApp().getNavBarHeight()); }, onShow: function () { diff --git a/coupon/pages/wodeqianbao/qianbao.json b/coupon/pages/wodeqianbao/qianbao.json index 21582e1..8c866ff 100644 --- a/coupon/pages/wodeqianbao/qianbao.json +++ b/coupon/pages/wodeqianbao/qianbao.json @@ -1,4 +1,7 @@ { - "usingComponents": {}, - "navigationBarTitleText": "我的收藏" -} \ No newline at end of file + "usingComponents": { + "van-nav-bar": "@vant/weapp/nav-bar/index" + }, + "navigationBarTitleText": "我的钱包", + "navigationStyle": "custom" +} diff --git a/coupon/pages/wodeqianbao/qianbao.wxml b/coupon/pages/wodeqianbao/qianbao.wxml index b3be8f9..ae607ed 100644 --- a/coupon/pages/wodeqianbao/qianbao.wxml +++ b/coupon/pages/wodeqianbao/qianbao.wxml @@ -1,20 +1,28 @@ - - - - - - 退款到账 - 提现 - {{item.time}} - - - ¥{{item.money}} - - + + + + + + + + 退款到账 + 提现 + {{item.time}} + + ¥{{item.money}} + + - - - 暂无交易记录 - - \ No newline at end of file + + + + 暂无交易记录 + +