|
|
@@ -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') {
|