1、小程序数据绑定
data:{
"fromtype": "" ,
"personstatus":"",
"farmstatus": "",
}
//动态修改data里面的数据
this.setData({
"fromtype": “1”,
"personstatus": "true",
"farmstatus": "true"
})
需要使用this.setData:选择this.setData修改数据,可以动态更新页面数据,如果只是使用this.data.fromtype = "xxx",则只能修改js里面是数据。
2.小程序在单个页面设置样式时,若给body设置背景色,就用
page{
height: 100%;
width:100%;
background-color: #FFFFFF;
}