Browse Source

修复data-table-id不统一的BUG
修复多图片预览时错误的BUG

Karson 6 years ago
parent
commit
71195b4185
2 changed files with 3 additions and 3 deletions
  1. 2 2
      public/assets/js/backend.js
  2. 1 1
      public/assets/js/require-table.js

+ 2 - 2
public/assets/js/backend.js

@@ -93,9 +93,9 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
                 if (url.indexOf("{ids}") > -1) {
                 if (url.indexOf("{ids}") > -1) {
                     var ids = 0;
                     var ids = 0;
                     var tableId = $(elem).data("table-id");
                     var tableId = $(elem).data("table-id");
-                    if (tableId && $(tableId).size() > 0 && $(tableId).data("bootstrap.table")) {
+                    if (tableId && $("#" + tableId).size() > 0 && $("#" + tableId).data("bootstrap.table")) {
                         var Table = require("table");
                         var Table = require("table");
-                        ids = Table.api.selectedids($(tableId)).join(",");
+                        ids = Table.api.selectedids($("#" + tableId)).join(",");
                     }
                     }
                     url = url.replace(/\{ids\}/g, ids);
                     url = url.replace(/\{ids\}/g, ids);
                 }
                 }

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

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