Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

sunshihao 1 tydzień temu
rodzic
commit
4ad17e350e

+ 1 - 1
xinkeaboard-admin/src/pages/User/Login.js

@@ -163,7 +163,7 @@ export default class LoginPage extends Component {
                   style={{ marginTop: 20 }}
                 >
                   {getFieldDecorator('password')(
-                    <Input
+                    <Input.Password
                       maxLength={20}
                       type="password"
                       placeholder={sldComLanguage('请输入密码')}

+ 1 - 1
xinkeaboard-admin/src/pages/User/Login.less

@@ -144,7 +144,7 @@
     }
 
     .ant-input-affix-wrapper .ant-input-suffix{
-      right: 1px !important;
+      // right: 1px !important;
     }
   }
 

+ 34 - 69
xinkeaboard-seller/src/pages/User/Login.js

@@ -11,7 +11,8 @@ import {
   sldSvgIcon,
   saveSettleData,
   sldCheckMobile,
-  getSldImgSet,sldComLanguage,mobile_reg
+  getSldImgSet,sldComLanguage,mobile_reg,
+  unifyValidatePassword
 } from '@/utils/utils';
 import router from 'umi/router';
 
@@ -323,78 +324,42 @@ export default class LoginPage extends Component {
   };
 
   checkPassword = (rule, value, callback) => {
-    if(!value){
-      callback('');
-      this.setState({
-        is_show_pwd_err: true,
-        pwd_error_info: `${sldComLanguage('请输入密码')}`,
-      });
-      return
-    }
-    if (value.length < 6 || value.length > 20) {
+    const res = unifyValidatePassword(value);
+    if (!res.ok) {
       callback('');
       this.setState({
         is_show_pwd_err: true,
-        pwd_error_info: `${sldComLanguage('请输入6~20位密码')}`,
-      });
-    } else {
-      if (/[\u4E00-\u9FA5]/g.test(value)) {
-        callback('');
-        this.setState({
-          is_show_pwd_err: true,
-          pwd_error_info: `${sldComLanguage('密码不可以有中文')}`,
-        });
-      }else if(!(/^\S*$/.test(value))){
-        callback('');
-        this.setState({
-          is_show_pwd_err: true,
-          pwd_error_info: `${sldComLanguage('密码中不可以有空格')}`,
-        });
-      }
-      callback();
-      this.setState({
-        is_show_pwd_err: false,
-        pwd_error_info: `${sldComLanguage('')}`,
+        pwd_error_info: `${sldComLanguage(res.reasons[0])}`,
       });
+      return;
     }
+
+    callback();
+    this.setState({
+      is_show_pwd_err: false,
+      pwd_error_info: `${sldComLanguage('')}`,
+    });
   };
 
   //确认密码
   checkConfirmPassword = (rule, value, callback) => {
-    if(!value){
+    const pwd = this.props.form.getFieldValue('vendorPassword');
+    console.log(pwd, 'pwd')
+    if (value !== pwd) {
       callback('');
       this.setState({
         is_show_comfirepwd_err: true,
-        comfirepwd_error_info: `${sldComLanguage('请输入确认密码')}`,
-      });
-      return
-    }
-    if (value.length < 6 || value.length > 20) {
-      callback('');
-      this.setState({
-        is_show_comfirepwd_err: true,
-        comfirepwd_error_info: `${sldComLanguage('请输入6~20位密码')}`,
-      });
-    } else {
-      if (/[\u4E00-\u9FA5]/g.test(value)) {
-        callback('');
-        this.setState({
-          is_show_comfirepwd_err: true,
-          comfirepwd_error_info: `${sldComLanguage('密码不可以有中文')}`,
-        });
-      }else if(!(/^\S*$/.test(value))){
-        callback('');
-        this.setState({
-          is_show_comfirepwd_err: true,
-          comfirepwd_error_info: `${sldComLanguage('密码中不可以有空格')}`,
-        });
-      }
-      callback();
-      this.setState({
-        is_show_comfirepwd_err: false,
-        comfirepwd_error_info: `${sldComLanguage('')}`,
+        comfirepwd_error_info: `${sldComLanguage('两次输入的密码不一致')}`,
       });
+
+      return;
     }
+
+    callback();
+    this.setState({
+      is_show_comfirepwd_err: false,
+      comfirepwd_error_info: `${sldComLanguage('')}`,
+    });
   };
 
   //验证手机
@@ -889,7 +854,7 @@ export default class LoginPage extends Component {
               {modal_type == 'register' && this.state.is_show_account_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.account_error_info}~
+                {this.state.account_error_info}
               </div>
               }
 
@@ -916,7 +881,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_phone_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.phone_error_info}~
+                {this.state.phone_error_info}
               </div>
               }
 
@@ -946,7 +911,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_code_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.code_error_info}~
+                {this.state.code_error_info}
               </div>
               }
 
@@ -978,7 +943,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_phonecode_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.phonecode_error_info}~
+                {this.state.phonecode_error_info}
               </div>
               }
 
@@ -1007,7 +972,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_email_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.email_error_info}~
+                {this.state.email_error_info}
               </div>
               }
 
@@ -1036,7 +1001,7 @@ export default class LoginPage extends Component {
               {modal_type == 'forgetPwd' && this.state.is_show_account_err &&
                 <div className={styles.register_error}>
               {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-              {this.state.account_error_info}~
+              {this.state.account_error_info}
                 </div>
               }
 
@@ -1053,7 +1018,7 @@ export default class LoginPage extends Component {
                   <Input.Password
                     maxLength={20}
                     onChange={this.handleChangeRegister}
-                    placeholder={sldComLanguage('请设置6~20位字母、数字或符号组成的密码')}
+                    placeholder={sldComLanguage('请输入密码')}
                     prefix={<p className={styles.user_name}><span
                       className={styles.must}>*</span>{modal_type == 'register' ? `${sldComLanguage('设置密码')}` : `${sldComLanguage('新密码')}`}</p>}
                   />,
@@ -1063,7 +1028,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_pwd_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.pwd_error_info}~
+                {this.state.pwd_error_info}
               </div>
               }
 
@@ -1095,7 +1060,7 @@ export default class LoginPage extends Component {
               {this.state.is_show_comfirepwd_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {this.state.comfirepwd_error_info}~
+                {this.state.comfirepwd_error_info}
               </div>
               }
 
@@ -1104,7 +1069,7 @@ export default class LoginPage extends Component {
               {is_show_registe_err &&
               <div className={styles.register_error}>
                 {sldSvgIcon('#ef1216', 16, 16, 'cuowutishi')}
-                {register_error_info}~
+                {register_error_info}
               </div>
               }
 

+ 50 - 0
xinkeaboard-seller/src/utils/utils.js

@@ -1886,3 +1886,53 @@ export const businessStateEnum = {
   3: '经营中',
   4: '暂停经营',
 }
+
+const SPECIAL_CHAR_CLASS = /[~!@#$%^&*()_+`\-={}\[\]\|:;\"'<,>.?\/]/;
+const DIGIT_CLASS = /[0-9]/;
+const LOWER_CLASS = /[a-z]/;
+const UPPER_CLASS = /[A-Z]/;
+// 检查所有空格字符(半角/全角)
+// - \s 会捕获常见的空格、制表符、换行符等
+// - \u3000 是全角空格
+const SPACE_REG = /[\s\u3000]/;
+
+
+// 如果想限制“只能使用上述字符(不允许空格、中文等)”,可启用下行:
+// const ALLOWED_ALL = /^[0-9A-Za-z~!@#$%^&*()_+`\-={}\[\]\|:;\"'<,>.?\/]+$/;
+
+export function unifyValidatePassword(pwd) {
+  const reasons = [];
+
+  // 1) 长度校验:8-20
+  if (pwd.length < 8) {
+    reasons.push('密码长度不能小于8位');
+  } else if (pwd.length > 20) {
+    reasons.push('密码长度不能超过20位');
+  }
+
+  // 2) 统计字符类别命中数(四类中至少两类)
+  const hasDigit = DIGIT_CLASS.test(pwd);
+  const hasLower = LOWER_CLASS.test(pwd);
+  const hasUpper = UPPER_CLASS.test(pwd);
+  const hasSpecial = SPECIAL_CHAR_CLASS.test(pwd);
+
+  const typeCount = [hasDigit, hasLower, hasUpper, hasSpecial].filter(Boolean).length;
+
+  if (typeCount < 2) {
+    reasons.push('密码必须同时包含数字、字母、特殊字符中的两种');
+  }
+
+  if (SPACE_REG.test(pwd)) {
+    reasons.push('密码不能包含空格');
+  }
+
+  // 4) 可选:若只想限定在“允许字符集合”内,打开 ALLOWED_ALL 后使用以下判断
+  // if (!ALLOWED_ALL.test(pwd)) {
+  //   reasons.push("密码包含不被允许的字符。");
+  // }
+
+  return {
+    ok: reasons.length === 0,
+    reasons,
+  };
+}

+ 5 - 1
xinkeaboard-web/assets/language/en.js

@@ -849,7 +849,11 @@ export const lang_en = {
         '您已注册成功': 'You have registered successfully.',
         '立即登录': 'Log in now',
         '重置成功': 'Reset successful',
-        '密码重置成功, 5s内跳转至登录页': 'The password reset was successful. You will be redirected to the login page within 5 seconds'
+        '密码重置成功, 5s内跳转至登录页': 'The password reset was successful. You will be redirected to the login page within 5 seconds',
+        '密码长度不能小于8位': 'The password length cannot be less than 8 characters',
+        '密码长度不能超过20位': 'The password length cannot exceed 20 characters',
+        '密码必须同时包含数字、字母、特殊字符中的两种': 'The password must contain two of the following: numbers, letters, and special characters',
+        '密码不能包含空格': 'The password cannot contain Spaces'
     },
 
     // 人机验证

+ 5 - 1
xinkeaboard-web/assets/language/zh.js

@@ -879,7 +879,11 @@ export const lang_zn = {
     //   '您已注册成功, 5s内跳转到登录页': '您已注册成功, 5s内跳转到登录页',
       '立即登录': '立即登录',
       '重置成功': '重置成功',
-      '密码重置成功, 5s内跳转至登录页': '密码重置成功, 5s内跳转至登录页'
+      '密码重置成功, 5s内跳转至登录页': '密码重置成功, 5s内跳转至登录页',
+      '密码长度不能小于8位': '密码长度不能小于8位',
+      '密码长度不能超过20位': '密码长度不能超过20位',
+      '密码必须同时包含数字、字母、特殊字符中的两种': '密码必须同时包含数字、字母、特殊字符中的两种',
+      '密码不能包含空格': '密码不能包含空格'
     },
 
     // 人机验证

+ 1 - 1
xinkeaboard-web/assets/style/register.scss

@@ -2,7 +2,7 @@
 .sld_login {
   .sld_login_header {
     height: 88px;
-    background: #F6F8FA;
+    background: #fff;
     box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
 
     .content {

+ 14 - 7
xinkeaboard-web/components/Home/sourcingForm.vue

@@ -5,7 +5,12 @@
         <el-input v-model="form.name" :placeholder="L['请输入姓名']" />
       </el-form-item>
       <el-form-item v-if="contactType === 'email'" prop="email">
-        <el-input v-model="form.email" :placeholder="L['请输入邮箱']" />
+        <el-input
+          v-model="form.email"
+          :placeholder="L['请输入邮箱']"
+          maxlength="50"
+          show-word-limit
+        />
       </el-form-item>
       <el-form-item v-if="contactType === 'mobile'" prop="phone">
         <el-input v-model="form.phone" :placeholder="L['请输入手机号']" />
@@ -23,6 +28,8 @@
         <el-input
           v-model="form.message"
           type="textarea"
+          maxlength="1000"
+          show-word-limit
           :rows="5"
           :placeholder="L['请输入采购需求']"
         />
@@ -72,7 +79,7 @@ const form = reactive({
   name: "",
   message: "",
   email: "",
-  phone: '',
+  phone: "",
   quantity: undefined,
 });
 const email = computed(() => filtersStore.getMemberInfo.memberEmail ?? "");
@@ -81,7 +88,7 @@ const name = computed(
     filtersStore.getMemberInfo.memberNickName ||
     filtersStore.getMemberInfo.memberName
 );
-const phone = computed(() => filtersStore.getMemberInfo.memberMobile ?? "")
+const phone = computed(() => filtersStore.getMemberInfo.memberMobile ?? "");
 
 const checkEmailFun = (rule, value, callback) => {
   if (checkEmail(value) !== true) {
@@ -99,9 +106,7 @@ const checkMobileFun = (rule, value, callback) => {
 
 const rules = reactive({
   name: [{ required: true, message: L["请输入姓名"], trigger: "blur" }],
-  quantity: [
-    { required: true, message: L["请输入数量"], trigger: "blur" },
-  ],
+  quantity: [{ required: true, message: L["请输入数量"], trigger: "blur" }],
   email: [
     { required: true, message: L["请输入邮箱"], trigger: "blur" },
     { validator: checkEmailFun, trigger: "blur" },
@@ -126,6 +131,8 @@ const setFormData2Cache = () => {
 
 // 删除表单缓存
 const clearFormDataFromCache = () => {
+  form.quantity = undefined;
+  form.message = '';
   localStorage.removeItem("quotations");
 };
 
@@ -207,7 +214,7 @@ onMounted(() => {
     height: 42px;
     font-weight: bold;
     font-size: 14px;
-    color: #FFFFFF;
+    color: #ffffff;
     margin-top: 20px;
   }
 

+ 9 - 8
xinkeaboard-web/components/register/RegisterAccount.vue

@@ -234,13 +234,14 @@ const checkPwdMatched = () => {
 };
 
 const checkPwdValidate = () => {
-  const regex = /^[A-Za-z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{6,20}$/;
-  if (regex.test(password.value)) {
-    checkPwdErrorMsg.value = "";
-    return true;
+  const res = unifyValidatePassword(password.value); 
+  if (!res.ok) {
+    checkPwdErrorMsg.value = res.reasons[0];
+    return false;
   }
-  checkPwdErrorMsg.value = L['请输入6~20位英文、数字、符号'];
-  return false;
+
+  checkPwdErrorMsg.value = ''
+  return true;
 };
 
 watch(name, (val) => {
@@ -320,10 +321,10 @@ watch(name, (val) => {
   }
 
   .error {
-    margin-top: 10px;
+    margin-top: 5px;
     position: relative;
     color: #e2231a;
-    height: 16px;
+    height: 22px;
     line-height: 16px;
 
     .iconfont {

+ 5 - 2
xinkeaboard-web/components/register/RegisterMail.vue

@@ -39,7 +39,6 @@
       />
       <span class="verify-code-accept">
         <el-button
-          type="primary"
           @click="showHMVerify"
           :disabled="countDownNumer"
           :loading="getVerifyCodeLoading"
@@ -416,11 +415,15 @@ const clearInputVal = (type) => {
         height: 100%;
         // font-weight: bold;
         color: #FFFFFF;
-        background: $colorMain;
+        background-color: $colorMain;
         border-left: none;
         border-radius: 0;
         font-size: 12px;
 
+        &.is-disabled {
+          background-color: #909399;
+        }
+
         &:hover {
           // border-color: #e8e8e8;
           // color: $colorMain;

+ 5 - 1
xinkeaboard-web/components/register/RegisterPhone.vue

@@ -361,11 +361,15 @@ const clearInputVal = (type) => {
         width: 100%;
         height: 100%;
         color: #fff;
-        background: $colorMain;
+        background-color: $colorMain;
         border-left: none;
         border-radius: 0;
         font-size: 12px;
 
+        &.is-disabled {
+          background-color: #909399;
+        }
+
         &:hover {
           // border-color: #e8e8e8;
           // color: $colorMain;

+ 21 - 14
xinkeaboard-web/components/retrieve/RetrievePassword.vue

@@ -188,13 +188,14 @@ const isShowPwd = () => {
 };
 
 const checkPwdValidate = () => {
-  const regex = /^[A-Za-z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{6,20}$/;
-  if (regex.test(password.value)) {
-    checkPwdErrorMsg.value = "";
-    return true;
+  const res = unifyValidatePassword(password.value); 
+  if (!res.ok) {
+    checkPwdErrorMsg.value = res.reasons[0];
+    return false;
   }
-  checkPwdErrorMsg.value = L["请输入6~20位英文、数字、符号"];
-  return false;
+
+  checkPwdErrorMsg.value = ''
+  return true;
 };
 
 //开启人机校验
@@ -298,7 +299,7 @@ const getVerifyCode = () => {
 };
 
 const forgetPwd = () => {
-  if (!validateEmail() || !validateEmailCode()) return;
+  if (!validateEmail() || !validateEmailCode() || !checkPwdValidate() || !checkPwdMatched()) return;
   forgetPwdLoading.value = true;
   post("v3/member/front/active/email/reset/pwdNew", {
     confirmPassWord: confirmPassword.value,
@@ -308,6 +309,7 @@ const forgetPwd = () => {
   })
     .then((res) => {
       if (res.state == 200) {
+        checkPwdErrorMsg.value = '';
         //成功提示,并返回到登录页面
         showMessage({
           message: L["register"]["重置成功"],
@@ -316,10 +318,11 @@ const forgetPwd = () => {
         emits("success");
       } else {
         //提示错误
-        showMessage({
-          message: res.msg,
-          type: "error",
-        });
+        checkPwdErrorMsg.value = res.msg;
+        // showMessage({
+        //   message: res.msg,
+        //   type: "error",
+        // });
       }
     })
     .finally(() => {
@@ -411,10 +414,10 @@ watch(emailCode, (val) => {
   }
 
   .error {
-    margin-top: 10px;
+    margin-top: 5px;
     position: relative;
     color: #e2231a;
-    height: 16px;
+    height: 22px;
     line-height: 16px;
 
     .iconfont {
@@ -466,11 +469,15 @@ watch(emailCode, (val) => {
         width: 100%;
         height: 100%;
         color: #fff;
-        background: $colorMain;
+        background-color: $colorMain;
         border-left: none;
         border-radius: 0;
         font-size: 12px;
 
+        &.is-disabled {
+          background-color: #909399;
+        }
+
         &:hover {
           // border-color: #e8e8e8;
           // color: $colorMain;

+ 15 - 10
xinkeaboard-web/components/retrieve/RetrievePwdByPhone.vue

@@ -186,13 +186,14 @@ const isShowPwd = () => {
 };
 
 const checkPwdValidate = () => {
-  const regex = /^[A-Za-z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{6,20}$/;
-  if (regex.test(password.value)) {
-    checkPwdErrorMsg.value = "";
-    return true;
+  const res = unifyValidatePassword(password.value); 
+  if (!res.ok) {
+    checkPwdErrorMsg.value = res.reasons[0];
+    return false;
   }
-  checkPwdErrorMsg.value = L["请输入6~20位英文、数字、符号"];
-  return false;
+
+  checkPwdErrorMsg.value = ''
+  return true;
 };
 
 //开启人机校验
@@ -296,7 +297,7 @@ const getVerifyCode = () => {
 };
 
 const forgetPwd = () => {
-  if (!validatePhone() || !validateMobileCode()) return;
+  if (!validatePhone() || !validateMobileCode() || !checkPwdValidate() || !checkPwdMatched()) return;
   forgetPwdLoading.value = true;
   post("v3/member/front/active/email/reset/pwdNew", {
     confirmPassWord: confirmPassword.value,
@@ -409,10 +410,10 @@ watch(mobileCode, (val) => {
   }
 
   .error {
-    margin-top: 10px;
+    margin-top: 5px;
     position: relative;
     color: #e2231a;
-    height: 16px;
+    height: 22px;
     line-height: 16px;
 
     .iconfont {
@@ -464,11 +465,15 @@ watch(mobileCode, (val) => {
         width: 100%;
         height: 100%;
         color: #fff;
-        background: $colorMain;
+        background-color: $colorMain;
         border-left: none;
         border-radius: 0;
         font-size: 12px;
 
+        &.is-disabled {
+          background-color: #909399;
+        }
+
         &:hover {
           // border-color: #e8e8e8;
           // color: $colorMain;

+ 53 - 0
xinkeaboard-web/composables/common.js

@@ -505,3 +505,56 @@ export function calcMallUrlCatName(val){
     let current = a[0]
     return current
 }
+
+
+const SPECIAL_CHAR_CLASS = /[~!@#$%^&*()_+`\-={}\[\]\|:;\"'<,>.?\/]/;
+const DIGIT_CLASS = /[0-9]/;
+const LOWER_CLASS = /[a-z]/;
+const UPPER_CLASS = /[A-Z]/;
+// 检查所有空格字符(半角/全角)
+// - \s 会捕获常见的空格、制表符、换行符等
+// - \u3000 是全角空格
+const SPACE_REG = /[\s\u3000]/;
+
+
+// 如果想限制“只能使用上述字符(不允许空格、中文等)”,可启用下行:
+// const ALLOWED_ALL = /^[0-9A-Za-z~!@#$%^&*()_+`\-={}\[\]\|:;\"'<,>.?\/]+$/;
+
+export function unifyValidatePassword(pwd) {
+  const L = getCurLanguage();
+  const reasons = [];
+
+  // 1) 长度校验:8-20
+  if (pwd.length < 8) {
+    reasons.push(L['register']["密码长度不能小于8位"]);
+  } else if (pwd.length > 20) {
+    reasons.push(L['register']['密码长度不能超过20位']);
+  }
+
+  // 2) 统计字符类别命中数(四类中至少两类)
+  const hasDigit = DIGIT_CLASS.test(pwd);
+  const hasLower = LOWER_CLASS.test(pwd);
+  const hasUpper = UPPER_CLASS.test(pwd);
+  const hasSpecial = SPECIAL_CHAR_CLASS.test(pwd);
+
+  const typeCount = [hasDigit, hasLower, hasUpper, hasSpecial].filter(Boolean).length;
+
+  if (typeCount < 2) {
+    reasons.push(L['register']['密码必须同时包含数字、字母、特殊字符中的两种']);
+  }
+
+  if (SPACE_REG.test(pwd)) {
+    reasons.push(L['register']['密码不能包含空格']);
+  }
+
+  // 4) 可选:若只想限定在“允许字符集合”内,打开 ALLOWED_ALL 后使用以下判断
+  // if (!ALLOWED_ALL.test(pwd)) {
+  //   reasons.push("密码包含不被允许的字符。");
+  // }
+
+  return {
+    ok: reasons.length === 0,
+    reasons,
+  };
+}
+

+ 38 - 26
xinkeaboard-web/pages/login.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="sld_login">
+    <NavTopBar />
     <div class="sld_login_header">
       <div class="content">
         <nuxt-link tag="a" class="l_logo" :to="'/'">
@@ -23,35 +24,46 @@
         </div>
       </div>
     </div>
-    <NavTopBar/>
     <div class="sld_login_content">
-      <img
-        class="bg"
-        :src="ImgBG"
-        :onerror="defaultBgImg"
-        alt
-      />
+      <img class="bg" :src="ImgBG" :onerror="defaultBgImg" alt />
       <div class="login">
         <div class="login_box">
           <div class="top">
             <div class="item1">{{ L["账号登录"] }}</div>
           </div>
-          <LoginEmail ref="loginEmail" v-if="appType === 'user'" :loginLoding="loginLoding" @login="login" />
-          <LoginPhone ref="loginPhone" v-if="appType === 'distributor'" :loginLoding="loginLoding" @login="login" />
+          <LoginEmail
+            ref="loginEmail"
+            v-if="appType === 'user'"
+            :loginLoding="loginLoding"
+            @login="login"
+          />
+          <LoginPhone
+            ref="loginPhone"
+            v-if="appType === 'distributor'"
+            :loginLoding="loginLoding"
+            @login="login"
+          />
           <div
             :class="{
               bottom: true,
               flex_row_between_center: wxEnable == 0,
               flex_row_end_center: wxEnable != 0,
             }"
-            style="padding: 0 30px;"
+            style="padding: 0 30px"
           >
-            <a class="a_link" href="javascript:void(0)" @click="goToPage('/register')">{{
-              L["立即注册"]
-            }}</a>
-            <router-link class="a_link" tag="a" :to="`/member/login/forget`" style="margin-right: 0px">{{
-              L["忘记密码"]
-            }}</router-link>
+            <a
+              class="a_link"
+              href="javascript:void(0)"
+              @click="goToPage('/register')"
+              >{{ L["立即注册"] }}</a
+            >
+            <router-link
+              class="a_link"
+              tag="a"
+              :to="`/member/login/forget`"
+              style="margin-right: 0px"
+              >{{ L["忘记密码"] }}</router-link
+            >
           </div>
         </div>
       </div>
@@ -69,7 +81,7 @@ const configInfo = useUserInfo();
 const filtersStore = useFiltersStore();
 
 const loginEmail = ref();
-const loginPhone = ref()
+const loginPhone = ref();
 
 const config = useRuntimeConfig();
 const appType = config.public.appType;
@@ -79,7 +91,7 @@ const router = useRouter();
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 // const keyEnter = ref(true);
-const loginLoding = ref(false)
+const loginLoding = ref(false);
 
 const defaultImg = ref("/common_top_logo.png");
 const defaultBgImg = ref("/login_bg.png");
@@ -147,8 +159,9 @@ const login = (param) => {
         });
       } else {
         //提示错误
-        const instance = appType === 'user' ? loginEmail.value : loginPhone.value;
-        instance.updateErrorMsg(res.msg)
+        const instance =
+          appType === "user" ? loginEmail.value : loginPhone.value;
+        instance.updateErrorMsg(res.msg);
       }
     })
     .finally(() => {
@@ -175,7 +188,6 @@ onMounted(() => {
     ElMessage.error(decodeURIComponent(route.query.error));
   }
 });
-
 </script>
 <style lang="scss" scoped>
 @import "@/assets/style/register.scss";
@@ -226,27 +238,27 @@ onMounted(() => {
     input::placeholder {
       font-weight: 400;
       font-size: $fontE;
-      color: rgba(40,46,48,0.6);
+      color: rgba(40, 46, 48, 0.6);
     }
 
     ::-webkit-input-placeholder {
       font-weight: 400;
       font-size: $fontE;
-      color: rgba(40,46,48,0.6);
+      color: rgba(40, 46, 48, 0.6);
     }
 
     /* 使用webkit内核的浏览器 */
     :-moz-placeholder {
       font-weight: 400;
       font-size: $fontE;
-      color: rgba(40,46,48,0.6);
+      color: rgba(40, 46, 48, 0.6);
     }
 
     /* Firefox版本19+ */
     :-ms-input-placeholder {
       font-weight: 400;
       font-size: $fontE;
-      color: rgba(40,46,48,0.6);
+      color: rgba(40, 46, 48, 0.6);
     }
   }
 
@@ -284,7 +296,7 @@ onMounted(() => {
     background: $colorMain;
     font-weight: bold;
     font-size: 20px;
-    color: #FFFFFF;
+    color: #ffffff;
     text-align: center;
     border-radius: 2px;
     width: 100%;

+ 1 - 1
xinkeaboard-web/pages/member/login/forget.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="sld_login">
+    <NavTopBar/>
     <div class="sld_login_header">
       <div class="content">
         <nuxt-link tag="a" class="l_logo" :to="`/`">
@@ -22,7 +23,6 @@
         </div>
       </div>
     </div>
-    <NavTopBar/>
     <div class="sld_login_content">
       <img
         class="bg"

+ 1 - 1
xinkeaboard-web/pages/register.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="sld_login">
+    <NavTopBar/>
     <div class="sld_login_header">
       <div class="content">
         <nuxt-link tag="a" class="l_logo" :to="'/'">
@@ -23,7 +24,6 @@
         </div>
       </div>
     </div>
-    <NavTopBar/>
     <div class="sld_login_content">
       <img
         class="bg"