|
@@ -1,4 +1,6 @@
|
|
|
-// customized/pages/order/order.js
|
|
|
+
|
|
|
+let app = getApp();
|
|
|
+let host = app.globalData.servsers; // 请求的url
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -62,5 +64,29 @@ Page({
|
|
|
*/
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
+ },
|
|
|
+ getOrderList(that,state,page){
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ })
|
|
|
+ wx.request({
|
|
|
+ url: host + '/queryOrderCustomerByUserId',
|
|
|
+ method:'get',
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded'
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ userId:app.globalData.userId,
|
|
|
+ orderStatus: state, //订单状态 0未支付\\1: 待定制\\2: 待发货\\3: 已发货\\4: 已完成\\5: 取消'
|
|
|
+ limit:10,
|
|
|
+ offset:page,
|
|
|
+ },
|
|
|
+ success(res){
|
|
|
+ console.log(res,"orderList")
|
|
|
+ },
|
|
|
+ complete(){
|
|
|
+ wx.hideLoading()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|