Compare commits
No commits in common. "11e79989113abd947d3cdbc00695c471aecdfb73" and "95f850131487b0cfe4e2653bcf3e132c3668005f" have entirely different histories.
11e7998911
...
95f8501314
|
|
@ -42,21 +42,20 @@ const handleLogin = async () => {
|
||||||
const loginCore=async ()=>{
|
const loginCore=async ()=>{
|
||||||
let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true})
|
let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true})
|
||||||
localStorage.setItem('token', token)
|
localStorage.setItem('token', token)
|
||||||
try{
|
await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
|
||||||
await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
|
success()
|
||||||
}catch (e){
|
|
||||||
ElMessage.warning("签到失败,将以非签到状态访问本系统")
|
|
||||||
}finally {
|
|
||||||
success()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const success = () => {
|
const success = () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
router.push("/home/index")
|
ElMessageBox.alert('登录成功且签到,即将为您进入到首页', '签到提示', {
|
||||||
|
type:'success',
|
||||||
|
showClose: false,
|
||||||
|
callback: (action: Action) => {
|
||||||
|
router.push("/home/index")
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const error = (message:any) => {
|
const error = (message:any) => {
|
||||||
ElMessageBox.alert(message)
|
ElMessageBox.alert(message)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue