const app = getApp() var util = require("../../utils/util.js") Page({ data: { date: '2019-06-01', startdate: '', }, bindDateChange: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setData({ date: e.detail.value }) wx.setStorageSync('xu_content_date', e.detail.value) }, gomine() { const that = this // 更新用户推送内容信息 let xu_content_type = wx.getStorageSync('xu_content_type')||'P01'; util.postData('/updateWXUser', { xu_openid: app.globalData.openid, xu_content_type: xu_content_type, xu_content_date: that.data.date }) .then(res => { if (res == 1) { wx.navigateTo({ url: '/pages/supermama/supermama' }) } }) .catch(err => { console.log(err); }) }, onLoad() { let date = wx.getStorageSync('todayDate'); this.setData({ startdate: date, date: date }) } })