|
|
|
@ -91,8 +91,9 @@
|
|
|
|
} from "@/api/api.js";
|
|
|
|
} from "@/api/api.js";
|
|
|
|
import QRCode from 'qrcode'
|
|
|
|
import QRCode from 'qrcode'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ElMessage
|
|
|
|
ElMessage, ElMessageBox
|
|
|
|
} from 'element-plus'
|
|
|
|
} from 'element-plus'
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ref
|
|
|
|
ref
|
|
|
|
} from 'vue'
|
|
|
|
} from 'vue'
|
|
|
|
@ -128,12 +129,23 @@
|
|
|
|
Login(data).then(res => {
|
|
|
|
Login(data).then(res => {
|
|
|
|
|
|
|
|
|
|
|
|
if (res.data.status == 'ok') {
|
|
|
|
if (res.data.status == 'ok') {
|
|
|
|
|
|
|
|
|
|
|
|
sessionStorage.setItem('token', res.data.token);
|
|
|
|
sessionStorage.setItem('token', res.data.token);
|
|
|
|
sessionStorage.setItem('refreshToken', res.data.refresh_token);
|
|
|
|
sessionStorage.setItem('refreshToken', res.data.refresh_token);
|
|
|
|
// sessionStorage.setItem('tk', JSON.stringify(res.data.tk));
|
|
|
|
// sessionStorage.setItem('tk', JSON.stringify(res.data.tk));
|
|
|
|
var token = sessionStorage.getItem('token');
|
|
|
|
var token = sessionStorage.getItem('token');
|
|
|
|
if (token == res.data.token) {
|
|
|
|
if (token == res.data.token) {
|
|
|
|
window.location.href = "./#/dashboard"
|
|
|
|
if(res.data.pwd_default != undefined && res.data.pwd_default==true){
|
|
|
|
|
|
|
|
ElMessageBox.alert('请到"个人中心"修改您的密码', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '知道了',
|
|
|
|
|
|
|
|
callback:action=> {
|
|
|
|
|
|
|
|
window.location.href = "./#/dashboard"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
window.location.href = "./#/dashboard"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ElMessage.error(res.data.msg)
|
|
|
|
ElMessage.error(res.data.msg)
|
|
|
|
|