跳转界面js
data: {
hum:"0"
},
onLoad:function(options) {
var that = this
that.setData({
hum:options.tips
})
},
跳转界面huml
<text>{{hum}}%</text>
主界面js
data: {
hum:'40'
},
// 事件处理函数
jump (event) {
var that = this
wx:wx.navigateTo({
url: '/pages/three/three?tips=' +that.data.hum , // 通过url传到跳转页面
})
},
主界面html
<view class="date btn " bindtap="jump">
<view class="date-value">{{hum}}℃</view>
</view>