From f7a799c587136639b89fd7383b403dc883d7e8b7 Mon Sep 17 00:00:00 2001 From: mj&sz <307336854@qq.com> Date: Fri, 17 Apr 2020 17:37:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20src/controller/admin/model.js.=20?= =?UTF-8?q?=E6=9C=AC=E6=9D=A5=E5=B0=B1=E6=98=AF=E6=95=B0=E7=BB=84=EF=BC=8C?= =?UTF-8?q?=E5=93=A5=E5=93=A5=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=92=8C=E6=96=B0=E5=A2=9EHOOK=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9=E6=98=AF=E4=B8=8D=E6=98=AF=E9=83=BD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=B5=8B=E8=AF=95=E5=91=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/admin/model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/admin/model.js b/src/controller/admin/model.js index 6b5e983a..c806f059 100644 --- a/src/controller/admin/model.js +++ b/src/controller/admin/model.js @@ -268,7 +268,7 @@ module.exports = class extends think.cmswing.admin { // 将模型添加到钩子 if (!think.isEmpty(data.hooks)) { - for (const h of data.hooks.split(',')) { + for (const h of data.hooks) { const hooks = await this.model('hooks').where({name: h}).find(); let extarr = hooks.ext ? hooks.ext.split(',') : []; extarr.push(data.name); -- Gitee