Commit 050b284b authored by Your Name's avatar Your Name

提示语有误

parent c9c18d87
......@@ -45,6 +45,7 @@ export default {
let param = {
password: util.encrypt(this.userInfo.password),
username: this.userInfo.username,
// administrator: 2
};
vm.$https(
{
......@@ -79,8 +80,10 @@ export default {
this.$toast.fail("您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能");
}
} else {
} else if (res.data.resultCode === "200" && (res.data.user.type !== '2' || res.data.user.type !== '4')){
this.$toast.fail("您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能");
} else {
this.$toast.fail(res.data.message)
}
})
.catch(function (err) {
......
......@@ -60,14 +60,36 @@ export default {
data() {
return {
form: {
username: JSON.parse(sessionStorage.getItem("userInfo")).userName,
username: '',
},
};
},
mounted() {
// 查询管理员信息
created() {
this.selectUser()
},
methods: {
// 查询当前用户信息
selectUser(){
console.log(JSON.parse(sessionStorage.getItem("userInfo")).id)
let vm = this;
let param = {
id: JSON.parse(sessionStorage.getItem("userInfo")).id
};
vm.$https(
{
url: "/tUser/getById",
method: "get",
authType: this.backToken,
},
param
)
.then((res) => {
this.form.username = res.data.data.userName
})
.catch(function (err) {
console.log(err);
});
},
// 提交数据
onSubmit() {
if (this.form.password !== this.form.againPsd) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment