mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
放开引导页检查
This commit is contained in:
@@ -531,41 +531,38 @@
|
|||||||
|
|
||||||
//检查兴趣爱好是否已填报,
|
//检查兴趣爱好是否已填报,
|
||||||
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
||||||
// let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
||||||
// let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
||||||
// if(!sessionHobby){ //只有session中不存在,才会验证
|
console.log("sessionHobby:"+sessionHobby);
|
||||||
// //本地15天验证,localHobby,后续完善
|
if(!sessionHobby){ //只有session中不存在,才会验证
|
||||||
// let flag=true;//请求检查
|
//本地15天验证,localHobby,后续完善
|
||||||
// if(localHobbyTime) {
|
let flag=true;//请求检查
|
||||||
// let day = (new Date() - new Date(localHobbyTime))/(1000*60*60*24);
|
if(localHobbyTime) {
|
||||||
// if(day< 15){
|
let day = (new Date() - new Date(localHobbyTime))/(1000*60*60*24);
|
||||||
// flag = false;
|
if(day< 15){
|
||||||
// }
|
flag = false;
|
||||||
// }
|
}
|
||||||
// if(flag){
|
}
|
||||||
// apiUserhobby.has().then(res=>{
|
if(flag){
|
||||||
// if(res.status == 200) {
|
apiUserhobby.has().then(res=>{
|
||||||
// if(!res.result){
|
if(res.status == 200) {
|
||||||
// //设置需要显示兴趣爱好收集窗口
|
if(!res.result){
|
||||||
// this.userHobby.needShow=true;
|
//设置需要显示兴趣爱好收集窗口
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// console.log('兴趣爱好检查失败'+res.message);
|
|
||||||
// }
|
|
||||||
// //检查引导页
|
|
||||||
// this.checkAndShowGuide();
|
|
||||||
// });
|
|
||||||
// }else{
|
|
||||||
// this.checkAndShowGuide();
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// //不用检查引导页
|
|
||||||
// //this.checkAndShowGuide();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//测试环境中
|
|
||||||
this.userHobby.needShow=true;
|
this.userHobby.needShow=true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
console.log('兴趣爱好检查失败'+res.message);
|
||||||
|
}
|
||||||
|
//检查引导页
|
||||||
this.checkAndShowGuide();
|
this.checkAndShowGuide();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.checkAndShowGuide();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//检查引导页
|
||||||
|
this.checkAndShowGuide();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -579,28 +576,29 @@
|
|||||||
checkAndShowGuide(){
|
checkAndShowGuide(){
|
||||||
//引导页弹框是否显示
|
//引导页弹框是否显示
|
||||||
//检查本地,减少服务器请求的次数
|
//检查本地,减少服务器请求的次数
|
||||||
// let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid);
|
let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid);
|
||||||
// if(!localGuide){
|
console.log("=== "+localGuide);
|
||||||
// apiGuide.hasUser().then(res=>{
|
if(!localGuide){
|
||||||
// if(res.status==200){
|
apiGuide.hasUser().then(res=>{
|
||||||
// if(!res.result){
|
if(res.status==200){
|
||||||
// this.$refs.guide.show();
|
if(!res.result){
|
||||||
// }else{
|
this.$refs.guide.show();
|
||||||
// if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
}else{
|
||||||
// }
|
if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
||||||
// localStorage.setItem('user-guide-'+this.userInfo.aid,1);
|
}
|
||||||
// }else{
|
localStorage.setItem('user-guide-'+this.userInfo.aid,1);
|
||||||
// console.log('获取引导页检查失败'+res.message);
|
}else{
|
||||||
// //this.$message.error('')
|
console.log('获取引导页检查失败'+res.message);
|
||||||
// if(this.userHobby.needShow){this.$refs.userCollection.show();}
|
//this.$message.error('')
|
||||||
// }
|
if(this.userHobby.needShow){this.$refs.userCollection.show();}
|
||||||
// });
|
}
|
||||||
// }else {
|
});
|
||||||
// if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
}else {
|
||||||
// }
|
if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
||||||
|
}
|
||||||
|
|
||||||
//测试情况下
|
//测试情况下
|
||||||
this.$refs.guide.show();
|
// this.$refs.guide.show();
|
||||||
},
|
},
|
||||||
closeGuide(){ //关闭引导页
|
closeGuide(){ //关闭引导页
|
||||||
if(this.userHobby.needShow){
|
if(this.userHobby.needShow){
|
||||||
|
|||||||
Reference in New Issue
Block a user