Browse Source

发送验证码问题修改

gcj 3 years ago
parent
commit
aeb29bc887

+ 42 - 0
src/App.vue

@@ -1,6 +1,11 @@
 <template>
   <div id="app" :dir="dir">
     <router-view />
+    <div class="userAgentTips" v-if="userAgentTipShow">
+        <img src="./assets/userAgentWarning.png" width="32px" />
+        <span>当前浏览器可能与网站不兼容!建议使用 chrome 浏览器获得最佳使用体验。 </span>
+        <img src="./assets/userAgentClose.png" width="16px" @click="handleClickUserAgent" />
+    </div>
   </div>
 </template>
 
@@ -10,6 +15,7 @@ export default {
   data() {
     return {
       dir: "ltr",
+      userAgentTipShow: false,
     };
   },
   created() {
@@ -17,6 +23,42 @@ export default {
     if (lang_type == "AR") {
       this.dir = "rtl";
     }
+    this.handleUserAgentRoot()
   },
+  methods:{
+      // 判断是否为chrome浏览器 
+      handleUserAgentRoot(){
+          if(!sessionStorage.getItem("useragent_root_close") && navigator.userAgent.indexOf('Chrome') == -1){
+              this.userAgentTipShow = true
+          }
+      },
+      handleClickUserAgent(){
+          sessionStorage.setItem("useragent_root_close", true);
+          this.userAgentTipShow = false
+      },
+  }
 };
 </script>
+<style lang="scss" scoped>
+.userAgentTips{
+    position: fixed;
+    top: 62px;
+    left: 50%;
+    // width: 624px;
+    margin-left: -312px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 12px 16px 12px 8px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 16px;
+    line-height: 24px;
+    :nth-child(1){
+        margin-right: 8px;
+    }
+    :nth-child(3){
+        cursor: pointer;
+    }
+}
+</style>

BIN
src/assets/userAgentClose.png


BIN
src/assets/userAgentWarning.png


+ 7 - 4
src/components/login/ForgetPassword.vue

@@ -256,7 +256,8 @@ export default {
           this.EmailCorrect = reg.test(this.phone_or_email);
           if (!this.EmailCorrect) {
             this.accountError = true;
-            this.$message.error("手机号码不正确");
+            // this.$message.error("手机号码不正确");
+            this.$message.error(this.$t("Key656"));
           } else {
             this.accountError = false;
           }
@@ -345,11 +346,11 @@ export default {
     // 注册
     gotoLogin() {
       if (this.phone_or_email == "") {
-        this.$message.warning(this.$Key("Key35"));
+        this.$message.warning(this.$t("Key35"));
         return;
       }
       if (this.password == "") {
-        this.$message.warning("请输入密码");
+        this.$message.warning(this.$t("Key655"));
         return;
       }
       if (this.verification_code == "") {
@@ -358,7 +359,9 @@ export default {
         return;
       }
       if (this.passwordError) {
-        this.$message.warning("请重新输入密码,密码格式不对");
+        // this.$message.warning("请重新输入密码,密码格式不对");
+        this.$message.warning(this.$t("Key654"));
+
         return;
       }
       if (this.twopassword != this.password) {

+ 1 - 0
src/components/login/LoginNav.vue

@@ -226,6 +226,7 @@ export default {
       Cookies.remove("session_id");
       Cookies.remove("user_code");
       Cookies.remove("user_type");
+      sessionStorage.removeItem("useragent_root_close");
       removeToken();
       this.userShow = false;
       this.userMessage = null;

+ 3 - 1
src/components/login/login.vue

@@ -244,7 +244,9 @@ export default {
       let flag = true;
       if (this.loginType == "密码") {
         if (!this.email_phone && !this.password) {
-          this.$message.warning("账号密码不能为空");
+          // this.$message.warning("账号密码不能为空");
+          this.$message.warning(this.$t("Key653"));
+
           flag = false;
           return;
         }

+ 8 - 1
src/views/login/index.vue

@@ -414,7 +414,8 @@ export default {
             if (res.child_sys_list && res.child_sys_list.length > 0) {
               this.projectList = res.child_sys_list;
             } else {
-              this.$message.warning("您没有任何权限,请联系您所在机构的管理员");
+              // this.$message.warning("您没有任何权限,请联系您所在机构的管理员");
+              this.$message.warning(this.$t("Key652"));
             }
           })
           .catch((err) => {
@@ -480,6 +481,12 @@ export default {
         "Key545",
         "Key546",
         "Key573",
+        "Key655",
+        "Key654",
+        "Key653",
+        "Key652",
+        "Key656",
+
       ],
     });
     this.isData = true;

+ 2 - 3
vue.config.js

@@ -6,8 +6,7 @@ function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = defaultSettings.title || '登录' // page title
-
+const name = defaultSettings.title || '首页' // page title
 // If your port is set to 80,
 // use administrator privileges to execute the command line.
 // For example, Mac: sudo npm run
@@ -40,7 +39,7 @@ module.exports = {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `https://gcls.utschool.cn`,
+        target: `http://gcls.utschool.cn`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''