From 842cfbedebcdb34b0ba53d68e505ae1f8e5dc152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Wed, 22 May 2019 14:08:05 +0800 Subject: [PATCH] =?UTF-8?q?JS=E6=A8=A1=E5=9D=97=E6=94=AF=E6=8C=81=E7=A9=BA?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0=5Fempty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/require-backend.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/assets/js/require-backend.js b/public/assets/js/require-backend.js index 03aaa73f..760b77e6 100644 --- a/public/assets/js/require-backend.js +++ b/public/assets/js/require-backend.js @@ -146,7 +146,13 @@ require(['jquery', 'bootstrap'], function ($, undefined) { //加载相应模块 if (Config.jsname) { require([Config.jsname], function (Controller) { - Controller[Config.actionname] != undefined && Controller[Config.actionname](); + if (Controller.hasOwnProperty(Config.actionname)) { + Controller[Config.actionname](); + } else { + if (Controller.hasOwnProperty("_empty")) { + Controller._empty(); + } + } }, function (e) { console.error(e); // 这里可捕获模块加载的错误