This commit is contained in:
zhaofang
2022-09-19 13:12:30 +08:00
parent 85bb68a0ba
commit 6b80c08540

View File

@@ -13,7 +13,7 @@
</div>
<div slot="footer" class="dialog-footer">
<div><el-button type="primary" class="btn-one" @click="saveInterest()">生成我的兴趣偏好</el-button></div>
<div><el-button @click="interestCollection = false" class="btn-tow" type="text">暂不选择</el-button></div>
<div><el-button @click="notYet()" class="btn-tow" type="text">暂不选择</el-button></div>
</div>
</el-dialog>
</template>
@@ -30,7 +30,7 @@
data(){
return {
checkboxGroup:[],
interestCollection:true,// 兴趣采集
interestCollection:false,// 兴趣采集
sysTypeListMap:[]
}
},
@@ -39,6 +39,12 @@
apiUserhobby.has().then(res=>{
if(res.status == 200) {
this.interestCollection = true;
} else {
let time = localStorage.getItem('notYet');
let day = (new Date() - new Date(time))/(1000*60*60*24);
if(day > 8){
this.interestCollection = true;
}
}
})
},
@@ -48,6 +54,10 @@
});
},
methods:{
notYet() {
this.interestCollection = false;
localStorage.setItem('notYet',new Date());
},
...mapActions({
getSysTypeTree: 'sysType/getSysTypeTree',
}),
@@ -73,7 +83,7 @@
dangerouslyUseHTMLString: true,
message: `<span class="u-message">
选择个人偏好成功U币+5
<span class="text"><router-link class="routerLink" to="/user/ucurrency">查看详情</router-link></span>
<span class="text"><a href="${this.webBaseUrl}/user/ucurrency">查看详情</a></span>
</span>`
});
}