Showing
2 changed files
with
2 additions
and
1 deletions
@@ -207,6 +207,7 @@ const activity = { | @@ -207,6 +207,7 @@ const activity = { | ||
207 | const imgUrl = req.body.imgUrl; | 207 | const imgUrl = req.body.imgUrl; |
208 | const createTime = req.body.createTime || (new Date()); | 208 | const createTime = req.body.createTime || (new Date()); |
209 | 209 | ||
210 | + console.log('req=', actId, userName, content, imgUrl, createTime); | ||
210 | req.ctx(ActivityModel).createArticle({ | 211 | req.ctx(ActivityModel).createArticle({ |
211 | actId, | 212 | actId, |
212 | userName, | 213 | userName, |
@@ -129,7 +129,7 @@ class AdminModel extends global.yoho.BaseModel { | @@ -129,7 +129,7 @@ class AdminModel extends global.yoho.BaseModel { | ||
129 | * @param id 文章ID | 129 | * @param id 文章ID |
130 | * @returns {*} | 130 | * @returns {*} |
131 | */ | 131 | */ |
132 | - createArticle(actId, userName, content, createTime) { | 132 | + createArticle({actId, userName, content, createTime}) { |
133 | return mysqlCli.insert( | 133 | return mysqlCli.insert( |
134 | `insert into ${TB_ACT_ARTICLE} | 134 | `insert into ${TB_ACT_ARTICLE} |
135 | (act_id, user_name, content, create_time) values | 135 | (act_id, user_name, content, create_time) values |
-
Please register or login to post a comment