Commit 97702c2e authored by zhangyanni's avatar zhangyanni

感兴趣标签登录

parent 14921c4b
......@@ -13,5 +13,10 @@ export default {
//提交感兴趣领域标签
postIntersetedDictAxios(params){
return api.fetchPost('/business/content/addEmpDataLabel',params);
},
//获取用户选择标签
getUserIntersetedFlagAxios(){
return api.fetchPost('/business/content/selectEmpDataLabelList')
}
}
......@@ -2,7 +2,6 @@ import Vue from 'vue';
import publicFun from '@/assets/js/public.js';
import api from './commonApi';
let userInfoObj = "";
window.isHasInterFlag="";
export default {
//根据ID获取name,适用于select,radio
getLabelByIdPublic(key,data,name,keyword){
......@@ -285,32 +284,6 @@ export default {
'updateTimelineShareData'
]// 需要使用的JS接口列表
})
},
//获取标签
getIntersetFlag(){
return api.tipInfo().then((res)=>{
if(res.code==0){
if(res.result.indexOf('TIP005')>-1) return true;
else return false;
}else{
console.log(res.msg);
}
}).catch((err)=>{
console.log(err);
})
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
var resultData = "";
// 以下是把 m 的 `this` 指向到本组件
let pdata = this.getIntersetFlag();
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) { window.isHasInterFlag = result })
}
}
\ No newline at end of file
......@@ -150,23 +150,35 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
publicFunc.isSelectedInterstedFlag();
if(this.publicFun.getCookie("userInfo")&&window.isHasInterFlag){
this.isShow = true;
this.isShowFlag = false;
this.routerLinkFunc();
}else{
if(this.publicFun.getUserDetailRoleFunc()!=2){
this.isShow = false;
this.isShowFlag = true;
}else this.routerLinkFunc();
}
that.timeOutReturn();
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
let m = selectFlag.methods.getIntersetFlag,that = this;
// 以下是把 m 的 `this` 指向到本组件
let pdata = m.call(this);
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) {
if(that.publicFun.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
},
//登录
handleLogin(type, formName) {
const that = this;
......
......@@ -136,21 +136,32 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
publicFunc.isSelectedInterstedFlag();
if(this.publicFun.getCookie("userInfo")&&window.isHasInterFlag){
this.isShow = true;
this.isShowFlag = false;
this.routerLinkFunc();
}else{
if(this.publicFun.getUserDetailRoleFunc()!=2){
this.isShow = false;
this.isShowFlag = true;
}else this.routerLinkFunc();
}
this.timeOutReturn();
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
let m = selectFlag.methods.getIntersetFlag,that = this;
// 以下是把 m 的 `this` 指向到本组件
let pdata = m.call(this);
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) {
if(that.publicFun.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
},
//登录
handleLogin(type, formName) {
......
......@@ -137,19 +137,31 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
publicFunc.isSelectedInterstedFlag();
if(this.publicFun.getCookie("userInfo")&&window.isHasInterFlag){
this.isShow = true;
this.isShowFlag = false;
this.routerLinkFunc();
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
let m = selectFlag.methods.getIntersetFlag,that = this;
// 以下是把 m 的 `this` 指向到本组件
let pdata = m.call(this);
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) {
if(that.publicFun.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
}else{
if(this.publicFun.getUserDetailRoleFunc()!=2){
this.isShow = false;
this.isShowFlag = true;
}else this.routerLinkFunc();
}
that.timeOutReturn();
},
routerLinkFunc(){
......
......@@ -175,19 +175,7 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
publicFunc.isSelectedInterstedFlag();
if(this.publicFun.getCookie("userInfo")&&window.isHasInterFlag){
this.isShow = true;
this.isShowFlag = false;
this.routerLinkFunc();
}else{
if(this.publicFun.getUserDetailRoleFunc()!=2){
this.isShow = false;
this.isShowFlag = true;
}else this.routerLinkFunc();
}
that.timeOutReturn()
this.isSelectedInterstedFlag();
},
......@@ -229,6 +217,30 @@
postData(){
this.routerLinkFunc()
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
let m = selectFlag.methods.getIntersetFlag,that = this;
// 以下是把 m 的 `this` 指向到本组件
let pdata = m.call(this);
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) {
if(that.publicFun.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
}
},
mounted() {
......
......@@ -48,7 +48,21 @@
}).catch(err=>{
this.$toast(err);
})
}
},
//获取标签
getIntersetFlag(){
return api.tipInfo().then((res)=>{
if(res.code==0){
if(res.result.indexOf('TIP005')>-1) return true;
else return false;
}else{
console.log(res.msg);
}
}).catch((err)=>{
console.log(err);
})
},
},
mounted(){
this.getInitSelect();
......
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