1
xiaoyong931011
2022-03-25 1ceabefb451912daa5dda7768b7ef0b89a56c08a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
var util = require('../../utils/util.js');
var api = require('../../utils/service-api.js');
Page({
  data: {
    userInfo: {},
    hasName: false,
  },
  onLoad: function(options) {
    var _this = this
    var userInfo = getApp().userInfo;
    this.setData({
      userInfo: userInfo,
    });
 
    //判断用户名称是否已经授权
    if (util.isNotBlank(userInfo.nickName)) {
      this.setData({
        hasName: true,
      });
    }
 
    this.getOrderStatusCount();
 
 
  },
 
 
  /**
   * 获取订单数量
   */
  getOrderStatusCount(){
    var _this=this;
    util.request({
      method:'GET',
      api: api.order.getOrderStatusCount,
      callback: function (data) {
         let rows=data.rows;
         
         for(let i=0; i<rows.length ; i++){
           
           if (rows[i].orderStatus==1){ 
             _this.setData({ 'WAIT_PAY': rows[i].count });
           } else if (rows[i].orderStatus == 2) {
             _this.setData({ 'WAIT_SEND': rows[i].count });
           } else if (rows[i].orderStatus == 3) { 
             _this.setData({ 'WAIT_RECEIVE': rows[i].count });
           } else if (rows[i].orderStatus == 6) { 
             _this.setData({ 'APPLY_MONEYBACK': rows[i].count });
           }
          
         }
 
      },
    });
 
 
  },
 
  onShow: function() {
    var _this = this;
 
 
  },
 
  //登录
  login:function(){
    wx.navigateTo({
      url: '/pages/welcome/welcome?url=/pages/customerCenter/customerCenter',
    })
  },
    myCollect(e){
        wx.navigateTo({
            url: '/pages/yuyue/order?status=0',
        })
    },
 
  onStatusEvent(e) {
    var status = e.currentTarget.dataset.status;
    wx.navigateTo({
      url: '../order/order?status=' + status,
    })
  },
  addressJumpEvent(e) {
    wx.navigateTo({
      url: '../editAddress/editAddress',
    })
  },
  checkRecord(){
    wx.navigateTo({
      url: '/pages/checkRecord/recordList',
    })
  },
 
 
  refundStatus(e) {
    wx.navigateTo({
      url: '../refundOrder/refundOrder',
    })
  },
  // 查看个人信息
  lookUserInfo() {
    wx.navigateTo({
      url: '../personalInfo/personalInfo',
    })
  },
 
 
  // 进入我的优惠券
  intoCoupon() {
    wx.navigateTo({
      url: '../customerCoupons/customerCoupons',
    })
  },
 
  
 
})