Browse Source

合并冲突

plg 4 months ago
parent
commit
9c69dbef78
2 changed files with 2 additions and 11 deletions
  1. 0 3
      src/views/Register.vue
  2. 2 8
      src/views/UpdatePas.vue

+ 0 - 3
src/views/Register.vue

@@ -65,8 +65,6 @@ const loginFun = () => {
     router.push({ name: 'login' })
 
 }
-
-//校验密码的方法
 const validatePassword = (password: string) => {
     const regex = /^[a-zA-Z0-9!@#$%^&*(),.?":{}|<>]+$/;
     return regex.test(password);
@@ -181,7 +179,6 @@ const registerFun = async () => {
         isLock.value = false
         return
     }
-
     if (comPassword.value != password.value) {
         ElMessage({
             message: '两次密码输入不一致',

+ 2 - 8
src/views/UpdatePas.vue

@@ -49,12 +49,10 @@ onUnmounted(() => {
 
 })
 
-//校验密码的方法
 const validatePassword = (password: string) => {
     const regex = /^[a-zA-Z0-9!@#$%^&*(),.?":{}|<>]+$/;
     return regex.test(password);
 }
-
 //登录方法
 const loginFun = async () => {
     debugger;
@@ -87,7 +85,7 @@ const loginFun = async () => {
         return
     } else if (password.value.length < 6 || password.value.length > 18) {
         ElMessage({
-            message: '密码为6到18位',
+            message: '密码规则为数字或英文或字符,可任意组合。',
             type: 'warning'
         })
         isLock.value = false
@@ -103,7 +101,7 @@ const loginFun = async () => {
         return
     } else if (!validatePassword(comPassword.value)) {
         ElMessage({
-            message: '确认密码规则为数字或英文或字符,可任意组合。',
+            message: '密码规则为数字或英文或字符,可任意组合。',
             type: 'warning'
         })
         isLock.value = false
@@ -140,10 +138,6 @@ const loginFun = async () => {
         // userInfo.saveToken(res.data.token)
         // userInfo.saveUserInfo(res.data.user)
         ElMessage({ message: `${res.msg}`, type: 'success' })
-
-        //修改成功后
-        //清空缓存
-        //跳转到登录页面
         userInfo.clearUserInfo()
         //跳转到首页
         router.push({ name: 'login' })