From 328e7091ed73d035308e2e61808ef9539159373e Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 20 Mar 2025 16:08:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(api):=20=E6=96=B0=E5=A2=9E=20member.js?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=E5=B9=B6=E5=AE=9E=E7=8E=B0=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 member.js 文件,实现账号密码登录和普通登录功能 - 修改 login.vue 中的登录逻辑,使用新的 memberApi 替代 medicationApi --- api/member.js | 23 +++++++++++++++++++++++ pages/student/login/login.vue | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 api/member.js diff --git a/api/member.js b/api/member.js new file mode 100644 index 0000000..e29b121 --- /dev/null +++ b/api/member.js @@ -0,0 +1,23 @@ +import http from '../common/axios.js' + +// 账号密码登录 +function medication_login(data) { + let url = '/dnseyeapi/Login/login' + return http.post(url, data).then(res => { + return res; + }) +} + +//登录 +function login(data) { + let url = '/login' + return http.get(url,data).then(res => { + return res; + }) +} + + +export default { + login, + medication_login, +} \ No newline at end of file diff --git a/pages/student/login/login.vue b/pages/student/login/login.vue index e12ed8d..b04cd22 100644 --- a/pages/student/login/login.vue +++ b/pages/student/login/login.vue @@ -36,7 +36,7 @@