diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue
index 45286a6..d2d80df 100644
--- a/components/UserTab/UserTab.vue
+++ b/components/UserTab/UserTab.vue
@@ -22,91 +22,14 @@
currentIndex:0,
}
},
+ watch: {
+ identity(newVal) {
+ this.initTabbar()
+ }
+ },
created() {
this.currentName = this.name;
-
- var _this = this
-
-
-
- if (uni.getStorageSync('identity') == '实操教练') {
- //教练
- _this.list = [
- // {
- // "pagePath": "/pages/tabbar/statistics/index",
- // "text": "统计",
- // "iconPath": require("../../static/images/tabbar/tj.png"),
- // "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
- // },
- // {
- // "pagePath": "/pages/tabbar/examSimulation/index",
- // "text": "考场模拟",
- // "iconPath": require("../../static/images/tabbar/kc.png"),
- // "selectedIconPath": require("../../static/images/tabbar/kcActive.png")
- // },
- {
- "pagePath": "/pages/tabbar/student/index",
- "text": "学员",
- "iconPath": require("../../static/images/tabbar/xy.png"),
- "selectedIconPath": require("../../static/images/tabbar/xyActive.png")
- },
- {
- "pagePath": "/pages/tabbar/operateTrain/index",
- "text": "实操训练",
- "iconPath": require("../../static/images/tabbar/sc.png"),
- "selectedIconPath": require("../../static/images/tabbar/scActive.png")
- },
- {
- "pagePath": "/pages/tabbar/mine/index",
- "text": "我的",
- "iconPath": require("../../static/images/tabbar/wd.png"),
- "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
- }
- ]
- } else if(uni.getStorageSync('identity') == '校长') {
- //校长
- _this.list = [{
- "pagePath": "/pages/tabbar/statistics/index",
- "text": "统计",
- "iconPath": require("../../static/images/tabbar/tj.png"),
- "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
- },
- {
- "pagePath": "/pages/tabbar/student/index",
- "text": "学员",
- "iconPath": require("../../static/images/tabbar/xy.png"),
- "selectedIconPath": require("../../static/images/tabbar/xyActive.png")
- },
- {
- "pagePath": "/pages/tabbar/mine/index",
- "text": "我的",
- "iconPath": require("../../static/images/tabbar/wd.png"),
- "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
- }
- ]
- }else if(uni.getStorageSync('identity') == '考场模拟教练'){
- _this.list = [{
- "pagePath": "/pages/tabbar/statistics/index",
- "text": "统计",
- "iconPath": require("../../static/images/tabbar/tj.png"),
- "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
- },
- {
- "pagePath": "/pages/tabbar/examSimulation/index",
- "text": "预约记录",
- "iconPath": require("../../static/images/tabbar/kc.png"),
- "selectedIconPath": require("../../static/images/tabbar/kcActive.png")
- },
- {
- "pagePath": "/pages/tabbar/mine/index",
- "text": "我的",
- "iconPath": require("../../static/images/tabbar/wd.png"),
- "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
- }]
- }else {
- // 模拟器老师
-
- }
+ this.initTabbar()
},
methods: {
switchTab(item, index) {
@@ -118,7 +41,87 @@
url
})
// uni.reLaunch({url:url})
- }
+ },
+ initTabbar() {
+ if (uni.getStorageSync('identity') == '实操教练') {
+ //教练
+ this.list = [
+ // {
+ // "pagePath": "/pages/tabbar/statistics/index",
+ // "text": "统计",
+ // "iconPath": require("../../static/images/tabbar/tj.png"),
+ // "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
+ // },
+ // {
+ // "pagePath": "/pages/tabbar/examSimulation/index",
+ // "text": "考场模拟",
+ // "iconPath": require("../../static/images/tabbar/kc.png"),
+ // "selectedIconPath": require("../../static/images/tabbar/kcActive.png")
+ // },
+ {
+ "pagePath": "/pages/tabbar/student/index",
+ "text": "学员",
+ "iconPath": require("../../static/images/tabbar/xy.png"),
+ "selectedIconPath": require("../../static/images/tabbar/xyActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/operateTrain/index",
+ "text": "实操训练",
+ "iconPath": require("../../static/images/tabbar/sc.png"),
+ "selectedIconPath": require("../../static/images/tabbar/scActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/mine/index",
+ "text": "我的",
+ "iconPath": require("../../static/images/tabbar/wd.png"),
+ "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
+ }
+ ]
+ } else if(uni.getStorageSync('identity') == '校长') {
+ //校长
+ this.list = [{
+ "pagePath": "/pages/tabbar/statistics/index",
+ "text": "统计",
+ "iconPath": require("../../static/images/tabbar/tj.png"),
+ "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/student/index",
+ "text": "学员",
+ "iconPath": require("../../static/images/tabbar/xy.png"),
+ "selectedIconPath": require("../../static/images/tabbar/xyActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/mine/index",
+ "text": "我的",
+ "iconPath": require("../../static/images/tabbar/wd.png"),
+ "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
+ }
+ ]
+ }else if(uni.getStorageSync('identity') == '考场模拟教练'){
+ this.list = [{
+ "pagePath": "/pages/tabbar/statistics/index",
+ "text": "统计",
+ "iconPath": require("../../static/images/tabbar/tj.png"),
+ "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/examSimulation/index",
+ "text": "预约记录",
+ "iconPath": require("../../static/images/tabbar/kc.png"),
+ "selectedIconPath": require("../../static/images/tabbar/kcActive.png")
+ },
+ {
+ "pagePath": "/pages/tabbar/mine/index",
+ "text": "我的",
+ "iconPath": require("../../static/images/tabbar/wd.png"),
+ "selectedIconPath": require("../../static/images/tabbar/wdActive.png")
+ }]
+ }else {
+ // 模拟器老师
+
+ }
+ }
}
}
diff --git a/components/user-info/user-info.vue b/components/user-info/user-info.vue
index 08a105a..ddc06e8 100644
--- a/components/user-info/user-info.vue
+++ b/components/user-info/user-info.vue
@@ -43,7 +43,7 @@
.name_row {
display: flex;
align-items: center;
- padding: 6rpx 20rpx 22rpx 0;
+ padding: 6rpx 20rpx 28rpx 0;
.name {
font-size: 48rpx;
diff --git a/manifest.json b/manifest.json
index de2d416..4cdbdbe 100644
--- a/manifest.json
+++ b/manifest.json
@@ -82,7 +82,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
- "target" : "http://192.168.1.36:48080/",
+ "target" : "http://192.168.1.39:48080/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {
diff --git a/pages.json b/pages.json
index bfac9fd..0e33eda 100644
--- a/pages.json
+++ b/pages.json
@@ -281,7 +281,7 @@
"style": {
"navigationBarTitleText": "考场信息",
"navigationStyle": "custom",
- "enablePullDownRefresh": false,
+ "enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 46539cf..1179cc8 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -58,17 +58,12 @@
list: [],
title: '请选择您要登录的角色',
showRole: false,
- roleObj: {
- schoolManager: '校长',
- schoolFinance: '驾校财务',
- coach: '实操教练',
- examSiteCoach: '考场模拟教练',
- bookingSimulationTeacher: '模拟器老师'
- }
+ roleObj: {}
}
},
onLoad() {
this.tenantPageFn()
+ this.roleObj = this.$store.state.user.vuex_role
},
computed: {
@@ -191,7 +186,6 @@
this.chooseIdentity(this.list[0].name)
}
console.log(this.list)
- return
}
}
diff --git a/pages/tabbar/mine/index.vue b/pages/tabbar/mine/index.vue
index f57a6c1..8bac552 100644
--- a/pages/tabbar/mine/index.vue
+++ b/pages/tabbar/mine/index.vue
@@ -2,6 +2,14 @@
+
+
+
+
+
+ 切换身份
+
+
@@ -19,6 +27,8 @@
+
+
@@ -27,40 +37,66 @@
export default {
data() {
return {
- tabData: []
+ tabData: [],
+ list: [],
+ showRole: false
}
},
onLoad() {
- if(this.identity=='实操教练') {
- this.tabData = [
- // {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'},
- // {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'},
- {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
- {text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'},
- {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
- {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
- // {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
- ]
- }else if(this.identity=='校长') {
- this.tabData = [
- {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
- {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
- {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
- {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
- ]
- }else if(this.identity=='考场模拟教练') {
- this.tabData = [
- {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
- {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
- ]
- }
- console.log('我的页面')
+
+ this.initMenu()
+ this.roleListFn()
},
onShow() {
uni.hideTabBar();
- this.getIpAddress()
+ // this.getIpAddress()
},
methods: {
+ initMenu() {
+ if(this.identity=='实操教练') {
+ this.tabData = [
+ // {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'},
+ // {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'},
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ {text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
+ // {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
+ ]
+ }else if(this.identity=='校长') {
+ this.tabData = [
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
+ ]
+ }else if(this.identity=='考场模拟教练') {
+ this.tabData = [
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ ]
+ }
+ },
+ // 切换角色
+ selectClick(item) {
+ this.showRole = false
+ this.$store.commit('upDateIdentity', item.name)
+ this.initMenu()
+ uni.switchTab({
+ url: '/pages/tabbar/index/index'
+ })
+ },
+ roleListFn() {
+ this.list = []
+ if(this.role.length<=1) return
+ let roleObj = this.$store.state.user.vuex_role
+ this.role.forEach((item)=>{
+ let obj = {
+ name: roleObj[item]
+ }
+ this.list.push(obj)
+ })
+ },
goPage() {},
getIpAddress() {
@@ -93,9 +129,22 @@
width: 76rpx;
height: 76rpx;
position: absolute;
- right: 16rpx;
- top: 50%;
- transform: translateY(-50%);
+ right: 24rpx;
+ bottom: 24rpx;
+ }
+ .cut_row {
+ display: flex;
+ justify-content: flex-end;
+ margin-bottom: 6rpx;
+ .cut_icon {
+ width: 24rpx;
+ height: 24rpx;
+ }
+ .cut_text {
+ font-size: 24rpx;
+ color: $themC;
+ margin-left: 5rpx;
+ }
}
}
diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue
index 9957564..efcffcf 100644
--- a/pages/tabbar/student/index.vue
+++ b/pages/tabbar/student/index.vue
@@ -139,7 +139,6 @@
},
onLoad() {
this.studentRecordPageFn()
- this.schoolClassFn()
},
methods: {
confirmDatePicker(val) {
diff --git a/pages/userCenter/myCar/myCar.vue b/pages/userCenter/myCar/myCar.vue
index aca59b9..0dc5a22 100644
--- a/pages/userCenter/myCar/myCar.vue
+++ b/pages/userCenter/myCar/myCar.vue
@@ -20,6 +20,10 @@
+
+
+
+
@@ -32,17 +36,31 @@
params: {
pageNo: 1,
pageSize: 20
- }
+ },
+ total: 20,
+ status: 'loading'
}
},
onLoad() {
this.carPageFn()
},
+ onPullDownRefresh() {
+ this.list = []
+ this.params.pageNo = 1
+ this.carPageFn().then(()=>{uni.stopPullDownRefresh()})
+ },
+ onReachBottom() {
+ if(this.total>this.list.length) {
+ this.carPageFn()
+ }
+ },
methods: {
async carPageFn() {
const {data: res} = await carPage(this.params)
this.params.pageNo ++
this.list.push(...res.list)
+ this.total = res.total
+ if(this.list.length>=this.total) this.status = 'nomore'
console.log(res)
}
}
diff --git a/static/images/userCenter/cut.png b/static/images/userCenter/cut.png
new file mode 100644
index 0000000..d1b74c3
Binary files /dev/null and b/static/images/userCenter/cut.png differ
diff --git a/store/modules/user.js b/store/modules/user.js
index b5b388c..7906860 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -8,6 +8,13 @@ const user = {
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {},
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},
vuex_TenantId: uni.getStorageSync('vuex_TenantId') ? uni.getStorageSync('vuex_TenantId') : '',
+ vuex_role: {
+ schoolManager: '校长',
+ schoolFinance: '驾校财务',
+ coach: '实操教练',
+ examSiteCoach: '考场模拟教练',
+ bookingSimulationTeacher: '模拟器老师'
+ }
},
mutations: {
// 更新用户身份