Skip to content

Commit

Permalink
fix(coze-plugin): fix the problem of cookie invalidation in the coze …
Browse files Browse the repository at this point in the history
…plugin expires is 10 day
  • Loading branch information
xcyeye committed Nov 20, 2021
1 parent 672cc45 commit 17b589c
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -169,7 +169,9 @@ export default {
const todo = AV.Object.createWithoutData('Talk', this.moodItem.id);
todo.set('mood_like', mood_like + 1);
todo.save().then(() => {
document.cookie="mood_like_status_" + this.moodItem.id + "=1";
let expiresTime = new Date().getTime() + 864000000;
let expires = new Date(expiresTime);
document.cookie = "mood_like_status_" + this.moodItem.id + "=1;expires=" + expires + ";";
this.moodLink = mood_like + 1
this.moodLikeStatus = true
this.setLikeSuccess = true
Expand Down Expand Up @@ -197,10 +199,6 @@ export default {
})
},
moodLove(e,moodItem) {
let expires = 'Thu, 18 Dec 2043 12:00:00 GMT';
console.log(expires)
return
new Promise((resolve,reject) => {
if (!this.setLikeSuccess) {
let loadingLikeStatus = setInterval(() =>{
Expand Down

0 comments on commit 17b589c

Please sign in to comment.