export default {
data() {
return {
loading: false,
rules: {},
ruleForm: {
userAccount: “admin”,
password: “123456”,
},
};
},
methods: {
submitForm(ruleForm) {
this.KaTeX parse error: Expected '}', got 'EOF' at end of input: …st data = this.qs.stringify({
userAccount: “admin”,
passWord: “123456”,
});
const { data: res } = await this.request({
url: “/manager/admin/login”,
data: data,
method: “POST”,
});
console.log(res);
if (res.code == 1) {
this.
m
e
s
s
a
g
e
(
m
e
s
s
a
g
e
:
"
登
陆
成
功
"
,
t
y
p
e
:
"
s
u
c
c
e
s
s
"
,
o
n
C
l
o
s
e
:
(
)
=
>
t
h
i
s
.
l
o
a
d
i
n
g
=
f
a
l
s
e
;
)
;
w
i
n
d
o
w
.
s
e
s
s
i
o
n
S
t
o
r
a
g
e
.
s
e
t
I
t
e
m
(
′
t
o
k
e
n
′
,
r
e
s
.
d
a
t
a
.
t
o
k
e
n
)
;
t
h
i
s
.
message({ message: "登陆成功", type: "success", onClose:()=>{ this.loading=false; } }); window.sessionStorage.setItem('token',res.data.token); this.
message(message:"登陆成功",type:"success",onClose:()=>this.loading=false;);window.sessionStorage.setItem(′token′,res.data.token);this.router.push(’/Home’);
}else{
this.$message({
message: “登陆失败”,
type: “error”,
onClose:()=>{
this.loading=true;
}
});
}
});
},
},
};
login2
最新推荐文章于 2022-05-12 22:51:19 发布