[新增]新增自定义tabbar组件

This commit is contained in:
唐明明
2020-12-30 10:15:22 +08:00
parent 2361b0ad09
commit 90ebeb48f7
21 changed files with 151 additions and 148 deletions

View File

@@ -18,30 +18,44 @@ Page({
})
return
}
wx.getStorage({
key : 'compayId',
success : res=>{
wx.$api.publics.storeConfig({
company_id: res.data
}).then(res => {
let tabBarVal = res.concat({})
tabBarVal.forEach(res => {
switch (res.slug) {
case "video":
tabBar.push(video)
break;
case "mall":
tabBar.push(mall)
break;
case "ticket":
tabBar.push(ticket)
break;
default :
tabBar.push(user)
break;
}
})
wx.$api.publics.storeConfig({
company_id: e.companyoid
}).then(res => {
let tabBarVal = res.concat({})
tabBarVal.forEach(res => {
switch (res.slug) {
case "video":
tabBar.push(video)
break;
case "mall":
tabBar.push(mall)
break;
case "ticket":
tabBar.push(ticket)
break;
default :
tabBar.push(user)
break;
}
})
wx.switchTab({
url: tabBar[0].pagePath
})
if(tabBarVal.length == tabBar.length){
wx.reLaunch({
url: tabBar[0].pagePath,
})
}
})
}
})
},
/**
* 生命周期函数
*/
onShow(){
wx.hideHomeButton()
}
})