99 lines
3.0 KiB
Vue
99 lines
3.0 KiB
Vue
|
<template>
|
||
|
<cover-view>
|
||
|
<view class="" v-if="identity==0" >
|
||
|
<u-tabbar activeColor="rgba(2, 127, 234, 1)" inactiveColor="#000001" :value="value" :fixed="true"
|
||
|
:placeholder="true" :safeAreaInsetBottom="true">
|
||
|
<u-tabbar-item v-for="(item,i) in footerTabbargl" :key="i" @click="toUrl(item.pagePath)" :text="item.text"
|
||
|
class="tabbar_di_list">
|
||
|
<image style="width: 22px; height:22px;" class=" u-page__item__slot-icon" slot="active-icon"
|
||
|
:src="item.selectedIconPath"></image>
|
||
|
<image style="width: 22px; height:22px;" class="u-page__item__slot-icon" slot="inactive-icon"
|
||
|
:src="item.iconPath"></image>
|
||
|
</u-tabbar-item>
|
||
|
</u-tabbar>
|
||
|
</view>
|
||
|
<view class="" v-if="identity==1" >
|
||
|
<u-tabbar activeColor="rgba(2, 127, 234, 1)" inactiveColor="#000001" :value="value" :fixed="true"
|
||
|
:placeholder="true" :safeAreaInsetBottom="true">
|
||
|
<u-tabbar-item v-for="(item,i) in footerTabbarg2" :key="i" @click="toUrl(item.pagePath)" :text="item.text"
|
||
|
class="tabbar_di_list">
|
||
|
<image style="width: 22px; height:22px;" class=" u-page__item__slot-icon" slot="active-icon"
|
||
|
:src="item.selectedIconPath"></image>
|
||
|
<image style="width: 22px; height:22px;" class="u-page__item__slot-icon" slot="inactive-icon"
|
||
|
:src="item.iconPath"></image>
|
||
|
</u-tabbar-item>
|
||
|
</u-tabbar>
|
||
|
</view>
|
||
|
</cover-view>
|
||
|
</template>
|
||
|
<script>
|
||
|
export default {
|
||
|
name: "tabbar",
|
||
|
props: {
|
||
|
value: '',
|
||
|
identity: '',
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
//兼职人员
|
||
|
footerTabbargl: [{
|
||
|
"pagePath": "/pages/index",
|
||
|
"iconPath": "/static/tabarimg/fz1.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz2.png",
|
||
|
"text": "职位"
|
||
|
},
|
||
|
{
|
||
|
"pagePath": "/pages/work/index",
|
||
|
"iconPath": "/static/tabarimg/fz3.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz4.png",
|
||
|
"text": "消息"
|
||
|
},
|
||
|
{
|
||
|
"pagePath": "/pages/mine/index",
|
||
|
"iconPath": "/static/tabarimg/fz3.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz4.png",
|
||
|
"text": "我的"
|
||
|
}
|
||
|
],
|
||
|
//招聘人员
|
||
|
footerTabbarg2: [{
|
||
|
"pagePath": "/pages_loader/pages/index",
|
||
|
"iconPath": "/static/tabarimg/fz1.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz2.png",
|
||
|
"text": "人才大厅"
|
||
|
},
|
||
|
{
|
||
|
"pagePath": "/pages_loader/pages/work/index",
|
||
|
"iconPath": "/static/tabarimg/fz3.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz4.png",
|
||
|
"text": "消息"
|
||
|
},
|
||
|
{
|
||
|
"pagePath": "/pages_loader/pages/mine/index",
|
||
|
"iconPath": "/static/tabarimg/fz3.png",
|
||
|
"selectedIconPath": "/static/tabarimg/fz4.png",
|
||
|
"text": "我的"
|
||
|
}
|
||
|
],
|
||
|
};
|
||
|
},
|
||
|
methods: {
|
||
|
// idnexChenage(index) {
|
||
|
// uni.setStorageSync('nvgetIndex', index)
|
||
|
// },
|
||
|
toUrl(url) {
|
||
|
// //console.log(this.value, this.identity, '组件的数据');
|
||
|
uni.reLaunch({
|
||
|
url: url
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
/deep/.tabbar_di_list .u-page__item__slot-icon {
|
||
|
width: 20px !important;
|
||
|
height: 18px !important;
|
||
|
}
|
||
|
</style>
|