diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue index 8506f0f..448c56c 100644 --- a/components/UserTab/UserTab.vue +++ b/components/UserTab/UserTab.vue @@ -33,7 +33,7 @@ //教练 _this.list = [{ "pagePath": "/pages/tabbar/statistics/index", - "text": "首页", + "text": "统计", "iconPath": require("../../static/images/tabbar/tj.png"), "selectedIconPath": require("../../static/images/tabbar/tjActive.png") }, diff --git a/pages/tabbar/operateTrain/index.vue b/pages/tabbar/operateTrain/index.vue index ec641f2..ee68cdc 100644 --- a/pages/tabbar/operateTrain/index.vue +++ b/pages/tabbar/operateTrain/index.vue @@ -14,20 +14,20 @@ @click="changeTab(item)">{{ item.text }} - + {{screen.subject}} - + {{screen.car}} - - {{screen.timer}} + + {{screen.timer}} @@ -40,6 +40,17 @@ + + + + + @@ -65,7 +76,22 @@ subject: '训练科目', car: '预约车辆', timer: '预约时间' - } + }, + showDatePicker: false, + showCar: false, + showSubject: false, + carArr: [ + [ + {lab: 'C1',id: 1}, + {lab: 'C2',id: 2}, + ] + ], + subjectArr: [ + [ + {lab: '浙00006',id: 1}, + {lab: '浙00007',id: 2}, + ] + ], } }, onLoad() { @@ -77,6 +103,23 @@ methods: { changeTab(item) { this.currentTab = item.id + }, + confirmDatePicker(val) { + this.showDatePicker = false + console.log(val) + console.log(uni.$u.date(val.value, 'yyyy-mm-dd')) + this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + console.log(this.screen.timer) + }, + confirmCar(val) { + let item = val.value[0] + this.screen.car = item.lab + this.showCar = false + }, + confirmSubject(val) { + let item = val.value[0] + this.screen.subject = item.lab + this.showSubject = false } } } @@ -146,10 +189,12 @@ background-color: #FFFFFF; line-height: 60rpx; align-items: center; - width: 28.6%; + width: 29%; .text { color: $themC; flex: 1; + white-space: nowrap; + text-align: center; } .downIcon { width: 24rpx; diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue index c035b9f..7bb251c 100644 --- a/pages/tabbar/student/index.vue +++ b/pages/tabbar/student/index.vue @@ -28,19 +28,19 @@ - - {{screen.timer}} + + {{screen.timer}} - + {{screen.car}} - + {{screen.className}} @@ -54,6 +54,17 @@ + + + + + @@ -65,12 +76,46 @@ timer: '报名时间', car: '全部车型', className: '全部班型' - } + }, + showDatePicker: false, + showCar: false, + showClass: false, + carArr: [ + [ + {lab: 'C1',id: 1}, + {lab: 'C2',id: 2}, + ] + ], + classArr: [ + [ + {lab: '普通班型',id: 1}, + {lab: 'C2vip',id: 2}, + ] + ], } }, onShow() { uni.hideTabBar(); }, + methods: { + confirmDatePicker(val) { + this.showDatePicker = false + console.log(val) + console.log(uni.$u.date(val.value, 'yyyy-mm-dd')) + this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + console.log(this.screen.timer) + }, + confirmCar(val) { + let item = val.value[0] + this.screen.car = item.lab + this.showCar = false + }, + confirmClass(val) { + let item = val.value[0] + this.screen.className = item.lab + this.showClass = false + } + } } @@ -137,17 +182,18 @@ justify-content: space-between; .selectItem { display: flex; - padding: 0 18rpx; + padding: 0 16rpx; border: 2rpx solid rgba(25,137,250,0.3); height: 60rpx; border-radius: 16rpx; background-color: #FFFFFF; line-height: 60rpx; align-items: center; - width: 28.6%; + width: 29%; .text { color: $themC; flex: 1; + text-align: center; } .downIcon { width: 24rpx;