人脸识别与大模型问答
This commit is contained in:
parent
cc55517bc8
commit
341d62f4aa
|
|
@ -149,13 +149,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from '@/api/login'
|
||||
import {getCodeImg} from '@/api/login'
|
||||
import Cookies from 'js-cookie'
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
import {encrypt, decrypt} from '@/utils/jsencrypt'
|
||||
import dingding from '@/assets/images/dingding.svg'
|
||||
import wx from '@/assets/images/wx.svg'
|
||||
import qq from '@/assets/images/QQ.svg'
|
||||
import { getPlaceholderText, getCodePlaceholderText, CONFIG } from '@/utils/configure'
|
||||
import {getPlaceholderText, getCodePlaceholderText, CONFIG} from '@/utils/configure'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
|
|
@ -179,13 +179,13 @@ export default {
|
|||
mobileCodeType: 'LOGIN'
|
||||
},
|
||||
passwordLoginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||
username: [{required: true, trigger: 'blur', message: '请输入您的账号'}],
|
||||
password: [{required: true, trigger: 'blur', message: '请输入您的密码'}],
|
||||
code: [{required: true, trigger: 'change', message: '请输入验证码'}]
|
||||
},
|
||||
mobileLoginRules: {
|
||||
mobile: [{ required: true, trigger: 'blur', message: '请输入您的手机号' }],
|
||||
verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }]
|
||||
mobile: [{required: true, trigger: 'blur', message: '请输入您的手机号'}],
|
||||
verificationCode: [{required: true, trigger: 'blur', message: '请输入验证码'}]
|
||||
},
|
||||
loading: false,
|
||||
captchaEnabled: true,
|
||||
|
|
@ -247,9 +247,9 @@ export default {
|
|||
if (valid) {
|
||||
this.loading = true
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set('username', this.loginForm.username, { expires: 30 })
|
||||
Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 })
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
|
||||
Cookies.set('username', this.loginForm.username, {expires: 30})
|
||||
Cookies.set('password', encrypt(this.loginForm.password), {expires: 30})
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30})
|
||||
} else {
|
||||
Cookies.remove('username')
|
||||
Cookies.remove('password')
|
||||
|
|
@ -257,7 +257,7 @@ export default {
|
|||
}
|
||||
this.loginForm.loginMethod = this.loginMethod
|
||||
this.$store.dispatch('Login', this.loginForm)
|
||||
.then(() => this.$router.push({ path: this.redirect || '/' }))
|
||||
.then(() => this.$router.push({path: this.redirect || '/'}))
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
if (this.captchaEnabled) this.getCode()
|
||||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
this.$store.dispatch('IsLogin', this.loginForm)
|
||||
.then(res => {
|
||||
if (res.data) {
|
||||
this.$modal.confirm('账号已在其他地方登录是否继续登录!!!!').then(function() {
|
||||
this.$modal.confirm('账号已在其他地方登录是否继续登录!!!!').then(function () {
|
||||
return that.handleLogin()
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
|
|
@ -378,7 +378,7 @@ export default {
|
|||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue