解决冲突

This commit is contained in:
weinan2087
2022-10-13 14:36:49 +08:00
parent 49bab71530
commit 47aeaf8597

View File

@@ -35,27 +35,32 @@
return {
checkboxGroup:[],
interestCollection:false,// 兴趣采集
sysTypeListMap:[]
sysTypeListMap:[],
btn_insterest_status:0,
dialog_session_show:0
}
},
created() {
// this.userAvatar=require("@/assets/images/user/default.png");
apiUserhobby.has().then(res=>{
if(res.status == 200) {
// this.userAvatar=require("@/assets/images/user/default.png");
apiUserhobby.has().then(res=>{
if(res.status != 200) {return;}
// 1. 判断用户是否选择过兴趣偏好
if(res.data == false){
this.interestCollection = true;
}
// 2. 判断用户是否点击过"暂不选择"按钮,如果用户点击过"暂不选择"按钮则判断点击"暂不选择"按钮天数是否大于15天如果大于则弹出兴趣偏好框否则不弹
let time = localStorage.getItem('notYet');
if(time == '') {
this.interestCollection = true;
} else {
let time = localStorage.getItem('notYet');
let day = (new Date() - new Date(time))/(1000*60*60*24);
if(day > 15){
this.interestCollection = true;
}
if(day > 15){this.interestCollection = true;}
}
}
})
},
// 3. 判断用户是否点击"关闭"按钮,如果点击"关闭"按钮则在当前session不在弹窗
let dialog_session_show = localStorage.getItem('dialog_session_show');
if(dialog_session_show == 1){this.interestCollection = false;}
})
},
mounted() {
this.getSysTypeTree().then(rs => {
this.sysTypeListMap = rs;