diff --git "a/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/addComment/index.js" "b/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/addComment/index.js" index c3d3988..5eb4f9e 100644 --- "a/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/addComment/index.js" +++ "b/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/addComment/index.js" @@ -20,6 +20,17 @@ exports.main = async (event, context) => { }).get() .then(res=>{ commentCount=res.data[0].comments + db.collection('notify') + .add({ + data:{ + content:"您发布的内容“"+res.data[0].content+"”被评论了", + userid:res.data[0].userid, + mark:0, + title:"您发布的社区文章被评论了", + type:'评论', + time:event.createTime, + } + }) }) commentCount=commentCount+1; var newData={ diff --git "a/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/thumbup/index.js" "b/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/thumbup/index.js" index fc8b87b..c81453d 100644 --- "a/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/thumbup/index.js" +++ "b/\347\202\271\346\273\264\347\224\237\346\264\273/cloudfunctions/thumbup/index.js" @@ -32,7 +32,7 @@ exports.main = async (event, context) => { await db.collection('notify') .add({ data:{ - content:'您发布的内容"'+event.postContent+'"被点赞了', + content:'您发布的内容“'+event.postContent+'”被点赞了', mark:0, time:event.createTime, title:'您发布的社区文章被点赞了',