f0: function (e) {//////switch开关
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
if (e.detail.value == true) {
var yf = '1'
} else {
yf = '0'
}
this.setData({
code8: yf//
})
},
f1: function (e) {//////switch开关
console.log('switch2 发生 change 事件,携带值为', e.detail.value)
if (e.detail.value == true) {
var sc = 'B'
} else {
sc = 'N'
}
this.setData({
code5: sc
})
},
https://developers.weixin.qq.com/s/bcAPDImi7OfG