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

提示语有误

parent c9c18d87
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
let param = { let param = {
password: util.encrypt(this.userInfo.password), password: util.encrypt(this.userInfo.password),
username: this.userInfo.username, username: this.userInfo.username,
// administrator: 2
}; };
vm.$https( vm.$https(
{ {
...@@ -79,8 +80,10 @@ export default { ...@@ -79,8 +80,10 @@ export default {
this.$toast.fail("您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能"); 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的功能"); this.$toast.fail("您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能");
} else {
this.$toast.fail(res.data.message)
} }
}) })
.catch(function (err) { .catch(function (err) {
......
...@@ -60,14 +60,36 @@ export default { ...@@ -60,14 +60,36 @@ export default {
data() { data() {
return { return {
form: { form: {
username: JSON.parse(sessionStorage.getItem("userInfo")).userName, username: '',
}, },
}; };
}, },
mounted() { created() {
// 查询管理员信息 this.selectUser()
}, },
methods: { 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() { onSubmit() {
if (this.form.password !== this.form.againPsd) { 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