|
|
|
@ -72,7 +72,7 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import vFooter from "@/layouts/footer"; |
|
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
|
import { mapActions } from "vuex"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
|
|
|
|
@ -90,7 +90,7 @@ export default { |
|
|
|
|
platform: Setting.platformId |
|
|
|
|
}, |
|
|
|
|
loginRules: { |
|
|
|
|
account: [{ required: true, message: "请输入用户名", trigger: "blur" }], |
|
|
|
|
account: [{ required: true, message: "请输入账号", trigger: "blur" }], |
|
|
|
|
password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
|
|
|
|
code: [{ required: true, message: "请输入验证码", trigger: "blur" }] |
|
|
|
|
}, |
|
|
|
@ -117,8 +117,12 @@ export default { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
...mapActions("user", [ |
|
|
|
|
"login", "setInfo", "setCustomer" |
|
|
|
|
"login" |
|
|
|
|
]), |
|
|
|
|
getVerImg() { // 获取验证码图片 |
|
|
|
|
this.loginForm.random = Math.floor(Math.random() * 999999999); |
|
|
|
|
this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`; |
|
|
|
|
}, |
|
|
|
|
handleClick(tab, event) { // 切换标签 |
|
|
|
|
this.loginForm.account = ""; |
|
|
|
|
this.$refs.loginForm.clearValidate(); |
|
|
|
@ -143,10 +147,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getVerImg() { // 获取验证码图片 |
|
|
|
|
this.loginForm.random = Math.floor(Math.random() * 999999999); |
|
|
|
|
this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`; |
|
|
|
|
}, |
|
|
|
|
phoneCountdown() { |
|
|
|
|
let count = 60; |
|
|
|
|
if (!this.phoneTimer) { |
|
|
|
@ -169,6 +169,7 @@ export default { |
|
|
|
|
if (!this.phone) return util.warningMsg("请输入手机号"); |
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号"); |
|
|
|
|
let data = { |
|
|
|
|
platform: Setting.platformId, |
|
|
|
|
phone: this.phone, |
|
|
|
|
types: 2 |
|
|
|
|
}; |
|
|
|
|