Skip to content

Commit

Permalink
订单
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobinwu committed May 14, 2017
1 parent 1bbad24 commit f62afa4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pages/order/order.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// pages/order/order.js
Page({
data:{},
data:{
orderList: []
},
onLoad:function(options){
// 页面初始化 options为页面跳转所带来的参数
},
Expand Down
47 changes: 46 additions & 1 deletion pages/order/order.wxml
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
<!--pages/order/order.wxml-->
<text>pages/order/order.wxml</text>
<view class="orderlist">
<view class="order-list" wx:for="{{orderList}}">
<view class="list">

<view class="list-header" data-order-id="{{item.order_id}}" bindtap="goDetail()">
<span class="icon icon-store"></span>
<text class="store-name">{{item.store_name}}</text>
<text class="order-time">{{item.add_time}}</text>
</view>

<view class="item-list product-list" data-order-id="{{item.order_id}}" bindtap="goDetail()">
<view class="item" wx:for="{{item.goods_list}}" wx:for-item="product">
<view class="item-img">
<image src="{{product.goods_img}}"></image>
</view>
<view class="item-info">
<view class="item-name">{{product.goods_name}}</view>
<view class="item-price">¥ {{product.goods_price}}</view>
</view>
<view class="item-num">x {{product.goods_number}}</view>
</view>
</view>

<view class="list-footer">
<view class="order-status">
<view class="status">
<view class="{{index == item.progress.last_index-1 ? 'active' : ''}}" wx:for="item.progress.info" wx:for-item="icon">
<span class="icon {{'icon-' + (icon.icon === 'cancel' ? 'refund' : icon.icon)}}"></span>
<view></view>
<text>{{icon.text}}</text>
<view class="hint" wx:if="{{icon.icon == 'await_pay' && item.left_time > 0}}"> {{item.left_time}} </view>
</view>
</view>
<view class="count">
<text>合计:</text>
<text>¥ {{item.order_amount}}</text>
</view>
</view>
<view class="btn-wrap">

</view>
</view>

</view>
</view>
</view>

0 comments on commit f62afa4

Please sign in to comment.