人脸识别与大模型问答

This commit is contained in:
jiang 2024-10-08 15:13:07 +08:00
parent cc55517bc8
commit 341d62f4aa
1 changed files with 14 additions and 14 deletions

View File

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