From 11c286c7178848152eeb105742a9e6686477f964 Mon Sep 17 00:00:00 2001 From: JiXinHui <985276981@qq.com> Date: Wed, 18 Mar 2026 16:59:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.api.js | 20 +- pages.json | 21 +- pages/login/login/index.vue | 5 +- pages/my/change-password.vue | 372 +++++++++++++++++++++++++++++++++++ pages/my/index.vue | 5 +- pages/my/schedule.vue | 83 +++++++- 6 files changed, 483 insertions(+), 23 deletions(-) create mode 100644 pages/my/change-password.vue diff --git a/common/http.api.js b/common/http.api.js index 73f5f29..cf16855 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -205,9 +205,15 @@ const install = (Vue, vm) => { // 密码登录-教师 let TeacherLogin = (params = {}) => vm.$u.post("api/Login/LoginManagementEnd", params); - // 验证码登录-教师 - let TeacherLoginByCode = (params = {}) => - vm.$u.post("api/Login/PhoneLoginManagementEnd", params); + // 验证码登录-教师 + let TeacherLoginByCode = (params = {}) => + vm.$u.post("api/Login/PhoneLoginManagementEnd", params); + // 忘记密码-获取短信验证码 + let RequestForgotPasswordSMSCode = (params = {}) => + vm.$u.post("api/Login/RequestForgotPasswordSMSCode", params); + // 忘记密码-修改密码 + let ForgotPasswordChangePassword = (params = {}) => + vm.$u.post("api/Login/ForgotPasswordChangePassword", params); /** 用户-个人中心 */ // 获取用户信息 @@ -310,9 +316,11 @@ const install = (Vue, vm) => { GetHotQuestionsFromId, DeleteDialogueManagement, GetTeacherVerifyCode, - TeacherLogin, - TeacherLoginByCode, - GetUserApi, + TeacherLogin, + TeacherLoginByCode, + RequestForgotPasswordSMSCode, + ForgotPasswordChangePassword, + GetUserApi, UpdateUserApi, GetTeacherListApi, GetDialogueListApi, diff --git a/pages.json b/pages.json index 5b1323d..ce46693 100644 --- a/pages.json +++ b/pages.json @@ -50,13 +50,20 @@ "navigationStyle": "custom" } }, - { - "path": "pages/my/schedule", - "style": { - "navigationBarTitleText": "我的排班", - "navigationStyle": "custom" - } - }, + { + "path": "pages/my/schedule", + "style": { + "navigationBarTitleText": "我的排班", + "navigationStyle": "custom" + } + }, + { + "path": "pages/my/change-password", + "style": { + "navigationBarTitleText": "修改密码", + "navigationStyle": "custom" + } + }, { "path": "pages/home/admissions/index", "style": { diff --git a/pages/login/login/index.vue b/pages/login/login/index.vue index 1246816..0dd48cd 100644 --- a/pages/login/login/index.vue +++ b/pages/login/login/index.vue @@ -106,7 +106,7 @@ 图形验证码 - { const url = this.isTeacher - ? "/pages/consultation/index" + ? "/pages/transfer/index" : "/pages/home/index/index"; uni.reLaunch({ url: url, @@ -821,4 +821,3 @@ export default { } - diff --git a/pages/my/change-password.vue b/pages/my/change-password.vue new file mode 100644 index 0000000..9ac29e6 --- /dev/null +++ b/pages/my/change-password.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/pages/my/index.vue b/pages/my/index.vue index e5bb76e..6f876bf 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -123,9 +123,8 @@ export default { url: '/pages/my/personalInfo' }); } else if (route === 'change-password') { - uni.showToast({ - title: '功能开发中', - icon: 'none' + uni.navigateTo({ + url: '/pages/my/change-password' }); } else if (route === 'logout-records') { uni.showModal({ diff --git a/pages/my/schedule.vue b/pages/my/schedule.vue index b9064eb..e95824b 100644 --- a/pages/my/schedule.vue +++ b/pages/my/schedule.vue @@ -10,7 +10,18 @@ - {{ monthTitle }} + + + + {{ monthTitle }} + + + { @@ -177,6 +196,40 @@ export default { this.scheduleList ); }, + handlePrevMonth() { + this.changeMonth(-1); + }, + handleNextMonth() { + this.changeMonth(1); + }, + handleMonthPickerChange(event) { + const value = event?.detail?.value || ""; + const [yearText, monthText] = value.split("-"); + const year = Number(yearText); + const month = Number(monthText); + if (!year || !month) return; + this.updateMonth(year, month); + }, + changeMonth(offset) { + const date = new Date(this.currentYear, this.currentMonth - 1 + offset, 1); + this.updateMonth(date.getFullYear(), date.getMonth() + 1); + }, + updateMonth(year, month) { + this.currentYear = year; + this.currentMonth = month; + const today = new Date(); + if (today.getFullYear() === year && today.getMonth() + 1 === month) { + this.selectedDay = today.getDate(); + } else { + this.selectedDay = 1; + } + this.calendarDays = this.buildCalendarDays( + this.currentYear, + this.currentMonth, + this.scheduleList + ); + this.fetchSchedule(year, month, this.selectedDay); + }, }, }; @@ -213,11 +266,33 @@ export default { margin-bottom: 20rpx; } +.calendar-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20rpx; +} + .card-title { font-size: 30rpx; font-weight: 600; color: #333333; - margin-bottom: 20rpx; +} + +.month-title { + padding: 6rpx 18rpx; + border-radius: 999rpx; + background-color: #f5f6ff; + text-align: center; + min-width: 200rpx; +} + +.month-action { + font-size: 40rpx; + color: #4f6aff; + width: 40rpx; + text-align: center; + line-height: 40rpx; } .week-row {