新增「我的订单」页面(订单中心)

- 微信审核要求交易类小程序提交订单中心 path,之前小程序没有订单页
- 新页面 pages/orders/orders:列表展示商品名 / 状态 / 订单号 / 金额 / 下单时间,接 GET /v1/orders
- 我的页新增「我的订单」入口,文案走后台配置 profile.menu.orders
- utils/api.js 补 getOrders(),utils/format.js 补 toDateTimeString()
This commit is contained in:
Yeomai committed 2026-10-01 12:22:11 +08:00
1 parent 014fa90dcd
commit 7d5db6a867
9 files changed
+172 -1

No files matched your search

+8
View File
@@ -20,6 +20,8 @@ Page({
text4: '',
text5: '',
text6: '',
/** 「我的订单」入口文案,走后台配置 */
ordersText: '',
},
onLoad() {
@@ -43,6 +45,7 @@ Page({
text4: store.cfg('profile.menu.contact'),
text5: store.cfg('profile.menu.wechat'),
text6: store.cfg('profile.qrcode_caption'),
ordersText: store.cfg('profile.menu.orders'),
qrcodeUrl: qrcodeName ? config.STATIC_BASE_URL + '/Images/WXCode/' + qrcodeName + '.png' : '',
});
},
@@ -76,6 +79,11 @@ Page({
wx.navigateTo({ url: '/pages/ChangeUserInfo/ChangeUserInfo' });
},
/** 订单中心:微信审核要求交易类小程序必须有,入口放在这一页。 */
toOrders() {
wx.navigateTo({ url: '/pages/orders/orders' });
},
showQrcode() {
this.setData({ showCode: true });
},
+5
View File
@@ -31,6 +31,11 @@
<text class="jiantou"> > </text>
</button>
<button class="functions2" bind:tap="toOrders">
<text class="zuobianwenzi">{{ordersText}}</text>
<text class="jiantou"> > </text>
</button>
<button class="functions2" open-type="share">
<text class="zuobianwenzi">{{text3}}</text>
<text class="jiantou"> > </text>