Authored by 邱骏

修改后台创建文章参数

... ... @@ -207,6 +207,7 @@ const activity = {
const imgUrl = req.body.imgUrl;
const createTime = req.body.createTime || (new Date());
console.log('req=', actId, userName, content, imgUrl, createTime);
req.ctx(ActivityModel).createArticle({
actId,
userName,
... ...
... ... @@ -129,7 +129,7 @@ class AdminModel extends global.yoho.BaseModel {
* @param id 文章ID
* @returns {*}
*/
createArticle(actId, userName, content, createTime) {
createArticle({actId, userName, content, createTime}) {
return mysqlCli.insert(
`insert into ${TB_ACT_ARTICLE}
(act_id, user_name, content, create_time) values
... ...