12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- const app = getApp()
- var util = require("../../utils/util.js")
- Page({
- data: {
- date: '2019-06-01',
- enddate: '',
- },
- 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')||'B01';
- console.log(that.data.date);
- 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() {
- console.log(app.globalData.openid)
- const that = this;
- let date = wx.getStorageSync('todayDate');
- that.setData({
- endate: date
- })
- that.setData({
- date: date
- })
- }
- })
|