浏览代码

!123 多图片预览改进、JS模块增加空操作_empty
Merge pull request !123 from 无木/master

Karson 6 年之前
父节点
当前提交
830dd7a20d
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 7 1
      public/assets/js/require-backend.js
  2. 1 0
      public/assets/js/require-table.js

+ 7 - 1
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);
                         // 这里可捕获模块加载的错误

+ 1 - 0
public/assets/js/require-table.js

@@ -409,6 +409,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
                         });
                         Layer.photos({
                             photos: {
+                                "start":$(this).index(".img-center"),
                                 "data": data
                             },
                             anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)