From 74aae0e4be286a768197bb5934fbf63776d9f645 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Tue, 31 Oct 2023 19:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appointItem-operate/appointItem-operate.vue | 33 +++++--- components/nodata/nodata.vue | 31 +++++++ components/pickDateTimer/pickDateTimer.vue | 13 ++- components/user-info/user-info.vue | 2 +- config/api.js | 6 +- config/request.js | 6 +- pages.json | 2 +- pages/login/login.vue | 2 + .../operate/mySchedule/detail/detail.vue | 14 +++- pages/tabbar/examSimulation/comp/simulation.vue | 11 +++ pages/tabbar/operateTrain/index.vue | 90 ++++++++++++++++----- static/images/index/carIcon.png | Bin 0 -> 1258 bytes static/images/index/listIcon.png | Bin 0 -> 403 bytes static/images/index/site.png | Bin 0 -> 1353 bytes static/images/index/timerIcon.png | Bin 0 -> 839 bytes 15 files changed, 170 insertions(+), 40 deletions(-) create mode 100644 components/nodata/nodata.vue create mode 100644 static/images/index/carIcon.png create mode 100644 static/images/index/listIcon.png create mode 100644 static/images/index/site.png create mode 100644 static/images/index/timerIcon.png diff --git a/components/appointItem-operate/appointItem-operate.vue b/components/appointItem-operate/appointItem-operate.vue index a221d6c..f2d6d95 100644 --- a/components/appointItem-operate/appointItem-operate.vue +++ b/components/appointItem-operate/appointItem-operate.vue @@ -3,10 +3,10 @@ - 张三三 18265468753 + {{item.studentName}} {{ item.studentPhone}} - 待上课 + {{loginStatusTxt[item.loginStatus]}} @@ -15,27 +15,27 @@ - + - 训练科目:科目二 + 训练科目:{{ subjectTxt[item.subject] }} - + - 预约场地:xxx场地 + 预约场地:{{item.siteName}} - + - 预约车辆:2号车(浙A99999) + 预约车辆:{{item.carNumber}} - + - 预约时间:2023/08/08 9:00—10:00 + 预约时间:{{$u.timeFormat(item.startTime, 'yyyy/mm/dd MM:ss')}} @@ -43,6 +43,15 @@ \ No newline at end of file diff --git a/components/pickDateTimer/pickDateTimer.vue b/components/pickDateTimer/pickDateTimer.vue index 2c7caba..54575ca 100644 --- a/components/pickDateTimer/pickDateTimer.vue +++ b/components/pickDateTimer/pickDateTimer.vue @@ -198,7 +198,14 @@ async initDate() { await this.getClassDateLimitFn() this.dateArr = getDates(this.startDate, this.endDate); + // let obj = { + // date: "2023-10-24", + // num: "24", + // week: "二" + // } + // this.dateArr[0][0] = obj this.chooseDay = this.dateArr[0][0].date + console.log(this.dateArr) this.scheduleClassGetFn() }, // 点击月份 @@ -219,8 +226,8 @@ chooseDate(item) { this.chooseDay = item.date this.scheduleClassGetFn() - console.log('*****') - console.log(this.chooseDay) + // console.log('*****') + // console.log(this.chooseDay) }, changeDateIndex(num) { if(this.currentDay==0&&num==-1) return this.$u.toast('已是可选最小日期') @@ -229,6 +236,8 @@ this.chooseDay = this.dateArr[this.currentDay][0].date }, chooseCourse(item) { + // this.$goPage('/pages/recordEntry/operate/mySchedule/detail/detail?id='+ item.id) + // return if(this.step!=2) { // 如果有预约 console.log(item) diff --git a/components/user-info/user-info.vue b/components/user-info/user-info.vue index eee1fad..08a105a 100644 --- a/components/user-info/user-info.vue +++ b/components/user-info/user-info.vue @@ -5,7 +5,7 @@ - 大乔{{identity=='校长'?'校长': '教练'}} + {{ vuex_userInfo.user.nickname}} diff --git a/config/api.js b/config/api.js index 10d1228..a74d51a 100644 --- a/config/api.js +++ b/config/api.js @@ -15,7 +15,7 @@ export const schoolPage = (params) => http.get('business/school/page', {params: // 获得租户分页 export const tenantPage = (params) => http.get('system/tenant/pages', {params: params, custom: { noToken: true }}) // 实操预约记录分页 -export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, }) +export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, header: {'contentType': 3} }) // 获得我的排课详情 export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, }) // 获得我的排课详情预约记录 @@ -40,6 +40,10 @@ export const scheduleTemplateUpdate = (data) => http.put('business/booking/sched export const scheduleTemplateGet = (params) => http.get('business/booking/schedule-template/get', {params} ,) // 训练场地 export const trainingSiteList = (params) => http.get('business/training-site/list', {params} ,) +// 获得考场模拟预约记录分页 +export const examSimulationPages = (params) => http.get('business/exam-simulation-record/page', {params} ,) + + diff --git a/config/request.js b/config/request.js index 2d2e92c..ae56f9f 100644 --- a/config/request.js +++ b/config/request.js @@ -14,9 +14,9 @@ module.exports = (vm) => { let prefix = config.custom.prefix?config.custom.prefix: httpPrefix /* config 为默认全局配置*/ config.baseURL = H5_API+ WX_API + prefix; /* 根域名 */ - console.log(config) + // console.log(config) config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId - + // config.dataType= 'xml' return config }) @@ -25,8 +25,10 @@ module.exports = (vm) => { console.log(config) let contentTypeIndex = config.header.contentType if(contentTypeIndex) { + // alert(contentTypeIndex) config.header['content-type'] = ContentType[contentTypeIndex] } + // config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8' // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{} config.data = config.data || {} // 根据custom参数中配置的是否需要token,添加对应的请求头 diff --git a/pages.json b/pages.json index 8bf35da..bfac9fd 100644 --- a/pages.json +++ b/pages.json @@ -161,7 +161,7 @@ "style": { "navigationBarTitleText": "我的排课详情", "navigationStyle": "custom", - "enablePullDownRefresh": false, + "enablePullDownRefresh": true, "backgroundTextStyle": "dark" } }, diff --git a/pages/login/login.vue b/pages/login/login.vue index c351ea9..46539cf 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -81,6 +81,7 @@ selectClick(item) { this.showRole = false this.chooseIdentity(item.name) + // alert(item.name) }, chooseIdentity(name) { // let val = '' @@ -177,6 +178,7 @@ await this.$store.dispatch('getUserInfo') console.log(this.role) + this.list = [] this.role.forEach((item)=>{ let obj = { name: this.roleObj[item] diff --git a/pages/recordEntry/operate/mySchedule/detail/detail.vue b/pages/recordEntry/operate/mySchedule/detail/detail.vue index 4812d52..74c0287 100644 --- a/pages/recordEntry/operate/mySchedule/detail/detail.vue +++ b/pages/recordEntry/operate/mySchedule/detail/detail.vue @@ -20,9 +20,9 @@ 预约学员 - - 张三三 17628378888 - 提交预约时间:2023/08/06 09:12:33 + + {{ item.studentName}} {{ item.studentPhone }} + 提交预约时间:{{item.classDate}} {{item.classTime}} @@ -37,12 +37,18 @@ info: {}, id: '', subjectText: ['不限', '科目二', '科目三'],//0:不限;2:科目二;3:科目三 + list: [] } }, onLoad(options) { this.id = options.id this.scheduleClassGetByIdFn() }, + onPullDownRefresh() { + this.scheduleClassGetByIdFn().then(()=>{ + uni.stopPullDownRefresh() + }) + }, methods: { async scheduleClassGetByIdFn() { const {data: res} = await scheduleClassGetById({id: this.id}) @@ -52,6 +58,8 @@ }, async getBookingDetailByClassIdFn(id) { const {data: res} = await getBookingDetailByClassId({classId: id}) + if(!res.length) return + this.list = res console.log(res) } } diff --git a/pages/tabbar/examSimulation/comp/simulation.vue b/pages/tabbar/examSimulation/comp/simulation.vue index 4a0deaa..d372246 100644 --- a/pages/tabbar/examSimulation/comp/simulation.vue +++ b/pages/tabbar/examSimulation/comp/simulation.vue @@ -50,6 +50,7 @@