fix(扫码登录): 修复扫码登录长度验证问题以及报错信息的提示问题

This commit is contained in:
guoyuqi 2024-09-27 15:37:03 +08:00 committed by 刘瑞斌
parent 07fc2db64c
commit e7683a5d36
23 changed files with 29 additions and 19 deletions

View File

@ -128,7 +128,7 @@ options=options
options_yes=Yes
options_no=No
required=Required
password_format_is_incorrect=Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)
password_format_is_incorrect=Valid password: 6-65 digits, English upper and lower case letters + numbers + special characters (optional)
please_input_project_member=Please input project merber's number
test_case_report_template_repeat=The workspace has the same name template
plan_name_already_exists=Test plan name already exists

View File

@ -145,7 +145,7 @@ options=选项
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)
password_format_is_incorrect=有效密码:6-65位,英文大小写字母+数字+特殊字符(可选)
please_input_project_member=请填写该项目下的相关人员ID
test_case_report_template_repeat=同一工作空间下不能存在同名模版
plan_name_already_exists=测试计划名称已存在

View File

@ -145,7 +145,7 @@ options=選項
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)
password_format_is_incorrect=有效密碼:6-65位,英文大小寫字母+數字+特殊字符(可選)
please_input_project_member=請填寫該項目下的相關人員ID
test_case_report_template_repeat=同一工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在

View File

@ -58,6 +58,8 @@ export default {
this.loading = false;
router.push({name: "login_redirect", path: redirectUrl || '/', query: {}});
localStorage.setItem('loginType', 'LARK');
}).catch((err)=>{
this.$message.error(err.response.data.message);
})
} catch (err) {
// eslint-disable-next-line no-console
@ -96,6 +98,8 @@ export default {
this.loading = false;
router.push({name: "login_redirect", path: redirectUrl || '/', query: {}});
localStorage.setItem('loginType', 'LARK_SUITE');
}).catch((err)=>{
this.$message.error(err.response.data.message);
})
} catch (err) {
// eslint-disable-next-line no-console

View File

@ -74,6 +74,7 @@ export default {
localStorage.setItem('loginType', 'DING_TALK');
}
}).catch((err)=>{
this.$message.error(err.response.data.message);
console.log("axios")
console.log(err)
});

View File

@ -79,6 +79,8 @@
sessionStorage.setItem('lastUser', getCurrentUserId());
router.push({name: "login_redirect", path: redirectUrl || '/', query: {}});
localStorage.setItem('loginType', 'WE_COM');
}).catch((err)=>{
this.$message.error(err.response.data.message);
});
},
onLoginFail(err) {

View File

@ -177,7 +177,7 @@ export default {
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
},
@ -186,7 +186,7 @@ export default {
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
},

View File

@ -1023,7 +1023,7 @@ const message = {
mobile_number_format_is_incorrect: 'Mobile number format is incorrect',
email_format_is_incorrect: 'Email format is incorrect',
password_format_is_incorrect:
'Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)',
'Valid password: 6-65 digits, English upper and lower case letters + numbers + special characters (optional)',
old_password: 'Old Password',
new_password: 'New Password',
repeat_password: 'Repeat',

View File

@ -1009,7 +1009,7 @@ const message = {
special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手机号码格式不正确',
email_format_is_incorrect: '邮箱格式不正确',
password_format_is_incorrect: '有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)',
password_format_is_incorrect: '有效密码:6-65位,英文大小写字母+数字+特殊字符(可选)',
old_password: '旧密码',
new_password: '新密码',
repeat_password: '确认密码',

View File

@ -1008,7 +1008,7 @@ const message = {
special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手機號碼格式不正確',
email_format_is_incorrect: '郵箱格式不正確',
password_format_is_incorrect: '有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)',
password_format_is_incorrect: '有效密碼:6-65位,英文大小寫字母+數字+特殊字符(可選)',
old_password: '舊密碼',
new_password: '新密碼',
repeat_password: '確認密碼',

View File

@ -151,7 +151,7 @@ options=options
options_yes=Yes
options_no=No
required=Required
password_format_is_incorrect=Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)
password_format_is_incorrect=Valid password: 6-65 digits, English upper and lower case letters + numbers + special characters (optional)
please_input_project_member=Please input project merber's number
test_case_report_template_repeat=The workspace has the same name template
plan_name_already_exists=Test plan name already exists

View File

@ -151,7 +151,7 @@ options=选项
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)
password_format_is_incorrect=有效密码:6-65位,英文大小写字母+数字+特殊字符(可选)
please_input_project_member=请填写该项目下的相关人员ID
test_case_report_template_repeat=同一工作空间下不能存在同名模版
plan_name_already_exists=测试计划名称已存在

View File

@ -151,7 +151,7 @@ options=選項
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)
password_format_is_incorrect=有效密碼:6-65位,英文大小寫字母+數字+特殊字符(可選)
please_input_project_member=請填寫該項目下的相關人員ID
test_case_report_template_repeat=同一工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在

View File

@ -96,7 +96,6 @@ import {
validateLarkSuiteConfig,
validateWeComConfig
} from "@/api/qrcode";
import {hasPermission} from "metersphere-frontend/src/utils/permission";
import WeComModal from "@/business/system/setting/weComModal.vue";
import DingTalkModal from "@/business/system/setting/dingTalkModal.vue";
import LarkModal from "@/business/system/setting/larkModal.vue";

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="$t('qrcode.service_DING_TALK') "
:visible.sync="detailVisible"
title-align="start"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="$t('qrcode.service_LARK')"
:visible.sync="detailVisible"
title-align="start"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="$t('qrcode.service_LARK_SUITE')"
:visible.sync="detailVisible"
title-align="start"

View File

@ -5,6 +5,7 @@
title-align="start"
width="680px"
:loading="loading"
:close-on-click-modal="false"
:before-close="cancelEdit"
>
<el-form :rules="rules" class="ms-form" ref="weComForm" :model="weComForm" layout="vertical" size="mini">

View File

@ -171,7 +171,7 @@ export default {
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[\s\S]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[\s\S]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
}

View File

@ -241,7 +241,7 @@ export default {
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
}
@ -250,7 +250,7 @@ export default {
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
}
@ -258,7 +258,7 @@ export default {
confirmpassword: [
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,65}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
},

View File

@ -147,7 +147,7 @@ options=options
options_yes=Yes
options_no=No
required=Required
password_format_is_incorrect=Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)
password_format_is_incorrect=Valid password: 6-65 digits, English upper and lower case letters + numbers + special characters (optional)
please_input_project_member=Please input project merber's number
test_case_report_template_repeat=The workspace has the same name template
plan_name_already_exists=Test plan name already exists

View File

@ -119,7 +119,7 @@ options=选项
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)
password_format_is_incorrect=有效密码:6-65位,英文大小写字母+数字+特殊字符(可选)
please_input_project_member=请填写该项目下的相关人员ID
test_case_report_template_repeat=同一工作空间下不能存在同名模版
plan_name_already_exists=测试计划名称已存在

View File

@ -119,7 +119,7 @@ options=選項
options_yes=
options_no=
required=必填
password_format_is_incorrect=有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)
password_format_is_incorrect=有效密碼:6-65位,英文大小寫字母+數字+特殊字符(可選)
please_input_project_member=請填寫該項目下的相關人員ID
test_case_report_template_repeat=同一工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在