- 微信审核要求交易类小程序提交订单中心 path,之前小程序没有订单页 - 新页面 pages/orders/orders:列表展示商品名 / 状态 / 订单号 / 金额 / 下单时间,接 GET /v1/orders - 我的页新增「我的订单」入口,文案走后台配置 profile.menu.orders - utils/api.js 补 getOrders(),utils/format.js 补 toDateTimeString()
26 lines
893 B
Plaintext
26 lines
893 B
Plaintext
<!--pages/orders/orders.wxml-->
|
|
<scroll-view class="order-page" scroll-y type="custom">
|
|
<view wx:if="{{loading}}" class="order-hint">加载中…</view>
|
|
<view wx:elif="{{list.length === 0}}" class="order-hint">暂无订单</view>
|
|
|
|
<block wx:else>
|
|
<view class="order-item" wx:for="{{list}}" wx:key="outTradeNo">
|
|
<view class="order-line">
|
|
<text class="order-title">{{item.title}}</text>
|
|
<text class="order-status">{{item.statusText}}</text>
|
|
</view>
|
|
<view class="order-line order-sub">
|
|
<text>订单号 {{item.outTradeNo}}</text>
|
|
</view>
|
|
<view class="order-line order-sub">
|
|
<text class="order-amount">¥{{item.amountYuan}}</text>
|
|
<text>{{item.createdAtText}}</text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
|
|
<button class="order-service" open-type="contact">
|
|
<text>{{contactText}}</text>
|
|
</button>
|
|
</scroll-view>
|