index.js
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
},
bindchange: function (e) {
console.log(e.detail.value);
wx.setStorageSync('value1', e.detail.value);
}
,
bindchange2: function (e) {
console.log(e);
wx.setStorageSync('bindchange2', e.detail.value);
},
bindchange3: function (e) {
console.log(e.detail.value);
wx.setStorageSync('bindchange3', e.detail.value);
},
bindchange4: function (e) {
console.log(e.detail.value);
wx.setStorageSync('bindchange4', e.detail.value);
},
//事件处理函数
onLoad: function (options) {
this.setData({
value1: wx.getStorageSync('value1')
}),
this.setData({
value2: wx.getStorageSync('bindchange2')
}),
this.setData({
value3: wx.getStorageSync('bindchange3')
}),
this.setData({
value4: wx.getStorageSync('bindchange4')