//index.js //获取应用实例 const app = getApp() Page({ data: { tapCurrent:0, }, onLoad: function () { this.setData({ fonts:app.globalData.font }) }, userInfo:function(){ wx.navigateTo({ url:'/pages/userInfo/userInfo' }) }, bindDateChange: function(e) { this.setData({ date: e.detail.value }) }, discount:function(e){ var current=e.currentTarget.dataset.current; this.setData({ tapCurrent:current }) } })