Skip to content

Commit

Permalink
评论通知
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenSk12 committed Jun 15, 2021
1 parent 17724db commit d152187
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions 点滴生活/cloudfunctions/addComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
2 changes: 1 addition & 1 deletion 点滴生活/cloudfunctions/thumbup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:'您发布的社区文章被点赞了',
Expand Down

0 comments on commit d152187

Please sign in to comment.