diff --git a/public/assets/js/backend.js b/public/assets/js/backend.js index eeb9bcd4..b3bd6df4 100755 --- a/public/assets/js/backend.js +++ b/public/assets/js/backend.js @@ -308,7 +308,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($ }); }, init: function () { - //后台的公用代码 + //公共代码 //点击包含.btn-dialog的元素时弹出dialog $(document).on('click', '.btn-dialog', function (e) { Backend.api.open(Backend.api.fixurl($(this).attr('href')), $(this).attr('title')); @@ -328,6 +328,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($ window.Backend = Backend; //Toastr定义 Toastr.options = Backend.config.toastr; - + + Backend.init(); return Backend; }); \ No newline at end of file diff --git a/public/assets/js/frontend.js b/public/assets/js/frontend.js index 8da1288f..85ddd094 100644 --- a/public/assets/js/frontend.js +++ b/public/assets/js/frontend.js @@ -234,6 +234,10 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($ } return val; }); + }, + init: function () { + //公共代码 + } }; //将Layer暴露到全局中去 @@ -246,5 +250,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($ window.Frontend = Frontend; //Toastr定义 Toastr.options = Frontend.config.toastr; + + Frontend.init(); return Frontend; }); diff --git a/public/assets/js/require-backend.min.js b/public/assets/js/require-backend.min.js index 8a4c1f60..55b0cff8 100644 --- a/public/assets/js/require-backend.min.js +++ b/public/assets/js/require-backend.min.js @@ -2222,7 +2222,7 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], f }); }, init: function () { - //后台的公用代码 + //公共代码 //点击包含.btn-dialog的元素时弹出dialog $(document).on('click', '.btn-dialog', function (e) { Backend.api.open(Backend.api.fixurl($(this).attr('href')), $(this).attr('title')); @@ -2242,7 +2242,8 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], f window.Backend = Backend; //Toastr定义 Toastr.options = Backend.config.toastr; - + + Backend.init(); return Backend; }); //! moment.js diff --git a/public/assets/js/require-frontend.min.js b/public/assets/js/require-frontend.min.js index 73b18779..1e0b1848 100644 --- a/public/assets/js/require-frontend.min.js +++ b/public/assets/js/require-frontend.min.js @@ -2148,6 +2148,10 @@ define('frontend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], } return val; }); + }, + init: function () { + //公共代码 + } }; //将Layer暴露到全局中去 @@ -2160,6 +2164,8 @@ define('frontend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], window.Frontend = Frontend; //Toastr定义 Toastr.options = Frontend.config.toastr; + + Frontend.init(); return Frontend; });