mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
解决冲突
This commit is contained in:
@@ -35,27 +35,32 @@
|
|||||||
return {
|
return {
|
||||||
checkboxGroup:[],
|
checkboxGroup:[],
|
||||||
interestCollection:false,// 兴趣采集
|
interestCollection:false,// 兴趣采集
|
||||||
sysTypeListMap:[]
|
sysTypeListMap:[],
|
||||||
|
btn_insterest_status:0,
|
||||||
|
dialog_session_show:0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.userAvatar=require("@/assets/images/user/default.png");
|
// this.userAvatar=require("@/assets/images/user/default.png");
|
||||||
apiUserhobby.has().then(res=>{
|
apiUserhobby.has().then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status != 200) {return;}
|
||||||
|
// 1. 判断用户是否选择过兴趣偏好
|
||||||
|
if(res.data == false){
|
||||||
|
this.interestCollection = true;
|
||||||
|
}
|
||||||
|
// 2. 判断用户是否点击过"暂不选择"按钮,如果用户点击过"暂不选择"按钮则判断点击"暂不选择"按钮天数是否大于15天,如果大于则弹出兴趣偏好框,否则不弹
|
||||||
let time = localStorage.getItem('notYet');
|
let time = localStorage.getItem('notYet');
|
||||||
if(time == '') {
|
if(time == '') {
|
||||||
this.interestCollection = true;
|
this.interestCollection = true;
|
||||||
} else {
|
} else {
|
||||||
let time = localStorage.getItem('notYet');
|
|
||||||
let day = (new Date() - new Date(time))/(1000*60*60*24);
|
let day = (new Date() - new Date(time))/(1000*60*60*24);
|
||||||
if(day > 15){
|
if(day > 15){this.interestCollection = true;}
|
||||||
this.interestCollection = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// 3. 判断用户是否点击"关闭"按钮,如果点击"关闭"按钮则在当前session不在弹窗
|
||||||
}
|
let dialog_session_show = localStorage.getItem('dialog_session_show');
|
||||||
})
|
if(dialog_session_show == 1){this.interestCollection = false;}
|
||||||
},
|
})
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getSysTypeTree().then(rs => {
|
this.getSysTypeTree().then(rs => {
|
||||||
this.sysTypeListMap = rs;
|
this.sysTypeListMap = rs;
|
||||||
|
|||||||
Reference in New Issue
Block a user