From 09e3e47f41023947912d8b6c2d5f0b4544e8c7a8 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Wed, 4 Jun 2025 15:48:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(api):=20=E6=B7=BB=E5=8A=A0=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 apiRoute.js 中添加学生登录接口 xy_login - 优化学生端登录逻辑,支持微信小程序 openid -调整登录页面布局,移除多余的空视图 - 初始化登录页面时获取微信小程序 openid- 修改登录成功后的处理逻辑 --- api/apiRoute.js | 9 +++++++-- pages/student/index/index.vue | 6 ++---- pages/student/login/login.vue | 9 ++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/api/apiRoute.js b/api/apiRoute.js index 31c1436..3f5642e 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -396,8 +396,13 @@ export default { //↓↓↓↓↓↓↓↓↓↓↓↓-----学生接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓ - - + //学生登陆接口 + xy_login(data = {}) { + let url = '/customerResourcesAuth/login' + return http.post(url, data).then(res => { + return res; + }) + }, diff --git a/pages/student/index/index.vue b/pages/student/index/index.vue index 175edb2..9b435a2 100644 --- a/pages/student/index/index.vue +++ b/pages/student/index/index.vue @@ -168,11 +168,9 @@ } }, onLoad() { - - }, - onShow(){ this.openViewHome()//检测首页是否正确跳转-不正确则进行重定向 - }, + }, + onShow(){}, methods: { //初始化 async init(){ diff --git a/pages/student/login/login.vue b/pages/student/login/login.vue index 4cc961f..6fdaf19 100644 --- a/pages/student/login/login.vue +++ b/pages/student/login/login.vue @@ -25,7 +25,6 @@ - Date: Wed, 4 Jun 2025 16:22:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(student):=20=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加学生详情接口 xy_memberInfo - 优化学生信息展示逻辑 - 修复学生信息获取失败的异常处理 -调整页面初始化流程,确保信息加载顺序正确 --- api/apiRoute.js | 8 ++++++++ pages/student/index/index.vue | 34 +++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/api/apiRoute.js b/api/apiRoute.js index 3f5642e..5fe2aa9 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -403,6 +403,14 @@ export default { return res; }) }, + //学生详情 + xy_memberInfo(data = {}) { + let url = '/customerResourcesAuth/info' + return http.get(url, data).then(res => { + return res; + }) + }, + diff --git a/pages/student/index/index.vue b/pages/student/index/index.vue index 9b435a2..da57296 100644 --- a/pages/student/index/index.vue +++ b/pages/student/index/index.vue @@ -6,7 +6,7 @@ - + {{member_info.name}} @@ -123,6 +123,8 @@