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] =?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 @@ -