【微信小程序】 监听点击底部tab 触发的事件
作者:互联网
onTabItemTap 是和mouted 同级
<script>
export default{
data () {
return {
showSendBtn: true,
data: {
code: '',
tel: ''
},
sharePath: '',
count: 60
}
},
mounted () {},、
onTabItemTap (item) {
console.log(item.index)
console.log(item.pagePath)
console.log(item.text)
let encryptedData = wxGetStorageSync('encryptedData')
if (!encryptedData) {
this.$router.replace({
path: '/pages/login/phone/main'
})
}
},
}
</script>
标签:console,log,微信,onTabItemTap,item,encryptedData,tab,data,监听 来源: https://blog.csdn.net/qq_35858830/article/details/104639764