From 178bb9fc711d9bdd688a20d5c9c8b288e38949b1 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Thu, 5 Dec 2019 10:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=B7=BB=E5=8A=A0=E5=B8=A6?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/article.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/controllers/article.js b/controllers/article.js index 1376c66..30fa713 100644 --- a/controllers/article.js +++ b/controllers/article.js @@ -9,6 +9,7 @@ var articlefind = async (ctx, next) => { next() } // 添加文章 +// 参数: title 文章标题, content 文章内容 tag 选择的标签id 形式: 1,2 var articleadd = async (ctx, next) => { let articleid=0 let month=parseInt(new Date(Date.now()).getMonth())+1 @@ -38,18 +39,6 @@ var articleadd = async (ctx, next) => { } } } - - // console.log(res.data.length) - // console.log(res.data[res.data.length-1].num_key) - // let tags=ctx.request.body.tags.split(",") - // console.log(ctx.request.body.tags.split(",")) - // for(let i in ctx.request.body.tags.split(",")){ - // // console.log(ctx.request.body.tags.split(",")[i]) - // await dbs.add("articletag",{articleid:res.data[res.data.length-1].num_key,tagid:ctx.request.body.tags.split(",")[i]}) - // console.log("success") - - // } - // await dbs.add("articletag",{articleid:res.data[res.data.length-1].num_key,tagid:ctx.query.tagid}) }) console.log(ctx.request.body) ctx.body = "添加成功"