From dbf7dfd13cfb271ddf0bd2711b1547569054d369 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Sun, 18 May 2025 14:13:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(api):=20=E9=87=8D=E6=9E=84=20api?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B9=B6=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构 apiRoute.js,增加公共接口、教练接口、销售接口和学生接口的分类 - 为 my/index.vue 和 login/login.vue 页面更换新的 api 调用方法 - 优化代码结构,提高可维护性和可读性 --- api/apiRoute.js | 38 +++++++++++++++++++++++++++++------ pages/market/my/index.vue | 5 +++-- pages/student/login/login.vue | 1 - 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/api/apiRoute.js b/api/apiRoute.js index 81f343e..a520d05 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -2,22 +2,48 @@ import http from '../common/axios.js' //全部api接口 export default { - //教师端登陆 + // getDemo(data = {}) { + // let url = '/member/member_edit' + // return http.get(url, data).then(res => { + // return res; + // }) + // }, + // postDemo(data = {}) { + // let url = '/member/member_edit' + // return http.post(url, data).then(res => { + // return res; + // }) + // }, + + //公共接口相关 + //教师/销售端登陆 personnelLogin(data = {}) { let url = '/personnelLogin' return http.post(url, data).then(res => { return res; }) }, - - //修改销售人员详情 - memberEdit(data = {}) { - let url = '/member/member_edit' - return http.post(url, data).then(res => { + //教师/销售端详情 + getPersonnelInfo(data = {}) { + let url = '/personnel/info' + return http.get(url, data).then(res => { return res; }) }, + //教练接口相关 + + + + //销售接口相关 + + + + + //学生接口相关 + + + } \ No newline at end of file diff --git a/pages/market/my/index.vue b/pages/market/my/index.vue index aaf2d9a..4d17510 100644 --- a/pages/market/my/index.vue +++ b/pages/market/my/index.vue @@ -103,6 +103,7 @@