diff --git a/components/tabbar/VNavigationBar.vue b/components/tabbar/VNavigationBar.vue new file mode 100644 index 0000000..28b6f92 --- /dev/null +++ b/components/tabbar/VNavigationBar.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/newPages/appointment/index.vue b/newPages/appointment/index.vue index 021e062..ab17bb8 100644 --- a/newPages/appointment/index.vue +++ b/newPages/appointment/index.vue @@ -154,7 +154,6 @@ }, tenantIdFlag: false }).then(res => { - console.log('获取预约列表', res) if (this.pageNo === 1) { this.total = res.data.total this.appointmentList = [] @@ -176,7 +175,6 @@ }, tenantIdFlag: false }).then(res => { - console.log('获取预约列表', res) if (this.pageNo === 1) { this.total = res.data.total this.appointmentList = [] diff --git a/newPages/appointmentAdd/index.vue b/newPages/appointmentAdd/index.vue index 1d256b2..5b8b988 100644 --- a/newPages/appointmentAdd/index.vue +++ b/newPages/appointmentAdd/index.vue @@ -135,7 +135,6 @@ export default { async onLoad() { this.getLoginUserCourseInfoList() this.timeColumns = await getDictDataByType('school_reserv_time'); - console.log('字典', this.timeColumns) }, onReady() { //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。 @@ -154,19 +153,14 @@ export default { this.appointmentInfo.userName = e.value[0].userName this.appointmentInfo.userId = e.value[0].userId this.getAllByCourseId(e.value[0].courseId) - console.log(e) this.showCourse = false }, confirmDate(e) { - console.log(e) this.appointmentInfo.dateStr = e[0] - console.log(this.appointmentInfo) this.showDate = false }, confirmTime(e) { - console.log(e) this.appointmentInfo.time = e.value[0].label - console.log(this.appointmentInfo) this.showTime = false }, restForm() { @@ -203,7 +197,6 @@ export default { }, //根据课程id查询报名进度 async getAllByCourseId(courseId) { - console.log('courseId', courseId) const res = await request({ url: '/app-api/process/getAllByCourseId', method: 'GET', @@ -217,7 +210,6 @@ export default { return item.status == 1 && item.subject != 1 && item.subject != 4 }) if (progress.length > 0) { - console.log('正在训练中的科目', progress) // 找出正在训练中的科目并且科目不是1和4 const subject = progress[0].subject this.$nextTick(() => { @@ -227,7 +219,6 @@ export default { this.appointmentInfo.coachName = progress[0].coachName this.appointmentInfo.coachId = progress[0].coachId this.appointmentInfo.trainTime = progress[0].trainTime - console.log('subject', this.appointmentInfo) } else { // 弹窗只能预约训练科目二 uni.showModal({ diff --git a/newPages/appointmentDetail/index.vue b/newPages/appointmentDetail/index.vue index 41dc561..037a193 100644 --- a/newPages/appointmentDetail/index.vue +++ b/newPages/appointmentDetail/index.vue @@ -78,13 +78,11 @@ export default { onLoad(options) { this.appointmentInfo = JSON.parse(options.data) this.getAllTrainTime() - console.log(this.appointmentInfo) if (options.type === 'train') { this.isTrain = true } else { this.isTrain = false } - console.log(this.isTrain) }, methods: { async getAllTrainTime() { @@ -98,9 +96,6 @@ export default { tenantIdFlag: false, }); - console.log("获取所有训练时间", res); - console.log("当前科目:", this.appointmentInfo.subject); - // 确保 appointmentInfo.subject 已有值 if (!this.appointmentInfo.subject) { console.warn("appointmentInfo.subject 为空,等待赋值..."); @@ -110,14 +105,8 @@ export default { (item) => item.subject == this.appointmentInfo.subject ); - console.log("匹配的训练时间数据:", data); - this.appointmentInfo.trainTime = data ? data.trainTime || "0" : "0"; - console.log( - "this.appointmentInfo.trainTime", - this.appointmentInfo.trainTime - ); } catch (error) { console.error("获取训练时间失败:", error); } diff --git a/newPages/courseDetail/assets/style/index.rpx.scss b/newPages/courseDetail/assets/style/index.rpx.scss index f07bc34..ca158d4 100644 --- a/newPages/courseDetail/assets/style/index.rpx.scss +++ b/newPages/courseDetail/assets/style/index.rpx.scss @@ -195,11 +195,13 @@ .text-wrapper_2 { background-color: rgba(223, 235, 255, 1); border-radius: 2px; - height: 36rpx; - width: 92rpx; + /* height: 36rpx; + width: 92rpx; */ + padding: 0 5rpx 0 5rpx; .text_7 { - width: 72rpx; - height: 24rpx; + /* width: 72rpx; + height: 24rpx; */ + overflow-wrap: break-word; color: rgba(44, 120, 245, 1); font-size: 24rpx; @@ -208,17 +210,20 @@ text-align: left; white-space: nowrap; line-height: 24rpx; - margin: 6rpx 0 0 10rpx; + margin: 6rpx 10rpx 0 10rpx; } } .text-wrapper_3 { background-color: rgba(255, 239, 229, 1); border-radius: 2px; - height: 36rpx; - width: 52rpx; + /* height: 36rpx; + width: 52rpx; */ + margin-left: 10rpx; + padding: 0 5rpx; .text_8 { - width: 32rpx; - height: 24rpx; + /* width: 32rpx; + height: 24rpx; */ + overflow-wrap: break-word; color: rgba(123, 81, 11, 1); font-size: 24rpx; @@ -227,7 +232,7 @@ text-align: left; white-space: nowrap; line-height: 24rpx; - margin: 6rpx 0 0 10rpx; + margin: 6rpx 10rpx 0 10rpx; } } } diff --git a/newPages/courseDetail/index.vue b/newPages/courseDetail/index.vue index 7bbb3c0..1f13063 100644 --- a/newPages/courseDetail/index.vue +++ b/newPages/courseDetail/index.vue @@ -82,11 +82,9 @@ export default { onLoad(options) { this.courseId = options.courseId; this.tenantId = options.tenantId; - console.log(options) this.getCourseDetails(); this.userDetails = getLocalUserInfo(); this.getServicePhone() - console.log('123123', this.userDetails) }, methods: { goBack() { @@ -105,8 +103,6 @@ export default { tenantIdFlag: false }).then(res => { this.courseDetails = res.data; - - console.log('驾校课程列表', this.schoolAllClassList); }) }, zxkf() { @@ -123,9 +119,6 @@ export default { } }).then(res => { this.driveSchoolPhone = res.data - console.log('客服电话res', res) - console.log('客服电话1', this.driveSchoolPhone) - console.log('客服电话2', this.driveSchoolPhone.phone) }) }, diff --git a/newPages/courseList/index.vue b/newPages/courseList/index.vue index 2bc54c1..084d8ad 100644 --- a/newPages/courseList/index.vue +++ b/newPages/courseList/index.vue @@ -62,8 +62,6 @@ export default { onLoad(options) { if (options.tenantId) { this.tenantId = options.tenantId - console.log("首页传入数据", options) - console.log("驾校租户id", this.tenantId) this.getSchoolAllClass() } }, @@ -88,7 +86,6 @@ export default { }).then(res => { this.schoolAllClassList = res.data; this.total = res.data.total; - console.log('驾校课程列表', this.schoolAllClassList); }) }, diff --git a/newPages/evaluate/assets/style/index.rpx.scss b/newPages/evaluate/assets/style/index.rpx.scss index 77798e3..40af3ad 100644 --- a/newPages/evaluate/assets/style/index.rpx.scss +++ b/newPages/evaluate/assets/style/index.rpx.scss @@ -33,7 +33,8 @@ } .group_4 { width: 750rpx; - height: 1534rpx; + // height: 1534rpx; + height: 100%; margin-bottom: 2rpx; .group_5 { background-color: rgba(255, 255, 255, 1); @@ -93,9 +94,8 @@ } .list_1 { width: 686rpx; - height: 464rpx; - justify-content: space-between; - margin: 20rpx 0 954rpx 32rpx; + justify-content: center; + margin: 20rpx 0 0 32rpx; .list-items_1 { background-color: rgba(255, 255, 255, 1); border-radius: 8px; diff --git a/newPages/evaluate/index.vue b/newPages/evaluate/index.vue index fe70b38..d0417f3 100644 --- a/newPages/evaluate/index.vue +++ b/newPages/evaluate/index.vue @@ -9,7 +9,7 @@ { - console.log(res) this.total = res.data.total if (this.pageNo == 1) { this.evaluate = res.data.records @@ -139,7 +139,7 @@ export default { // 获取屏幕高度 const screenHeight = uni.getSystemInfoSync().windowHeight; // 获取顶部区域高度 - const topHeight = 160; + const topHeight = 120; // 计算滚动区域高度 this.scrollHeight = screenHeight - topHeight; }, @@ -185,4 +185,9 @@ export default { text-overflow: ellipsis; } +.itemContent { + height: 100% !important; /* 确保高度生效 */ + flex: 1; /* 填充剩余空间 */ +} + diff --git a/newPages/evaluateAdd/index.vue b/newPages/evaluateAdd/index.vue index 9b4cb82..763e6af 100644 --- a/newPages/evaluateAdd/index.vue +++ b/newPages/evaluateAdd/index.vue @@ -93,7 +93,6 @@ }, onLoad(options) { const data = JSON.parse(options.data); - console.log('穿进来的数据'); // 判断新增还是查看 if (options.controls) { this.show = true @@ -121,8 +120,6 @@ } else { Object.assign(this.info, data); } - - console.log(this.info) }, methods: { changeRate() {}, diff --git a/newPages/examinationAdd/index.vue b/newPages/examinationAdd/index.vue index c772edd..f852506 100644 --- a/newPages/examinationAdd/index.vue +++ b/newPages/examinationAdd/index.vue @@ -164,7 +164,6 @@ export default { }, onLoad(options) { this.userInfo = getLocalUserInfo() - console.log('userInfo', this.userInfo) this.getUserOrderDetails() this.process.subject = options.subject this.opTenantId = options.tenantId @@ -180,8 +179,6 @@ export default { this.process.userId = this.userInfo.id this.process.coachId = options.coachId this.process.userName = options.nickname - console.log('options', options) - console.log('batchItemId', this.batchItemId) }, computed: { displayFileList() { @@ -209,8 +206,6 @@ export default { }); }, ifPassOnConfirm(value) { - console.log('选中的值:', value); - const statusMap = { '已通过': 1, '未通过': 0 @@ -218,17 +213,11 @@ export default { // 更新数据 this.process.examStatus = statusMap[value.value[0]]; - console.log('value[0]', value.value[0]) this.selectedValue = value.value[0]; this.show = false; - - console.log('examStatus:', this.process.examStatus); - console.log('process', this.process) }, subjectOnConfirm(value) { - console.log('选中的值:', value); - const statusMap = { '科目一': 1, '科目四': 4 @@ -236,16 +225,11 @@ export default { // 更新数据 this.process.subject = statusMap[value.value[0]]; - console.log('value[0]', value.value[0]) this.subjectValue = value.value[0]; this.subjectShow = false; - - console.log('subject:', this.process.subject); - console.log('process', this.process) }, onConfirmExamTime(value) { - console.log("选中的时间:", value); this.process.examTime = value; this.showTimePicker = false; }, @@ -292,7 +276,6 @@ export default { } }, uploadFilePromise(filePath) { - console.log('图片地址', filePath) return new Promise((resolve, reject) => { upload({ url: '/app-api/small-upload/common/upload', @@ -300,8 +283,6 @@ export default { }).then((res) => { if (res.data && res.data.url) { resolve(res.data.url); - console.log('返回', res) - console.log('返回url', res.data.url) } else { reject(new Error('上传失败')); } @@ -321,7 +302,6 @@ export default { tenantIdFlag: false }).then(res => { this.orderList = res.data.records; - console.log('订单信息', res.data) if (res.data.records.length > 0) { const tempData = res.data.records[0] if (this.process.subject != 2 && this.process.subject != 3) { @@ -339,8 +319,6 @@ export default { }, getCourseCompleteStatus() { - console.log('userId', this.userId) - console.log('courseId', this.process.courseId) request({ url: '/app-api/process/page', method: 'GET', @@ -350,17 +328,11 @@ export default { } }).then(res => { this.courseCompleteStatusList = res.data.records - console.log('res.data', res.data) if (this.courseCompleteStatusList.length > 0) { - console.log('courseCompleteStatusList', this.courseCompleteStatusList) const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2) const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3) - console.log('subject2', subject2) - console.log('subject3', subject3) - console.log(subject2?.status === '2' && subject3?.status === '2') if (subject2?.status === '2' && subject3?.status === '2') { - console.log(subject2?.status === 2 && subject3?.status === 2) this.subjectColumns = [['科目一', '科目四']] } } @@ -381,20 +353,16 @@ export default { }, saveDataOne() { if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) { - console.log('this.courseCompleteStatusList', this.courseCompleteStatusList) uni.showToast({title: '请联系驾校人员', icon: 'none'}); return; } if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) { - uni.showToast({title: '请联系驾校人员', icon: 'none'}); return; } - console.log('courseCompleteStatusList', this.courseCompleteStatusList.length) this.process.images = this.fileList?.map(item => item.url).join(',') || ''; - console.log('process', this.process) if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) { uni.showToast({title: '信息填写不完整', icon: 'none'}); @@ -432,8 +400,6 @@ export default { remark: this.process.remark, images: this.fileList?.map(item => item.url).join(',') || '', } - - console.log('提交数据是:', postData) /* this.process.userId = this.userInfo.id this.process.tenantId = this.opTenantId this.process.fraction = this.process.examScore diff --git a/newPages/examinationList/index.vue b/newPages/examinationList/index.vue index 70bcd14..3bb516d 100644 --- a/newPages/examinationList/index.vue +++ b/newPages/examinationList/index.vue @@ -48,45 +48,12 @@ - + {{ getButtonInfo(item).text }} - + @@ -185,6 +152,7 @@ export default { }, + // 点击笔试成绩录入的时候 检查是否已报名课程 onEnterScoreClick() { if (this.courseList.length > 0) { this.pickerColumns = this.courseList.map(item => ({ @@ -193,21 +161,17 @@ export default { })); this.pickerShow = true; } else if (this.courseList.length === 1) { - console.log('1231231',this.courseList[0]) this.goToScoreEntry(this.courseList[0]); } else { this.$u.toast("暂无课程信息"); } }, + // 选择课程后检查是否有课程进度信息 onPickerConfirm(e) { const selectedCourseId = e.value[0]; const selectedCourse = this.courseList.find(item => item.courseId === selectedCourseId.value); - console.log('courseList', this.courseList); - console.log('selectedCourseId', selectedCourseId); - console.log('selectedCourse', selectedCourse); - if (selectedCourse) { this.getProcess(selectedCourse.courseId).then(processData => { if (!processData || processData.length === 0) { @@ -224,7 +188,6 @@ export default { ); if (hasSubject1Or4) { - console.log('selectedCourse', this.selectedCourse) this.goToScoreEntry(selectedCourse); } else { uni.showToast({ @@ -238,8 +201,8 @@ export default { this.pickerShow = false; }, + // 跳转成绩录入界面 goToScoreEntry(course) { - console.log('course', course) this.$u.route({ url: '/newPages/examinationAdd/index', params: { @@ -252,6 +215,7 @@ export default { }); }, + // 获取课程进度 getProcess(courseId) { return new Promise((resolve, reject) => { request({ @@ -262,7 +226,6 @@ export default { courseId: courseId, } }).then(res => { - console.log('res123', res); this.processList = res.data; resolve(res.data); }).catch(err => { @@ -272,6 +235,7 @@ export default { }); }, + // 获取考试信息 getExamList() { request({ url: '/app-api/process/getExamListByUserId', @@ -281,13 +245,11 @@ export default { } }).then(res => { this.examList = res.data - this.getExamTwoList() - console.log('examList', this.examList) - console.log('res', res) + // this.getExamTwoList() this.isTriggered = false }) }, - getExamTwoList() { + /* getExamTwoList() { request({ url: '/app-api/examBatch/selectExamByUserIdAndCoachId', method: 'GET', @@ -299,16 +261,19 @@ export default { console.log('examTwoList', this.examTwoList) console.log('resTwo', res) }) - }, + }, */ + + // 获取课程信息 getCourseList() { request({ url: '/app-api/small/drive/school-course-order/getCourseByLoginUser', method: 'GET' }).then(res => { this.courseList = res.data - console.log('res111', res) }) }, + + // 转换考试状态 getStatusText(status) { const statusMap = { 0: '未通过', @@ -321,7 +286,7 @@ export default { return statusMap[status] || '未知状态'; }, - + // 转换科目 getCourseTypeText(status) { const statusMap = { '1': '科目一', @@ -331,6 +296,8 @@ export default { }; return statusMap[status] || '未知状态'; }, + + // 格式化时间 formatDate(timestamp) { const date = new Date(timestamp); const year = date.getFullYear(); @@ -348,8 +315,8 @@ export default { this.scrollHeight = screenHeight - topHeight; }, + getButtonInfo(item) { - console.log('item', item) if (item.fraction == null) { return {text: '成绩录入', type: 'input'} } else if (!item.ifPass) { @@ -364,6 +331,7 @@ export default { // } }, + // handleButtonClick(item) { const buttonInfo = this.getButtonInfo(item) diff --git a/newPages/information/index.vue b/newPages/information/index.vue index 4211896..a5dddcf 100644 --- a/newPages/information/index.vue +++ b/newPages/information/index.vue @@ -24,7 +24,7 @@ :maxCount="1" width="70rpx" height="70rpx" - border-radius="50%" + > + + + {{ nowReadItem.templateContent }} + + + + + + + + + diff --git a/newPages/my/assets/style/index.rpx.scss b/newPages/my/assets/style/index.rpx.scss index c5d3b9e..a47c34b 100644 --- a/newPages/my/assets/style/index.rpx.scss +++ b/newPages/my/assets/style/index.rpx.scss @@ -89,14 +89,17 @@ background-color: rgba(255, 255, 255, 1); height: 116rpx; width: 116rpx; + border-radius: 10rpx; .image-wrapper_2 { background-color: rgba(177, 205, 255, 1); height: 108rpx; width: 108rpx; margin: 4rpx 0 0 4rpx; + border-radius: 10rpx; .image_2 { width: 108rpx; height: 108rpx; + border-radius: 10rpx; } } } @@ -171,12 +174,13 @@ .label_2 { width: 80rpx; height: 80rpx; + border-radius:10rpx; } } .text-group_3 { width: 112rpx; height: 72rpx; - margin: 34rpx 0 0 10rpx; + margin: 34rpx 0 0 30rpx; .text_4 { width: 84rpx; height: 28rpx; @@ -336,8 +340,10 @@ width: 646rpx; height: 56rpx; margin: 50rpx 0 0 52rpx; + background-color: #000; .image-wrapper_4 { - background-color: rgba(223, 235, 255, 1); + // background-color: rgba(223, 235, 255, 1); + background-color: #aa0000; border-radius: 50%; height: 56rpx; width: 56rpx; @@ -404,6 +410,8 @@ width: 646rpx; height: 56rpx; margin: 50rpx 0 436rpx 52rpx; + display: flex; + justify-content: space-between; .image-wrapper_6 { background-color: rgba(223, 235, 255, 1); border-radius: 50%; @@ -416,7 +424,7 @@ } } .text_13 { - width: 128rpx; + width: 500rpx; height: 32rpx; overflow-wrap: break-word; color: rgba(51, 51, 51, 1); @@ -502,4 +510,111 @@ line-height: 28rpx; margin: 10rpx 0 40rpx 30rpx; } + + /* .menu-list { + margin-top: 20rpx; + background-color: #fff; + border-radius: 20rpx; + overflow: hidden; + padding: 0 20rpx; + } + + .menu-item { + display: flex; + align-items: center; + justify-content: center; + padding: 30rpx 10rpx; + border-bottom: 1rpx solid #f0f0f0; + + &:last-child { + border-bottom: none; + } + } + + .menu-icon { + width: 32rpx; + height: 32rpx; + margin: 12rpx 20rpx 0 12rpx; + } + + .menu-text { + flex: 1; + font-size: 30rpx; + color: #333; + } + + .menu-arrow { + width: 32rpx; + height: 32rpx; + margin: 12rpx 0 0 400rpx; + } */ + + .menu-list { + margin: 20rpx 32rpx; + background-color: #fff; + border-radius: 16rpx; + overflow: hidden; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); + + .menu-item, .menu-item-btn { + display: flex; + align-items: center; + padding: 40rpx 32rpx; + // border-bottom: 1rpx solid #f5f5f5; + position: relative; + + &:last-child { + border-bottom: none; + } + + .menu-icon { + width: 36rpx; + height: 36rpx; + margin-right: 24rpx; + flex-shrink: 0; + } + + .menu-text { + flex: 1; + font-size: 30rpx; + color: #333; + font-weight: 400; + } + + .menu-arrow { + width: 24rpx; + height: 24rpx; + margin-left: auto; + flex-shrink: 0; + } + + .message-num { + margin-right: 16rpx; + width: 36rpx; + height: 36rpx; + background: #ff4d4f; + border-radius: 50%; + color: #fff; + font-size: 24rpx; + display: flex; + align-items: center; + justify-content: center; + } + } + + .menu-item-btn { + text-align: left; + justify-content: flex-start; + background: none; + border: none; + padding: 0; + line-height: normal; + width: 100%; + &::after { + display: none !important; + border: none !important; + } + } + + } } diff --git a/newPages/my/index.vue b/newPages/my/index.vue index a7e36a4..9fd16f6 100644 --- a/newPages/my/index.vue +++ b/newPages/my/index.vue @@ -76,7 +76,9 @@ - + + + + + + + + + + + 个人信息 + + + + + + + + + + 消息中心 + {{ noReadNum }} + + + + @@ -155,6 +214,7 @@ export default { processList: {}, showQrCode: false, isCreateQrCode:true, + noReadNum:0, loopData: [ { url: '/static/myImgs/alreadyPaid.png', @@ -187,7 +247,6 @@ export default { }, onLoad() { this.selfInfoLocal = getLocalUserInfo() - console.log("用户信息", this.selfInfoLocal) this.getUserInfo() }, onShow() { @@ -234,7 +293,6 @@ export default { this.showQrCode = false }, openQrCode(){ - console.log(this.userDetails,'202222') // 判断是否有二维码 有了不需要绘制 if (this.isCreateQrCode){ this.createQrCode(this.userDetails.uniqueCode) @@ -262,6 +320,11 @@ export default { url: `/newPages/information/index?userId=${this.selfInfo.id}` }) }, + goFeedback(){ + uni.navigateTo({ + url: "/newPages/messageCenter/index" + }) + }, getUserInfo() { @@ -275,7 +338,7 @@ export default { } this.getOrder() this.getStudentInfo() - console.log('userDetails', this.selfInfo) + this.getNoReadNum() }) }, getStudentInfo(){ @@ -284,7 +347,6 @@ export default { method: 'GET', params: { userId: this.selfInfo.id } }).then(res => { - console.log('userDetailsRes', res) this.userDetails = { ...res.data }; }); }, @@ -298,7 +360,6 @@ export default { } }).then(res => { this.coachDetails = res.data - console.log('coachDetails', this.coachDetails); }) }, @@ -309,7 +370,6 @@ export default { }).then(res => { this.orderList = res.data if (this.orderList.length > 0) { - console.log('orderList', this.orderList) this.getProcess(this.orderList[0].courseId) } @@ -345,13 +405,25 @@ export default { // 如果没有数据,result 保持 null } - console.log('最终结果:', result); // 调试用,可删除 return result; // 如果需要返回结果,可以加上 return }).catch(error => { console.error('请求出错:', error); return null; // 出错时也返回 null }); - } + }, + + //获取未读消息数量 + async getNoReadNum(){ + await request({ + url: "/app-api/system/notify-message/get-unread-count", + method: "GET", + tenantIdFlag:false + }).then((res) => { + if(res.code==0){ + this.noReadNum = res.data + } + }) + }, } }; diff --git a/newPages/newIndex/assets/style/index.rpx.scss b/newPages/newIndex/assets/style/index.rpx.scss index 328b4d4..c5e8ef0 100644 --- a/newPages/newIndex/assets/style/index.rpx.scss +++ b/newPages/newIndex/assets/style/index.rpx.scss @@ -103,7 +103,7 @@ } .section_2 { width: 750rpx; - height: 1108rpx; + height: 1020rpx; .list_1 { width: 618rpx; height: 112rpx; diff --git a/newPages/newIndex/index.vue b/newPages/newIndex/index.vue index 72051de..d9ed936 100644 --- a/newPages/newIndex/index.vue +++ b/newPages/newIndex/index.vue @@ -115,7 +115,7 @@ export default { }).then(res => { res.data.records.forEach(item => { item.features = ['有接送', '规模大'] - item.imageUrl = '/static/lanhu_shouye2gai/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png' + item.imageUrl = this.imageUrl + '/' + item.photo }) this.schoolList = this.schoolList.concat(res.data.records) this.isTriggered = false @@ -148,7 +148,6 @@ export default { item.swiperPicture = this.imageUrl + item.swiperPicture }) this.swiperList = res.data - console.log('轮播图', this.swiperList) }) }, /** @@ -182,7 +181,7 @@ export default { }, goSchoolDetail(data) { uni.navigateTo({ - url: `/newPages/schoolDetail/index?id=${data.id}&tenantId=${data.tenantId}`, + url: `/newPages/schoolDetail/index?id=${data.id}&tenantId=${data.tenantId}&schoolName=${data.corpName}`, // url: '/newPages/schoolDetail/index', }); }, diff --git a/newPages/orderDetails/index.vue b/newPages/orderDetails/index.vue new file mode 100644 index 0000000..a27f727 --- /dev/null +++ b/newPages/orderDetails/index.vue @@ -0,0 +1,679 @@ + + + + + + diff --git a/newPages/orderList/assets/style/index.rpx.scss b/newPages/orderList/assets/style/index.rpx.scss index 0f4d47c..083f63a 100644 --- a/newPages/orderList/assets/style/index.rpx.scss +++ b/newPages/orderList/assets/style/index.rpx.scss @@ -93,16 +93,16 @@ } } .list_1 { - width: 686rpx; + width: 720rpx; height: 766rpx; justify-content: space-between; - margin: 112rpx 0 560rpx 32rpx; + margin: 112rpx 20rpx 560rpx 20rpx; .list-items_1 { background-color: rgba(255, 255, 255, 1); border-radius: 8px; - height: 242rpx; + height: 250rpx; margin-bottom: 20rpx; - width: 686rpx; + width: 710rpx; .box_6 { width: 646rpx; height: 40rpx; @@ -221,7 +221,7 @@ background-color: rgba(223, 235, 255, 1); border-radius: 2px; height: 36rpx; - width: 92rpx; + width: 52rpx; position: absolute; left: 232rpx; top: 48rpx; @@ -241,6 +241,28 @@ } } } + .action-buttons { + width: 100%; + // padding: 0 20rpx 20rpx; + margin-top: -10rpx; + + .action-btn { + height: 55rpx; + line-height: 55rpx; + border-radius: 18rpx; + font-size: 20rpx; + padding: 0 20rpx; + margin: 0 40rpx; + // background-color: #b1b1b1; + border: 1rpx solid #b1b1b1; + color: #636363; + + &::after { + border: none; + } + } + + } } } .group_2 { diff --git a/newPages/orderList/index.vue b/newPages/orderList/index.vue index 74fe438..7374d31 100644 --- a/newPages/orderList/index.vue +++ b/newPages/orderList/index.vue @@ -24,7 +24,7 @@ :refresher-triggered="isRefreshing" @refresherrefresh="onRefresherrefresh" > - + 订单号: {{item.orderNo}} @@ -44,19 +44,25 @@ {{item.courseName}} - {{item.reserveMoney}} - {{item.reserveMoney}} + ¥{{item.reserveMoney}} + + - - {{item.type}} - + {{item.type}} + + + + + @@ -158,12 +164,17 @@ export default { loading: false, isRefreshing: false, statusMap: { - 5: {name: '已完成', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'}, - 4: {name: '已面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'}, - 3: {name: '待面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'}, - 2: {name: '已付款', background: 'rgba(255,244,228,1)', color: 'rgba(237,162,58,1)'}, - 1: {name: '未付款', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'}, - 0: {name: '待支付', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'}, + 8: { name: '退款成功', background: '#fef0f0', color: '#f56c6c' }, // 红色柔和 + 7: { name: '退款中', background: '#fef0f0', color: '#f56c6c' }, // 红色柔和 + 6: { name: '申请退款', background: '#fef0f0', color: '#f56c6c' }, // 红色柔和 + + 5: { name: '已完成', background: '#f0f9eb', color: '#67c23a' }, // 绿色完成 + 4: { name: '已面签', background: '#ecf5ff', color: '#409EFF' }, // 蓝色稳定 + 3: { name: '待面签', background: '#fdf6ec', color: '#e6a23c' }, // 橙色提醒 + + 2: { name: '已支付', background: '#f0f9eb', color: '#67c23a' }, // 绿色支付成功 + 1: { name: '已取消', background: '#f4f4f5', color: '#909399' }, // 灰色中立 + 0: { name: '待支付', background: '#fdf6ec', color: '#e6a23c' }, // 橙色提醒 } }; }, @@ -175,11 +186,6 @@ export default { // this.type = options.type; // this.getUserOrderDetails(this.orderType); // 页面加载时请求数据 // this.getUserOrderDetails(options.orderType); - console.log('options', options) - console.log('type', this.type) - console.log('type', this.type === 2) - console.log('orderType', this.orderType) - console.log('orderType', this.orderType === 2) this.changeOrderType(this.orderType, this.type) }, @@ -225,23 +231,7 @@ export default { this.getUserOrderDetails(this.orderType, true); }, - /* getUserOrderDetails(paymentStatus) { - console.log(paymentStatus) - console.log(this.userId) - request({ - url: '/app-api/small/drive/school-course-order/page', - method: 'GET', - params: { - userId: this.userId, - paymentStatus:paymentStatus - }, - tenantIdFlag : false - }).then(res => { - this.orderList = res.data.records; - console.log('订单信息',res.data) - }); - }, */ - + // 获取用户订单详情 getUserOrderDetails(paymentStatus, isRefresh = false) { if (!isRefresh && this.loading) return; @@ -272,8 +262,6 @@ export default { this.total = res.data.total; this.loading = false; - - console.log('订单信息', res.data); }).catch(err => { this.loading = false; this.isRefreshing = false; @@ -283,18 +271,21 @@ export default { console.error('获取订单失败', err); }); }, + + // 判断选择的标签 changeOrderType(orderType, type) { this.orderType = orderType; this.type = type; this.pageNo = 1; - console.log('type', type) - console.log('orderType', orderType) this.getUserOrderDetails(orderType); // 切换 Tab 时重新请求数据 // this.updateUnderlinePosition(type); }, + // 支付状态 getStatusStyle(status) { return this.statusMap[status] || {name: '未知状态', background: '', color: ''}; }, + + // 获取课程详情 getCourseDetails() { request({ url: '/app-api/dl-drive-school-course-small/get', @@ -308,6 +299,15 @@ export default { this.courseDetails = res.data; }) }, + + // 订单详情 + goOrderDetails(data){ + uni.navigateTo({ + // url: `/newPages/orderDetails/index?data=${data}` + url: `/newPages/orderDetails/index?data=${encodeURIComponent(JSON.stringify(data))}` + }) + }, + calculateScrollHeight() { // 获取屏幕高度 const screenHeight = uni.getSystemInfoSync().windowHeight; @@ -316,11 +316,6 @@ export default { // 计算滚动区域高度 this.scrollHeight = screenHeight - topHeight; }, - /* updateUnderlinePosition(type) { - const index = parseInt(type) - 1; // 计算选中的索引(从 0 开始) - const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 假设有 4 个选项,均分屏幕宽度 - this.underlinePosition = index * tabWidth; - }, */ } }; diff --git a/newPages/register/index.vue b/newPages/register/index.vue index 76538b9..9369bb6 100644 --- a/newPages/register/index.vue +++ b/newPages/register/index.vue @@ -21,7 +21,7 @@ ¥{{ rightInfoList.price }} - ¥{{ rightInfoList.price }} + @@ -205,6 +205,7 @@ export default { userinfo: [], payPrice: null, payStatus: null, + oldOrderDetails: [], loading: false, columns: [ [{ @@ -232,11 +233,6 @@ export default { this.userId = option.userId, this.tenantId = option.tenantId this.userinfo = getLocalUserInfo() - console.log("驾校id", this.jxId, "课程id", this.courseId) - console.log("userId", this.userId, "tenantId", this.tenantId) - console.log("userinfo", this.userinfo) - console.log('当前存储的所有键:', uni.getStorageInfoSync().keys) - console.log('token值:', uni.getStorageSync('App-Token')) }, onShow() { this.getListAll() @@ -292,7 +288,6 @@ export default { }, tenantIdFlag: false }) - console.log(res); this.columnjl = [ res.data.map(coach => ({ label: coach.name, @@ -312,7 +307,6 @@ export default { }, // 选择教练 jlconfirm(e) { - console.log("选中教练:", e.value[0]); this.jlName = e.value[0].label; // 显示名称 this.jlId = e.value[0].value.userId; // 获取教练ID this.showjl = false; @@ -414,7 +408,6 @@ export default { // 3. 创建新订单 await this.createNewOrder(); } catch (error) { - console.error("报名出错:", error); if (!error.message.includes('cancel')) { uni.showToast({title: error.message || '操作失败', icon: 'none'}); } @@ -493,16 +486,28 @@ export default { adress: this.Address, name: this.name, tenantId: this.tenantId, - type: this.rightInfoList.price, - money: this.getRightInfoList, + type: this.rightInfoList.type, + carType: this.getLicenseTypeDescription(this.rightInfoList.type), + money: this.rightInfoList.price, indent: this.identity, phone: this.phone, time: this.getCurrentDateTime() + }; - uni.navigateTo({ + /* uni.navigateTo({ url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData)) - }); - } + }); */ + uni.navigateTo({ + url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData)) + + '&callback=' + encodeURIComponent('handleContractSigned') + }); + } else { + uni.showToast({ + title: '订单创建失败,请稍后再试', + icon: 'none', + duration: 2000 + }); + } }, async getRightInfoList() { @@ -512,11 +517,15 @@ export default { }) this.rightInfoList = res.data, this.currentPrice = this.rightInfoList.price; - console.log("111222333", this.rightInfoList) }, + + // 线下支付合同签署完成后调用的方法 + handleContractSigned() { + this.insertSchoolStudent(); + }, // 处理已存在的订单 - async processExistingOrder() { + /* async processExistingOrder() { uni.showLoading({title: '准备支付...', mask: true}); try { @@ -526,17 +535,7 @@ export default { url: `/small/jxInfo/prepayment?type=jsapi&orderNo=${this.orderNo}&orderId=${this.orderId}&payType=${payType}`, method: 'get' }); - /* if(res.userName != this.name || - res.userPhone != this.phone || - res.coachUserId != this.jlId || - res.coachUserName != jlName || - res.userNo != this.identity || - res.userSex != this.sex || - res.reserveMoney != this.payPrice || - res.payType != this.payType - res.restMoney != ){ - - } */ + const result = await this.handleWxPayment(res); if (result === 'success') { @@ -554,8 +553,141 @@ export default { } finally { uni.hideLoading(); } - }, + }, */ + + async processExistingOrder() { + uni.showLoading({title: '准备支付...', mask: true}); + + try { + // 1. 准备当前数据 + const payType = this.selectedPayType; + const reserveMoney = payType === 1 + ? this.rightInfoList.reserveMoney + : this.rightInfoList.price; + const restMoney = payType === 1 + ? this.rightInfoList.price - reserveMoney + : 0; + + // 2. 获取并对比订单数据 + const orderDetail = await this.getOrderDetail(this.orderId); + const needUpdate = this.checkOrderNeedUpdate(orderDetail, { + userName: this.name, + userPhone: this.phone, + coachUserId: this.jlId, + coachUserName: this.jlName, + userNo: this.identity, + userSex: this.sex, + reserveMoney: reserveMoney, + payType: payType, + restMoney: restMoney + }); + + // 3. 更新订单数据(如有变更) + if (needUpdate) { + this.orderNo = await this.generateOrderNo() + await this.updateOrderData({ + id: this.orderId, + userName: this.name, + userPhone: this.phone, + userSex: this.sex, + userNo: this.identity, + coachUserName: this.jlName, + coachUserId: this.jlId, + reserveMoney: reserveMoney, + payType: payType, + restMoney: restMoney, + orderNo: this.orderNo, + paymentStatus: '0' // 重置为未支付状态 + }); + + // 更新成功后保存新的原始数据 + this.saveOriginalFormData(); + } + + // 4. 处理支付 + if (this.startPay === 1) { + const res = await request({ + url: `/small/jxInfo/prepayment?type=jsapi&orderNo=${this.orderNo}&orderId=${this.orderId}&payType=${payType}`, + method: 'get' + }); + + const result = await this.handleWxPayment(res); + if (result === 'success') { + await Promise.all([ + this.updateOrderStatus(this.orderId, '2'), + this.insertSchoolStudent() + ]); + this.signContract(); + } + return result; + } else { + this.xxiaPayClick(); + return 'success'; + } + } finally { + uni.hideLoading(); + } + }, + + // 检查订单是否需要更新 + checkOrderNeedUpdate(orderDetail, currentData) { + const fieldsToCheck = [ + 'userName', + 'userPhone', + 'coachUserId', + 'coachUserName', + 'userNo', + 'userSex', + 'reserveMoney', + 'payType', + 'restMoney' + ]; + + return fieldsToCheck.some(field => { + // 特殊处理数字类型的字段 + if (['reserveMoney', 'restMoney'].includes(field)) { + return Number(orderDetail[field]) !== Number(currentData[field]); + } + return orderDetail[field] !== currentData[field]; + }); + }, + // 获取订单详情 + async getOrderDetail(orderId) { + const res = await request({ + url: '/app-api/small/drive/school-course-order/get?id=' + orderId, + method: 'GET' + }); + return res.data; + }, + + // 更新订单数据 + async updateOrderData(orderData) { + const res = await request({ + url: '/app-api/small/drive/school-course-order/update', + method: 'put', + data: orderData + }); + return res.data; + }, + + saveOriginalFormData() { + this.originalFormData = { + jlName: this.jlName, // 教练姓名 + jlId: this.jlId, // 教练ID + sfzimg: this.sfzimg, // 身份证照片 + name: this.name, // 学员姓名 + age: this.age, // 年龄 + sex: this.sex, // 性别 + identity: this.identity, // 身份证号 + phone: this.phone, // 手机号 + selectedPayType: this.selectedPayType, // 支付类型(1:定金 2:全款) + currentPrice: this.currentPrice, // 当前显示价格 + reserveMoney: this.rightInfoList.reserveMoney, // 定金金额 + restMoney: this.rightInfoList.price - this.rightInfoList.reserveMoney // 尾款金额 + }; + this.formModified = false; // 重置修改标志 + }, // 微信支付处理 handleWxPayment(paymentParams) { @@ -598,6 +730,16 @@ export default { uni.hideLoading(); } }, + + // 获取新订单号 + async generateOrderNo(){ + const res = await request({ + url: '/small/jxInfo/generateOrderNo', + method: 'GET', + }); + return res + + }, // 上传 deletePic(event) { @@ -632,14 +774,11 @@ export default { } }, uploadFilePromise(e) { - console.log(e); upload({ url: '/app-api/small-upload/common/upload', filePath: e, }).then((res) => { - console.log('sfz', res) this.sfzimg = this.baseUrl + '/' + res.data.url - console.log(this.sfzimg); if (this.sfzimg) { this.idOcr(this.sfzimg) @@ -648,9 +787,6 @@ export default { }) }, async idOcr(url) { - console.log('url', url) - console.log('sfz', this.sfzimg) - let that = this let res = await request({ url: '/app-api/small-upload/idOcr', @@ -659,14 +795,12 @@ export default { imagePath: url } }) - console.log('321', res) that.name = res.data.name that.phone = res.data.phone that.sex = res.data.sex that.identity = res.data.idCard that.age = res.data.age that.Address = res.data.Address - console.log('654', res); that.popupShow = false }, @@ -710,7 +844,7 @@ export default { method: 'PUT', data: { nickname: this.name, - id: this.userInfo.id + id: this.userinfo.id } }) }, @@ -718,7 +852,6 @@ export default { // 校验是否登录 checkLogin() { const token = uni.getStorageSync('App-Token'); - console.log(token) if (!token) { uni.showToast({title: '请先登录', icon: 'none'}); return false; @@ -741,6 +874,23 @@ export default { // return now; }, + getLicenseTypeDescription(code) { + const licenseMap = { + C1: "小型手动挡汽车", + C2: "小型自动档汽车", + B1: "中型客车", + B2: "大型货车", + A1: "大型客车", + A2: "牵引车", + A3: "城市公交车", + D: "三轮摩托车", + E: "两轮摩托车", + F: "轻便摩托车" + }; + + return licenseMap[code] || "未知类型"; + }, + // 签合同 signContract() { const contractData = { @@ -748,6 +898,7 @@ export default { name: this.name, tenantId: this.tenantId, type: this.rightInfoList.type, + carType: this.getLicenseTypeDescription(this.rightInfoList.type), money: this.payPrice, indent: this.identity, phone: this.phone, @@ -765,6 +916,7 @@ export default { method: 'GET' }); this.payStatus = res.data.paymentStatus; + this.oldOrderDetails = res.data return res.data.paymentStatus; }, diff --git a/newPages/schoolDetail/assets/style/index.rpx.scss b/newPages/schoolDetail/assets/style/index.rpx.scss index c8877a3..f143bea 100644 --- a/newPages/schoolDetail/assets/style/index.rpx.scss +++ b/newPages/schoolDetail/assets/style/index.rpx.scss @@ -134,13 +134,28 @@ line-height: 40rpx; margin: 30rpx 0 0 32rpx; } + .text_3_2 { + width: 88%; + height: auto; + overflow-wrap: break-word; + word-break: break-word; + color: rgba(51, 51, 51, 1); + font-size: 24rpx; + font-family: PingFang SC-Semibold; + font-weight: NaN; + text-align: left; + white-space: normal; + line-height: 40rpx; + margin: 30rpx 0 0 32rpx; + } .text-wrapper_1 { width: 220rpx; height: 24rpx; - margin: 30rpx 0 0 32rpx; + margin: 15rpx 0 0 32rpx; .text_4 { - width: 72rpx; - height: 24rpx; + /* width: 72rpx; + height: 24rpx; */ + padding: 0 10rpx 0 0; overflow-wrap: break-word; color: rgba(44, 120, 245, 1); font-size: 24rpx; @@ -154,7 +169,8 @@ width: 138rpx; height: 24rpx; overflow-wrap: break-word; - color: rgba(137, 146, 162, 1); + color: rgba(51, 51, 51, 1); + // color: rgba(137, 146, 162, 1); font-size: 24rpx; font-family: PingFang SC-Regular; font-weight: NaN; @@ -343,10 +359,10 @@ font-size: 24rpx; font-family: PingFang SC-Regular; font-weight: NaN; - text-align: left; + text-align: center; white-space: nowrap; line-height: 24rpx; - margin: 6rpx 0 0 10rpx; + // margin: 6rpx 0 0 10rpx; } } } diff --git a/newPages/schoolDetail/index.vue b/newPages/schoolDetail/index.vue index 05cf398..e342608 100644 --- a/newPages/schoolDetail/index.vue +++ b/newPages/schoolDetail/index.vue @@ -9,14 +9,17 @@ + - {{ schoolDetails.corpName }} + {{ schoolInfo.corpName }} + 地址:{{ schoolInfo.address }} - 营业中 - 08:00-18:00 + 营业时间 + + {{ schoolInfo.businessStartTime }} - {{schoolInfo.businessEndTime}} @@ -91,7 +94,7 @@ item.tittle }} - {{ item.type }} + {{ item.type }} @@ -162,7 +165,9 @@ export default { constants: {}, schoolId: undefined, tenantId: undefined, + schoolName: undefined, schoolDetails: {}, + schoolInfo: [], schoolClassList: [], schoolAllClassList: [], schoolCoachList: [], @@ -177,11 +182,10 @@ export default { onLoad(options) { if (options.id) { this.schoolId = options.id; - this.tenantId = options.tenantId - console.log("首页传入数据", options) - console.log("驾校id", this.schoolId) - console.log("驾校租户id", this.tenantId) - this.getSchoolDetails(); + this.tenantId = options.tenantId; + this.schoolName = options.schoolName; + // this.getSchoolDetails(); + this.getSchoolInfo() this.getSchoolClass(); this.getSchoolAllClass() this.getSchoolCoach() @@ -204,14 +208,23 @@ export default { }).then(res => { this.schoolDetails = res.data; this.tenantId = res.data.tenantId - console.log('租户id', this.tenantId) - console.log('学校详情', this.schoolDetails); }).catch(err => { console.error('获取驾校详情失败', err); }); }, + getSchoolInfo(){ + request({ + url:'/userClient/base/companySmallProgram/getCompanyByTenantId', + method: 'GET', + params: { + tenantId: this.tenantId, + systemCode: 'jiaxiao', + } + }).then(res => { + this.schoolInfo = res.data + }) + }, getSchoolClass() { - console.log('tenantId', this.tenantId) request({ url: '/app-api/dl-drive-school-course-small/noTenantIdPage', method: 'GET', @@ -224,7 +237,6 @@ export default { }).then(res => { this.schoolClassList = res.data.records; this.total = res.data.total; - console.log('驾校课程列表', this.schoolClassList); }) }, //获取当前位置 @@ -299,7 +311,6 @@ export default { }).then(res => { this.schoolAllClassList = res.data; this.total = res.data.total; - console.log('驾校所有课程列表', this.schoolAllClassList); }) }, @@ -317,7 +328,6 @@ export default { // 取排序后的前三条数据 this.schoolCoachList = sortedList.slice(0, 3); this.total = res.data.total; - console.log('驾校教练列表', this.schoolCoachList); }) }, diff --git a/newPages/schoolList/index.vue b/newPages/schoolList/index.vue index 28bb1e9..3c21054 100644 --- a/newPages/schoolList/index.vue +++ b/newPages/schoolList/index.vue @@ -27,48 +27,8 @@ export default { data() { return { constants: {}, - schoolList: [ - // { - // imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - // corpName: '兄弟驾校', - // status: '未营业', - // time: '08:00-18:00', - // address: '山东省济南市历下区工业南路168号', - // features: ['有接送', '规模大'] - // }, - // { - // imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - // corpName: '兄弟驾校', - // status: '营业中', - // time: '08:00-18:00', - // address: '山东省济南市历下区工业南路168号', - // features: ['有接送', '规模大'] - // }, - // { - // imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - // corpName: '兄弟驾校', - // status: '营业中', - // time: '08:00-18:00', - // address: '山东省济南市历下区工业南路168号', - // features: ['有接送', '规模大'] - // }, - // { - // imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - // corpName: '兄弟驾校', - // status: '营业中', - // time: '08:00-18:00', - // address: '山东省济南市历下区工业南路168号', - // features: ['有接送', '规模大'] - // }, - // { - // imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - // corpName: '兄弟驾校', - // status: '营业中', - // time: '08:00-18:00', - // address: '山东省济南市历下区工业南路168号', - // features: ['有接送', '规模大'] - // }, - ], + schoolList: [], + imageUrl: this.$imagesUrl, isTriggered: false, pageNo: 1, pageSize: 10, @@ -94,11 +54,10 @@ export default { }).then(res => { res.data.records.forEach(item => { item.features = ['有接送', '规模大'] - item.imageUrl = '/static/lanhu_shouye2gai/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png' + item.imageUrl = this.imageUrl + '/' + item.photo }) this.schoolList = this.schoolList.concat(res.data.records) this.total = res.data.total - console.log('长度',this.schoolList.length) this.isTriggered = false }) }, @@ -130,47 +89,7 @@ export default { this.isTriggered = true this.pageNo = 1 this.total = 0 - this.schoolList = [ - { - imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - corpName: '兄弟驾校', - status: '未营业', - time: '08:00-18:00', - address: '山东省济南市历下区工业南路168号', - features: ['有接送', '规模大'] - }, - { - imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - corpName: '兄弟驾校', - status: '营业中', - time: '08:00-18:00', - address: '山东省济南市历下区工业南路168号', - features: ['有接送', '规模大'] - }, - { - imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - corpName: '兄弟驾校', - status: '营业中', - time: '08:00-18:00', - address: '山东省济南市历下区工业南路168号', - features: ['有接送', '规模大'] - }, - { - imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - corpName: '兄弟驾校', - status: '营业中', - time: '08:00-18:00', - address: '山东省济南市历下区工业南路168号', - features: ['有接送', '规模大'] - }, - { - imageUrl: '/static/lanhu_jiaxiaoliebiao/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png', - corpName: '兄弟驾校', - status: '营业中', - time: '08:00-18:00', - address: '山东省济南市历下区工业南路168号', - features: ['有接送', '规模大'] - },] + this.schoolList = [] this.getList() }, } @@ -191,6 +110,7 @@ export default { display: flex; flex-direction: column; row-gap: 20rpx; - height: calc(100% - 65px); + /* height: calc(100% - 65px); */ + height: 100vh; } diff --git a/pages/index/contract.vue b/pages/index/contract.vue index f00dabd..8f52f0d 100644 --- a/pages/index/contract.vue +++ b/pages/index/contract.vue @@ -39,7 +39,7 @@ export default { tenantId: '', contractData: {}, userData: {}, - + callback: null, } }, onLoad(options) { @@ -51,12 +51,9 @@ export default { console.log('tenantId',this.tenantId)*/ if (options.data) { this.contractData = JSON.parse(decodeURIComponent(options.data)); - console.log(this.contractData.adress); - console.log(this.contractData.name); - console.log(this.contractData.tenantId); - console.log(this.contractData.type); - console.log(this.contractData.money); + this.callback = options.callback; } + this.callback = options.callback; this.userData = uni.getStorageSync('userInfo'); }, onShow() { @@ -119,8 +116,25 @@ export default { uni.showToast({ title: '报名成功', duration: 3000 - - }) + + }); + + const pages = getCurrentPages(); + const prevPage = pages[pages.length - 2]; + + if (prevPage && (prevPage.route === 'newPages/register/index' || prevPage.route === '/newPages/register/index')) { + if (this.callback) { // 从onLoad中获取的callback + try { + const callback = decodeURIComponent(this.callback); + if (prevPage.$vm && typeof prevPage.$vm[callback] === 'function') { + prevPage.$vm[callback](); + } + } catch (e) { + console.error('回调执行失败:', e); + } + } + } + setTimeout(function () { // 在这里写需要延迟执行的代码 uni.navigateTo({ @@ -133,6 +147,7 @@ export default { // this.uploadFile(this.imgUrl, fileName) }, + goback() { uni.navigateBack() }, diff --git a/static/imgs/clear.png b/static/imgs/clear.png new file mode 100644 index 0000000..2c0f153 Binary files /dev/null and b/static/imgs/clear.png differ diff --git a/static/imgs/message-icon1.png b/static/imgs/message-icon1.png new file mode 100644 index 0000000..2c3dcba Binary files /dev/null and b/static/imgs/message-icon1.png differ diff --git a/static/imgs/nothing.png b/static/imgs/nothing.png new file mode 100644 index 0000000..85907e6 Binary files /dev/null and b/static/imgs/nothing.png differ diff --git a/utils/utils.js b/utils/utils.js index 53833e5..fc961cc 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -57,3 +57,41 @@ export function formatDateTimeToMinute(timestamp) { return `${year}-${month}-${day} ${hours}:${minutes}`; } +export function formatTimestamp(timestamp) { + // 将时间戳转换为Date对象 + const date = new Date(timestamp); + // 获取年月日时分秒 + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + const seconds = date.getSeconds().toString().padStart(2, '0'); + // 组合成日期时间字符串 + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; +} + +export function getWXStatusHeight() { + // #ifdef MP-WEIXIN + // 获取距上 + const barTop = wx.getSystemInfoSync().statusBarHeight + // 获取胶囊按钮位置信息 + const menuButtonInfo = wx.getMenuButtonBoundingClientRect() + // 获取导航栏高度 + const barHeight = menuButtonInfo.height + (menuButtonInfo.top - barTop) * 2 + let barWidth = menuButtonInfo.width + console.log('menuButtonInfo', menuButtonInfo) + let barLeftPosition = 375 - menuButtonInfo.right + menuButtonInfo.width + let menuButtonLeft = menuButtonInfo.left + let menuButtonRight = menuButtonInfo.right + return { + barHeight, + barTop, + barWidth, + barLeftPosition, + menuButtonLeft, + menuButtonRight + } + // #endif +} +