From 1747879ce00edc89c624117d642e624336a87d0a Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Sun, 18 May 2025 17:03:19 +0800
Subject: [PATCH] =?UTF-8?q?feat(login):=20=E5=A2=9E=E5=8A=A0=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E7=B1=BB=E5=9E=8B=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在登录页面添加登录类型选择输入框
- 实现登录类型选择的弹窗功能
- 优化登录类型的默认值和显示逻辑
---
pages/market/my/info.vue | 2 +-
pages/student/login/login.vue | 54 ++++++++++++++++++++++++++++++++++-
2 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/pages/market/my/info.vue b/pages/market/my/info.vue
index 71b27de..9307f9a 100644
--- a/pages/market/my/info.vue
+++ b/pages/market/my/info.vue
@@ -66,7 +66,7 @@
:options="options_sex_arr"
:show="picker_show_sex"
@change="changePickerSex"
- @cancel="picker_sex_show=false"
+ @cancel="picker_show_sex=false"
>
diff --git a/pages/student/login/login.vue b/pages/student/login/login.vue
index fef06cf..144c55e 100644
--- a/pages/student/login/login.vue
+++ b/pages/student/login/login.vue
@@ -16,6 +16,7 @@
+
@@ -23,6 +24,28 @@
@click="change">
+
+
+
+
+
+
+
+
+
登录
@@ -44,11 +67,30 @@ export default {
password: true,
user: '15374889135', //账户
password1: '15374889135', //密码
+
loginType:'',//登陆类型|1=教练,2=销售,3=学员
+ loginType_str:'',//登陆类型中文名字
+ loginType_Arr:[
+ {
+ value: '1',
+ text: '教师登陆'
+ },
+ {
+ value: '2',
+ text: '销售登陆'
+ },
+ {
+ value: '3',
+ text: '学员登陆'
+ }
+ ],
+ picker_show_loginType:false,//是否显示下拉窗组件
}
},
onLoad(options) {
- this.loginType = options.loginType ?? '1'//登陆类型|1=教练,2=销售,3=学员
+ this.loginType = options.loginType ?? '2'//登陆类型|1=教练,2=销售,3=学员
+ const selectedItem = this.loginType_Arr.find(item => item.value === String(this.loginType));
+ this.loginType_str = selectedItem ? selectedItem.text : '未知类型';
// uni.hideHomeButton()
// console.log(uni.getStorageSync('um_id'))
},
@@ -66,6 +108,8 @@ export default {
},
//登陆
async login() {
+ alert(this.loginType)
+ return
let item = {};
item['username'] = this.user
item['password'] = this.password1
@@ -154,6 +198,14 @@ export default {
}
});
},
+
+ //登录类型选择相关
+ changePicker_loginType(e){
+ console.log('监听选择', e)
+ this.loginType = e.value
+ this.loginType_str = e.text
+ this.picker_show_loginType = false
+ },
}
}