在用户中心,点击全部订单,可以看到待付款、待发货、待收货、待评价等各个状态下的订单。
我的订单设计思路
- 获取用户订单中心订单信息;
- 支付成功后修改订单为代发货;
- 点击订单商品后,跳转至订单详情;
- 获取待付款、待发货、待评价等订单状态数据
我的订单myorder.wxml
<!--shangcheng_xk/pages/order/myorder/myorder.wxml-->
<view class="container">
<view class="order-title">
<text class="{
{ tabActive == 5 ? 'active' : '' }}" bindtap="changeTab" data-tabId="5">全部</text>
<text class="{
{ tabActive == 0 ? 'active' : '' }}" bindtap="changeTab" data-tabId="0">待付款</text>
<text class="{
{ tabActive == 1 ? 'active' : '' }}" bindtap="changeTab" data-tabId="1">待配送</text>
<text class="{
{ tabActive == 2 ? 'active' : '' }}" bindtap="changeTab" data-tabId="2">配送中</text>
<text class="{
{ tabActive == 3 ? 'active' : '' }}" bindtap="changeTab" data-tabId="3">待评价</text>
</view>
<view class="order">
<view wx:if="{
{ orderInfo }}">
<view class="order-item" wx:for="{
{ orderInfo }}" wx:key="id">
<view class="order-status">
<text>订单号:{
{
item.out_trade_no }}</text>
</view>
<view class="goods-list">
<view class="goods-item" wx:for-index="goodsIndex" wx:for-item="itemGoods" wx:for="{
{item.goodsInfo}}" wx:key="gid" data-orderId="{
{ item.id}}" bindtap="goodsDetail">
<image class="goods-thumb" src="{
{ itemGoods.image }}" mode="widthFix"></image>
<view class="goods-info">
<view class="goods-title">
<text>{
{
itemGoods.goods_name}}</text>
<text>{
{
itemGoods.goods_desc}}</text>
</view>
<view class="goods-sale">
<view class="goods-price">
<text>¥</text>
<text>{
{
itemGoods.now_price }}</text>
</view>
<!-- <view class="goods-num">x2</view> -->
</view>
</view>
</view>
</view>
<view class="order-tot