控制tabbar隐藏和显示的代码
data里有个初始数据handler: false
在else代码块中的setdata不起作用,为什么?
click: function() {
var that = this;
if (that.data.handler == false) {
wx.hideTabBar({
animation: true,
success() {
that.setData({
handler: true
})
}
})
}
else {
wx.showTabBar({
animation: true,
succsee() {
that.setData({
handler: false
})
}
})
}
}