|
|
|
@ -6,74 +6,68 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import fuiTabbar from "@/components/firstui/fui-tabbar/fui-tabbar.vue" |
|
|
|
export default { |
|
|
|
components:{ |
|
|
|
fuiTabbar |
|
|
|
}, |
|
|
|
name: 'AQTabber', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
userType:'',//用户类型|1=教练,2=销售,3=学员 |
|
|
|
current:'0', |
|
|
|
userType: '', //用户类型|1=教练,2=销售,3=学员 |
|
|
|
current: '0', |
|
|
|
tabBar: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
created() { |
|
|
|
//设置缓存 |
|
|
|
uni.setStorageSync('userType',1) |
|
|
|
uni.setStorageSync('userType', 1) |
|
|
|
//获取缓存 |
|
|
|
this.userType = uni.getStorageSync('userType') |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
async init(){ |
|
|
|
switch (String(this.userType)){ |
|
|
|
case "1"://教练 |
|
|
|
this.tabBar = [ |
|
|
|
{ |
|
|
|
async init() { |
|
|
|
switch (String(this.userType)) { |
|
|
|
case "1": //教练 |
|
|
|
this.tabBar = [{ |
|
|
|
text: "首页", |
|
|
|
urlPath:'pages/student/index/index',//自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/home.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/home_selected.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "课表", |
|
|
|
urlPath:'pages/student/timetable/index',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "班级", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "我的", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
} |
|
|
|
] |
|
|
|
break; |
|
|
|
case "2"://销售 |
|
|
|
this.tabBar = [ |
|
|
|
{ |
|
|
|
case "2": //销售 |
|
|
|
this.tabBar = [{ |
|
|
|
text: "首页", |
|
|
|
urlPath:'pages/student/index/index',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "线索", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "添加", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png", |
|
|
|
midButton: true, |
|
|
|
@ -82,35 +76,34 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "数据", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "我的", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
} |
|
|
|
] |
|
|
|
break; |
|
|
|
case "3"://学员 |
|
|
|
this.tabBar = [ |
|
|
|
{ |
|
|
|
case "3": //学员 |
|
|
|
this.tabBar = [{ |
|
|
|
text: "首页", |
|
|
|
urlPath:'pages/student/index/index',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "课表", |
|
|
|
urlPath:'pages/student/timetable/index',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "我的", |
|
|
|
urlPath:'pages/student/my/my',//自定义页面跳转路径 |
|
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
|
} |
|
|
|
@ -119,19 +112,19 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
openView(e){ |
|
|
|
console.log('点击跳转',e) |
|
|
|
openView(e) { |
|
|
|
console.log('点击跳转', e) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
.fui-wrap { |
|
|
|
.fui-wrap { |
|
|
|
//为防止标签栏遮住页面内容,页面底部需留白高度不低于标签栏高度。非Nvue端和头条小程序如果fixedHeight属性没有设置为true,则页面外层还需加入以下样式(或者在页面最底部加入`fui-safe-area` 组件)兼容异形屏: |
|
|
|
/* #ifndef APP-NVUE */ |
|
|
|
padding-bottom: constant(safe-area-inset-bottom); |
|
|
|
padding-bottom: env(safe-area-inset-bottom); |
|
|
|
/* #endif */ |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |