|
|
@ -7,21 +7,23 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
name: 'AQTabber', |
|
|
name: "AQTabber", |
|
|
|
|
|
components: { |
|
|
|
|
|
fuiTabbar |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
userType: '', //用户类型|1=教练,2=销售,3=学员 |
|
|
userType: '1', //用户类型|1=教练,2=销售,3=学员 |
|
|
current: '0', |
|
|
current: '0', |
|
|
tabBar: [] |
|
|
tabBar: [] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created() { |
|
|
created() { |
|
|
//设置缓存 |
|
|
console.log(123) |
|
|
uni.setStorageSync('userType', 1) |
|
|
|
|
|
//获取缓存 |
|
|
|
|
|
this.userType = uni.getStorageSync('userType') |
|
|
|
|
|
this.init() |
|
|
this.init() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
async init() { |
|
|
async init() { |
|
|
switch (String(this.userType)) { |
|
|
switch (String(this.userType)) { |
|
|
@ -35,20 +37,20 @@ |
|
|
{ |
|
|
{ |
|
|
text: "课表", |
|
|
text: "课表", |
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "班级", |
|
|
text: "班级", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "我的", |
|
|
text: "我的", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
break; |
|
|
break; |
|
|
@ -56,20 +58,20 @@ |
|
|
this.tabBar = [{ |
|
|
this.tabBar = [{ |
|
|
text: "首页", |
|
|
text: "首页", |
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "线索", |
|
|
text: "线索", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "添加", |
|
|
text: "添加", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png", |
|
|
selectedIconPath: "/static/images/tabbar/my.png", |
|
|
midButton: true, |
|
|
midButton: true, |
|
|
width: 96, |
|
|
width: 96, |
|
|
height: 96 |
|
|
height: 96 |
|
|
@ -77,14 +79,14 @@ |
|
|
{ |
|
|
{ |
|
|
text: "数据", |
|
|
text: "数据", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "我的", |
|
|
text: "我的", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
break; |
|
|
break; |
|
|
@ -92,26 +94,25 @@ |
|
|
this.tabBar = [{ |
|
|
this.tabBar = [{ |
|
|
text: "首页", |
|
|
text: "首页", |
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/index/index', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "课表", |
|
|
text: "课表", |
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/timetable/index', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "我的", |
|
|
text: "我的", |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
urlPath: 'pages/student/my/my', //自定义页面跳转路径 |
|
|
iconPath: "/static/images/tabbar/assembly_default_3x.png", |
|
|
iconPath: "/static/images/tabbar/my.png", |
|
|
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png" |
|
|
selectedIconPath: "/static/images/tabbar/my.png" |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openView(e) { |
|
|
openView(e) { |
|
|
console.log('点击跳转', e) |
|
|
console.log('点击跳转', e) |
|
|
}, |
|
|
}, |
|
|
|