Ver Fonte

验证码屏蔽

liangluogis há 5 meses atrás
pai
commit
91bbbd90a5
2 ficheiros alterados com 26 adições e 26 exclusões
  1. 1 1
      src/views/gislogin/index.vue
  2. 25 25
      src/views/login/index.vue

+ 1 - 1
src/views/gislogin/index.vue

@@ -9,7 +9,7 @@
 
 <script lang="ts">
 import { Vue, Component, Watch } from 'vue-property-decorator'
-import { userFirstLogin, getMsgCode } from '@/api/user'
+// import { userFirstLogin, getMsgCode } from '@/api/user'
 import { changePassword } from '@/api/base'
 import { regNewPassword } from '@/utils/reg'
 import { ElForm } from 'element-ui/types/form'

+ 25 - 25
src/views/login/index.vue

@@ -118,7 +118,7 @@
 
 <script lang="ts">
 import { Vue, Component, Watch } from 'vue-property-decorator'
-import { userFirstLogin, getMsgCode } from '@/api/user'
+// import { userFirstLogin, getMsgCode } from '@/api/user'
 import { changePassword } from '@/api/base'
 import { regNewPassword } from '@/utils/reg'
 import { ElForm } from 'element-ui/types/form'
@@ -494,30 +494,30 @@ export default class Login extends Vue {
     })
   }
   //发送验证码
-  sendMsg() {
-    if (this.loginForm.username === '' && this.loginForm.password === '') {
-      this.$message.error('请输入账号')
-      return
-    }
-    let timer = setInterval(() => {
-      this.time--
-      this.btnDisabled = true
-      this.btnTitle = `${this.time}s后重新发送`
-      if (this.time === 0) {
-        this.time = 60
-        this.btnDisabled = false
-        this.btnTitle = '发送验证码'
-        clearInterval(timer)
-      }
-    }, 1000)
-    getMsgCode({ username: this.loginForm.username })
-      .then((result) => {
-        this.$message.success(result.result)
-      })
-      .catch((error) => {
-        console.log(error)
-      })
-  }
+  // sendMsg() {
+  //   if (this.loginForm.username === '' && this.loginForm.password === '') {
+  //     this.$message.error('请输入账号')
+  //     return
+  //   }
+  //   let timer = setInterval(() => {
+  //     this.time--
+  //     this.btnDisabled = true
+  //     this.btnTitle = `${this.time}s后重新发送`
+  //     if (this.time === 0) {
+  //       this.time = 60
+  //       this.btnDisabled = false
+  //       this.btnTitle = '发送验证码'
+  //       clearInterval(timer)
+  //     }
+  //   }, 1000)
+  //   getMsgCode({ username: this.loginForm.username })
+  //     .then((result) => {
+  //       this.$message.success(result.result)
+  //     })
+  //     .catch((error) => {
+  //       console.log(error)
+  //     })
+  // }
   // 修改密码弹窗
   handleDialogBtnClick(type) {
     if (type === 'cancel') {