Commit 47cfc660 by 刘泽奇

123

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