Commit 87fa6b2ccaa7284e5b33c229e78c64cfef126969

Authored by vking
1 parent d9a3d462

taocan

... ... @@ -6,6 +6,7 @@ Component({
properties: {
order:Object,
hasTopStatus:Boolean,
listOrder:Object,//列表数据
foods_info:Object,//订单详情
order_info:Object,//订单详情
},
... ... @@ -16,7 +17,9 @@ Component({
data: {
},
attached(){
this.initListOrder()
},
/**
* 组件的方法列表
*/
... ... @@ -31,5 +34,28 @@ Component({
seller_tel:seller_tel,
});
},
initListOrder(){
let orderStatusStr={
1:{status:'未支付',info:''},
2:{status:'待使用',info:'感谢您的支持,请您按尽快来店就餐呦'},
3:{status:'已使用',info:'感谢您的支持,满意的话记得常来呦'},
4:{status:'退款中',info:''},
5:{status:'已退款',info:'钱款已原路退还,请在微信账单查看呦'},
6:{status:'已过期',info:'您可以随时申请退款呦'},
7:{status:'支付失败',info:''},
}
let order_info=this.data.listOrder
order_info.status_tips=orderStatusStr[order_info.status]
let foods_info={
name:order_info.name,
eff_time_end:order_info.eff_time_end,
main_url:order_info.main_url,
sale_price:order_info.sale_price,
}
this.setData({
order_info:order_info,
foods_info:foods_info,
})
},
}
})
... ...
... ... @@ -7,7 +7,7 @@
<view class="txt-32-h text-cut" style="margin-bottom: 2rpx;">{{order_info.sellername}}</view>
<view class="txt-24-h text-gray text-cut">{{order_info.real_address}}</view>
</view>
<view class="view txt-28-h text-blue" wx:if="{{hasTopStatus}}">以哈哈</view>
<view class="view txt-28-h {{order_info.status==2?'text-blue':'bg-white'}}" wx:if="{{hasTopStatus}}">{{order_info.status_tips.status}}</view>
<view class="phone view" wx:else=""></view>
</view>
<view class="view flex solid-bottom" style="padding-bottom: 36rpx;padding-top: 36rpx;">
... ...
... ... @@ -110,9 +110,6 @@ Page({
if(this.hasMore){
this.offset+=this.limit
}
if(tabType>4){
data=[{},{},{}]
}
this.setData({
[`list[`+tabType+`]`]: this.data.list[tabType].concat(data),
hasMore:this.hasMore
... ... @@ -124,6 +121,7 @@ Page({
},
formatList(list) {
if (list.length<1) return [];
if(this.tabType>4) return list;
let dlist = [];
let openid = getApp().openid;
list.forEach(row => {
... ...
... ... @@ -26,7 +26,7 @@
</block>
<block wx:else="">
<block wx:if="{{tabType<5}}">
<navigator wx:for="{{list[tabType]}}" wx:key="success.key"
<navigator wx:for="{{list[tabType]}}" wx:key="*this"
wx:for-item="detail" wx:for-index="dateIndex"
url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<card
... ... @@ -35,13 +35,22 @@
</navigator>
</block>
<view class="view padding-lr" wx:else="">
<navigator wx:for="{{list[tabType]}}" wx:key="success.key"
<navigator wx:for="{{list[tabType]}}" wx:key="*this"
wx:for-item="order" wx:for-index="dateIndex"
class="margin-bottom-lg"
url="/pages/taocan/order?id={{order.id}}">
<subject order="{{order}}" hasTopStatus>
url="/pages/taocan/order?id={{order.order_id}}">
<subject listOrder="{{order}}" hasTopStatus>
<view class="view flex justify-end margin-top">
<view class="txt-26-h text-blue subject-button flex justify-center align-center">到店使用</view>
<view wx:if="{{order.status==2}}"
class="txt-26-h subject-button2 flex justify-center align-center" >到店使用</view>
<navigator url="/pages/taocan/index?sid={{order.sid}}&pid={{order.food_id}}" catchtap="catchtap">
<view wx:if="{{order.status==3}}"
class="txt-26-h subject-button flex justify-center align-center" >再来一单</view>
</navigator>
<navigator url="/pages/taocan/index?sid={{}}&pid={{order.order_id}}" catchtap="catchtap">
<view wx:if="{{order.status==4}}"
class="txt-26-h subject-button flex justify-center align-center" >查看进度</view>
</navigator>
</view>
</subject>
</navigator>
... ...
... ... @@ -115,5 +115,12 @@
.subject-button{
width: 158rpx;
height: 52rpx;
border: 2rpx solid #999999;
color:#666666;
}
.subject-button2{
width: 158rpx;
height: 52rpx;
border: 2rpx solid #42A5FF;
color: #42A5FF;
}
\ No newline at end of file
... ...