Commit 47cfc660 by 刘泽奇

123

parent 685e98ab
......@@ -64,7 +64,7 @@
</div>
<!-- 启服通公共头 -->
<div class="commonchannel" v-if="channelName == 'bw' && !isLogin">
<div class="commonchannel" v-if="channelName == 'bw'">
<div>
<div @click="goHome">
<img :src="logoImg" alt="">
......
......@@ -202,9 +202,9 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
console.log($.fn.jquery, "vvvvvvvvvvvvvvvvv");
var self = this;
if ($.cookie('userpin')) {
this.user_Name = $.cookie('userName');
this.channelUserId = $.cookie('channelUserId');
this.getUserInfo();
}
},
watch: {
// 监听路由变化
......@@ -221,6 +221,21 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
}
},
methods: {
// 获取用户信息
getUserInfo() {
var userPin = $.cookie('userpin');
this.$root.postReq("/web/trademark/tmqueryCtl/getUserByPin", { userpin: userPin }).then((d) => {
this.$root.loading = false;
if (d.status == 0) {
this.$root.user_Name = d.data.userName;
this.$root.channelUserId = d.data.encryptChannelUserId;
d.data.isAdmin ? this.superAdmin = true : this.superAdmin = false;
} else {
console.log(d.msg);
this.$message("请重试");
}
});
},
accessTitle() {
// 渠道标题
var title = document.getElementById('idtitle');
......
......@@ -102,7 +102,6 @@
if (this.$route.query.reqUrl != "") {
this.reqUrl = this.$route.query.reqUrl;
};
this.$root.isLogin = false;
},
created: function() {
......@@ -111,7 +110,6 @@
}
},
destroyed() {
this.$root.isLogin = false;
},
methods: {
handleSelect(key, keyPath) {
......@@ -232,7 +230,7 @@
console.log(d.msg);
this.$root.loading = false;
if (d.status == 0) {
if (d.data.isAdmin) this.$root.superAdmin = d.data.isAdmin;
d.data.isAdmin ? this.$root.superAdmin = d.data.isAdmin : this.$root.superAdmin = null;
$.cookie('channelUserId', d.data.channelUserId);
$.cookie('userName', d.data.userName);
$.cookie('userpin', d.data.userpin);
......@@ -298,8 +296,7 @@
this.$root.loading = false;
console.log(d.msg);
if (d.status == 0) {
if (d.data.isAdmin) this.$root.superAdmin = d.data.isAdmin;
localStorage.superAdmin = d.data.userpin;
d.data.isAdmin ? this.$root.superAdmin = d.data.isAdmin : this.$root.superAdmin = null;
$.cookie('channelUserId', d.data.channelUserId);
$.cookie('userName', d.data.userName);
$.cookie('userpin', d.data.userpin);
......
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