From a6fadbdb2ffbe54f064527fe2e8ebbf0a24b69fd Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Sun, 18 May 2025 16:43:15 +0800
Subject: [PATCH 1/4] =?UTF-8?q?feat(api):=20=E6=B7=BB=E5=8A=A0=E6=95=99?=
=?UTF-8?q?=E5=B8=88/=E9=94=80=E5=94=AE=E7=AB=AF=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B9=B6=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 apiRoute.js 中添加 editPersonnelInfo 方法,用于获取教师/销售端详情
- 修改 info.vue 页面,使用 editPersonnelInfo接口获取用户信息
-优化个人信息展示,包括头像、性别、部门等字段
-修复头像上传逻辑,使用正确的 API 路径
-优化表单提交逻辑,使用 editPersonnelInfo 接口更新用户信息
---
api/apiRoute.js | 7 ++++
pages/market/my/info.vue | 63 +++++++++++++++++------------------
pages/student/login/login.vue | 1 +
3 files changed, 39 insertions(+), 32 deletions(-)
diff --git a/api/apiRoute.js b/api/apiRoute.js
index 497e388..03e095f 100644
--- a/api/apiRoute.js
+++ b/api/apiRoute.js
@@ -31,6 +31,13 @@ export default {
return res;
})
},
+ //教师/销售端详情
+ editPersonnelInfo(data = {}) {
+ let url = '/personnel/edit'
+ return http.post(url, data).then(res => {
+ return res;
+ })
+ },
diff --git a/pages/market/my/info.vue b/pages/market/my/info.vue
index 442951b..71b27de 100644
--- a/pages/market/my/info.vue
+++ b/pages/market/my/info.vue
@@ -8,7 +8,7 @@
修改头像
@@ -39,7 +39,7 @@
部门
-
+
@@ -59,7 +59,7 @@
性别 *
-
+
From 132cec21b98bbfe4deee6d480769c88d5097817a Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Sun, 18 May 2025 17:03:58 +0800
Subject: [PATCH 3/4] =?UTF-8?q?refactor(student):=20=E7=A7=BB=E9=99=A4?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E8=BF=87=E7=A8=8B=E4=B8=AD=E7=9A=84=E8=B0=83?=
=?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 删除了 login 方法中的 alert 和 return 语句
- 这些代码行可能是之前的调试遗留,不影响主要功能
---
pages/student/login/login.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/pages/student/login/login.vue b/pages/student/login/login.vue
index 144c55e..1264ce1 100644
--- a/pages/student/login/login.vue
+++ b/pages/student/login/login.vue
@@ -108,8 +108,6 @@ export default {
},
//登陆
async login() {
- alert(this.loginType)
- return
let item = {};
item['username'] = this.user
item['password'] = this.password1
From 0f02ececde81d3ce9c5c1717b8f2219aba149b70 Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Sun, 18 May 2025 17:09:54 +0800
Subject: [PATCH 4/4] =?UTF-8?q?refactor(student):=20=E5=AE=8C=E5=96=84?=
=?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=AB=AF=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
- 清空默认用户名和密码
- 添加登录表单验证
- 增加登录类型选择提示
- 上线前保留测试账号密码(需删除)
---
pages/student/login/login.vue | 44 +++++++++++++++++++++++++++++++++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/pages/student/login/login.vue b/pages/student/login/login.vue
index 1264ce1..1fe6d25 100644
--- a/pages/student/login/login.vue
+++ b/pages/student/login/login.vue
@@ -65,8 +65,8 @@ export default {
data() {
return {
password: true,
- user: '15374889135', //账户
- password1: '15374889135', //密码
+ user: '', //账户
+ password1: '', //密码
loginType:'',//登陆类型|1=教练,2=销售,3=学员
loginType_str:'',//登陆类型中文名字
@@ -108,6 +108,30 @@ export default {
},
//登陆
async login() {
+
+ if (!this.user) {
+ uni.showToast({
+ title: '请输入用户名',
+ icon: 'none'
+ })
+ return
+ }
+ if (!this.password1) {
+ uni.showToast({
+ title: '请输入密码',
+ icon: 'none'
+ })
+ return
+ }
+
+ if (!this.loginType) {
+ uni.showToast({
+ title: '请选择登陆类型',
+ icon: 'none'
+ })
+ return
+ }
+
let item = {};
item['username'] = this.user
item['password'] = this.password1
@@ -203,6 +227,22 @@ export default {
this.loginType = e.value
this.loginType_str = e.text
this.picker_show_loginType = false
+
+ //@todo 上线时请删除这个判断
+ if(this.loginType == 1){
+ //教师端
+ this.user= '15374889135' //账户
+ this.password1= '15374889135' //密码
+ }else if(this.loginType == 2){
+ //销售端
+ this.user= '15148228108' //账户
+ this.password1= '123123' //密码
+ }else{
+ //学生端
+ this.user= '' //账户
+ this.password1= '' //密码
+ }
+
},
}
}