init commit
This commit is contained in:
@ -71,7 +71,7 @@ Page({
|
||||
},
|
||||
//订单数据
|
||||
orderList: function () {
|
||||
if(time) {
|
||||
if (time) {
|
||||
clearTimeout(time);
|
||||
}
|
||||
console.log(11111)
|
||||
@ -88,7 +88,9 @@ Page({
|
||||
userId: app.globalData.userId,
|
||||
status: this.data.type,
|
||||
page: this.data.page,
|
||||
num: this.data.num
|
||||
num: this.data.num,
|
||||
addressId: undefined,
|
||||
currentOrder: undefined
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
@ -120,10 +122,10 @@ Page({
|
||||
orderList: orderList,
|
||||
page: this.data.page + 1
|
||||
})
|
||||
time = setInterval(()=>{
|
||||
time = setInterval(() => {
|
||||
this.countDown(orderList);
|
||||
}, 1000)
|
||||
|
||||
|
||||
} else {
|
||||
if (this.data.page != 1) {
|
||||
wx.showToast({
|
||||
@ -160,6 +162,22 @@ Page({
|
||||
url: '/pages/expresswx/expresswx',
|
||||
})
|
||||
},
|
||||
viewLogisticsDetails(e) {
|
||||
const { logisticsNum } = e.currentTarget.dataset
|
||||
wx.navigateTo({
|
||||
url: `/pages/logistics_details/logistics_details`,
|
||||
})
|
||||
},
|
||||
|
||||
updateAddress(e) {
|
||||
const { addressId, id: orderId } = e.currentTarget.dataset
|
||||
this.setData({
|
||||
currentOrder: orderId
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/my_address/my_address?orderAddress=true&addressId=' + addressId,
|
||||
})
|
||||
},
|
||||
//查看进度
|
||||
after: function (e) {
|
||||
wx.navigateTo({
|
||||
@ -355,6 +373,23 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
requestUpdateAddress() {
|
||||
const { addressId, currentOrder } = this.data
|
||||
console.log(addressId, currentOrder,);
|
||||
wx.request({
|
||||
url: app.globalData.ip + '/wisdommining/api/order/requestUpdateAddress',
|
||||
method: "GET",
|
||||
data: {
|
||||
addressId, orderId: currentOrder
|
||||
},
|
||||
success: (result) => {
|
||||
wx.showToast({
|
||||
title: result.data.message,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
@ -388,6 +423,5 @@ Page({
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
this.orderList()
|
||||
},
|
||||
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user