sharp-agezi %!s(int64=6) %!d(string=hai) anos
pai
achega
9b9e8d15ee
Modificáronse 1 ficheiros con 27 adicións e 1 borrados
  1. 27 1
      customized/pages/order/order.js

+ 27 - 1
customized/pages/order/order.js

@@ -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()
+      }
+    })
   }
 })