|
|
|
@ -20,7 +20,8 @@ Page({
|
|
|
|
|
wx.pageScrollTo({
|
|
|
|
|
scrollTop: 0
|
|
|
|
|
})
|
|
|
|
|
}},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init_order(type) {
|
|
|
|
|
http("/api/v1/order-list", "get", {
|
|
|
|
|
type
|
|
|
|
@ -37,12 +38,33 @@ Page({
|
|
|
|
|
},
|
|
|
|
|
detail(e) {
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: '/pages/user/order_detail/order_detail?order_no=' + e.currentTarget.dataset.order_no+'&_type='+this.data._type,
|
|
|
|
|
url: '/pages/user/order_detail/order_detail?order_no=' + e.currentTarget.dataset.order_no + '&_type=' + this.data._type,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
pay(e) {
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: '/pages/user/order_detail/order_detail?order_no=' + e.currentTarget.dataset.order_no+'&_type='+this.data._type,
|
|
|
|
|
url: '/pages/user/order_detail/order_detail?order_no=' + e.currentTarget.dataset.order_no + '&_type=' + this.data._type,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
dele(e) {
|
|
|
|
|
var that = this
|
|
|
|
|
wx.showModal({
|
|
|
|
|
content: '订单删除不可恢复,是否删除?',
|
|
|
|
|
success(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
http("/api/v1/order-delete", "get", {
|
|
|
|
|
order_no: e.currentTarget.dataset.order_no
|
|
|
|
|
}).then(res => {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '删除成功!',
|
|
|
|
|
duration: 1000
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
that.init_order(1)
|
|
|
|
|
}, 200);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
cancel(e) {
|
|
|
|
@ -55,10 +77,12 @@ Page({
|
|
|
|
|
order_no: e.currentTarget.dataset.order_no
|
|
|
|
|
}).then(res => {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '取消订单成功!',
|
|
|
|
|
title: '取消成功!',
|
|
|
|
|
duration: 1000
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
that.init_order(1)
|
|
|
|
|
}, 200);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|