2、解决wx:key的warinng 3、删除无用的函数 4、取消订单时停止定时器 5、针对订单操作后,返回订单列表没有刷新的问题,添加一个标志(不过不是最好的办法,暂时这样吧) 6、修复再来一单,提交一次后,再返回再提交时出现订单不存在的bug
60 lines
3.0 KiB
Plaintext
60 lines
3.0 KiB
Plaintext
<view class="container">
|
|
<view class="tab-nav">
|
|
<view class="tab {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>全部</view>
|
|
<view class="tab {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
|
|
<view wx:if="{{status.toPay > 0 }}" class='list-num'>{{status.toPay}}</view>待付款
|
|
</view>
|
|
<view class="tab {{ showType == 2 ? 'active' : ''}}" bindtap="switchTab" data-index='2'>
|
|
<view wx:if="{{status.toDelivery > 0 }}" class='list-num'>{{status.toDelivery}}</view>待发货
|
|
</view>
|
|
<view class="tab {{ showType == 3 ? 'active' : ''}}" bindtap="switchTab" data-index='3'>
|
|
<view wx:if="{{status.toReceive > 0 }}" class='list-num'>{{status.toReceive}}</view>待收货
|
|
</view>
|
|
</view>
|
|
|
|
<view class="no-order {{hasOrder == 1? 'show':'' }}" hidden="" wx:if="{{orderList.length <= 0}}">
|
|
<!-- wx:if="{{orderList.length <= 0}}" -->
|
|
<image src="http://lucky-icon.meiweiyuxian.com/hio/no-order.png" class="no-order-img"></image>
|
|
<view class="text">您目前没有相关订单</view>
|
|
<view class="to-index-btn" bindtap="toIndexPage">
|
|
马上去逛逛
|
|
</view>
|
|
<!-- <view class="to-index-btn" bindtap="test">
|
|
马上去逛逛
|
|
</view> -->
|
|
</view>
|
|
<view wx:else class="wrap">
|
|
<!-- 待付款 -->
|
|
<view bindtap='toOrderDetails' class='order-list-wrap' data-id="{{item.id}}" wx:for="{{orderList}}" wx:key="id">
|
|
<view class='list-top-wrap'>
|
|
<view class='time'>{{item.add_time}}</view>
|
|
<view class='status'>{{item.order_status_text}}</view>
|
|
</view>
|
|
<view class="goods-list">
|
|
<view class="a-goods">
|
|
<view class="img-box">
|
|
<view class='image-wrap' wx:for="{{item.goodsList}}" wx:key="id" wx:for-item="gitem" wx:if="{{index<4}}">
|
|
<image src="{{gitem.list_pic_url}}" class="goods-image" />
|
|
</view>
|
|
</view>
|
|
<view class='goods-sum'>共{{item.goodsCount}}件</view>
|
|
</view>
|
|
</view>
|
|
<view class='order-price-wrap'>
|
|
<view class='order-price'>
|
|
<view class='price-label'>总价:¥</view>
|
|
<view class='price-sum'>{{item.actual_price}}</view>
|
|
</view>
|
|
<view class='trans'>(含运费 ¥{{item.freight_price}})</view>
|
|
</view>
|
|
<!-- 待付款 -->
|
|
<view class="order-edit" wx:if="{{item.handleOption.cancel && item.handleOption.pay}}">
|
|
<view catchtap='payOrder' class="edit-btn" data-orderid="{{item.id}}">继续支付</view>
|
|
</view>
|
|
<view wx:else class="order-edit">
|
|
<view class="dele-btn">查看详情</view>
|
|
</view>
|
|
</view>
|
|
<view wx:if="{{showTips}}" class="no-more-goods">没有更多商品啦</view>
|
|
</view>
|
|
</view> |