var app = getApp(); Page({ data: { open: true, user: '', balance: '', //我的钱包 phone: [], actionSheetHidden: true, state: '', arr:[], time:wx.getStorageSync('home').customer_service_time, screenHeight:'', adHeight:'', img:app.globalData.imgUrl, title:app.globalData.title, show:false, date: '', items: [], itemsId:[] }, bindDateChange:function(e){ console.log(e) this.setData({date:e.detail.value}) }, getNowFormatDate:function() { var date = new Date(); var seperator1 = "-"; var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } var currentdate = year + seperator1 + month + seperator1 + strDate; console.log(currentdate) this.setData({date:currentdate}) return currentdate; }, userinfo: function(e) { var that = this; }, oneKey:function(){ this.setData({show:true}) }, checkboxChange(e) { console.log('checkbox发生change事件,携带value值为:', e.detail.value) const items = this.data.items const values = e.detail.value for (let i = 0, lenI = items.length; i < lenI; ++i) { items[i].checked = false for (let j = 0, lenJ = values.length; j < lenJ; ++j) { if (items[i].id == values[j]) { items[i].checked = true break } } } this.setData({ items, itemsId:e.detail.value }) }, quxiao:function(){ this.setData({show:false}) }, queren:function(){ var items = this.data.items; if(this.data.itemsId==''){ var arr = [] for(var i=0;i { // console.log(res) // that.setData({ arr: res.data.user_card,show:res.data.is_card_begin }) // }) // app.request("/user/status", '', "GET").then(res => { // console.log(res) // if (res.statusCode == 200) { // if (res.data.is_card_certified == 1) { // this.setData({ // state: '已实名' // }) // } else { // this.setData({ // state: '未实名' // }) // } // wx.setStorageSync('userState', res.data) // } // }) }, onHide: function() { }, onUnload: function() { }, onPullDownRefresh: function() { wx.showNavigationBarLoading(); var that = this; // app.request("/me", '', "GET").then(res => { // 200 == res.statusCode && wx.setStorageSync("userInfo", res.data), that.setData({ // user: res.data // }) // wx.hideNavigationBarLoading() // wx.stopPullDownRefresh(); // }) }, onReachBottom: function() { }, onShareAppMessage: function() { } })