|
|
@ -37,6 +37,22 @@ |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
|
|
|
uni.setTabBarItem({ |
|
|
|
|
|
index: 1, |
|
|
|
|
|
"visible": false |
|
|
|
|
|
}); |
|
|
|
|
|
uni.setTabBarItem({ |
|
|
|
|
|
index: 2, |
|
|
|
|
|
"visible": false |
|
|
|
|
|
}); |
|
|
|
|
|
uni.setTabBarItem({ |
|
|
|
|
|
index: 3, |
|
|
|
|
|
"visible": false |
|
|
|
|
|
}); |
|
|
|
|
|
uni.setTabBarItem({ |
|
|
|
|
|
index: 4, |
|
|
|
|
|
"visible": false |
|
|
|
|
|
}); |
|
|
this.listTabbar(); |
|
|
this.listTabbar(); |
|
|
this.getSwiperList() |
|
|
this.getSwiperList() |
|
|
}, |
|
|
}, |
|
|
@ -44,7 +60,9 @@ |
|
|
listTabbar() { |
|
|
listTabbar() { |
|
|
this.$api.listTabbar({}) |
|
|
this.$api.listTabbar({}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
|
|
|
console.log(res) |
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
|
|
|
if (res.data[i].hide == 1) { |
|
|
if (res.data[i].type == "home") { |
|
|
if (res.data[i].type == "home") { |
|
|
uni.setTabBarItem({ |
|
|
uni.setTabBarItem({ |
|
|
index: 0, |
|
|
index: 0, |
|
|
@ -74,6 +92,7 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}).catch((e) => console.log(e)); //捕获异常 |
|
|
}).catch((e) => console.log(e)); //捕获异常 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|