index.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. /**
  2. * 首页方法封装处理
  3. * Copyright (c) 2019 LeiSP
  4. */
  5. layer.config({
  6. extend: 'moon/style.css',
  7. skin: 'layer-ext-moon'
  8. });
  9. var isMobile = false;
  10. var sidebarHeight = isMobile ? '100%' : '96%';
  11. $(function() {
  12. // MetsiMenu
  13. $('#side-menu').metisMenu();
  14. // 固定菜单栏
  15. $('.sidebar-collapse').slimScroll({
  16. height: sidebarHeight,
  17. railOpacity: 0.9,
  18. alwaysVisible: false
  19. });
  20. // 菜单切换
  21. $('.navbar-minimalize').click(function() {
  22. if (isMobile) {
  23. $("body").toggleClass("canvas-menu");
  24. } else {
  25. $("body").toggleClass("mini-navbar");
  26. }
  27. SmoothlyMenu();
  28. });
  29. $('#side-menu>li').click(function() {
  30. if ($('body').hasClass('canvas-menu mini-navbar')) {
  31. NavToggle();
  32. }
  33. });
  34. $('#side-menu>li li a:not(:has(span))').click(function() {
  35. if ($(window).width() < 769) {
  36. NavToggle();
  37. }
  38. });
  39. $('.nav-close').click(NavToggle);
  40. //ios浏览器兼容性处理
  41. if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
  42. $('#content-main').css('overflow-y', 'auto');
  43. }
  44. });
  45. $(window).bind("load resize", function() {
  46. isMobile = $.common.isMobile() || $(window).width() < 769;
  47. if (isMobile) {
  48. $('body').addClass('canvas-menu');
  49. $("body").removeClass("mini-navbar");
  50. $("nav .logo").addClass("hide");
  51. $(".slimScrollDiv").css({ "overflow": "hidden" });
  52. $('.navbar-static-side').fadeOut();
  53. } else {
  54. if($('body').hasClass('canvas-menu')) {
  55. $('body').addClass('fixed-sidebar');
  56. $('body').removeClass('canvas-menu');
  57. $("body").removeClass("mini-navbar");
  58. $("nav .logo").removeClass("hide");
  59. $(".slimScrollDiv").css({ "overflow": "visible" });
  60. $('.navbar-static-side').fadeIn();
  61. }
  62. }
  63. });
  64. function syncMenuTab(dataId) {
  65. if(isLinkage) {
  66. var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
  67. if (!$dataObj.hasClass("noactive")) {
  68. $('.nav ul').removeClass("in");
  69. $dataObj.parents("ul").addClass("in")
  70. $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
  71. $dataObj.parents("ul").css('height', 'auto').height();
  72. $dataObj.click();
  73. }
  74. }
  75. }
  76. function NavToggle() {
  77. $('.navbar-minimalize').trigger('click');
  78. }
  79. function fixedSidebar() {
  80. $('#side-menu').hide();
  81. $("nav .logo").addClass("hide");
  82. setTimeout(function() {
  83. $('#side-menu').fadeIn(500);
  84. },
  85. 100);
  86. }
  87. function SmoothlyMenu() {
  88. if (isMobile && !$('body').hasClass('canvas-menu')) {
  89. $('.navbar-static-side').fadeIn();
  90. fixedSidebar();
  91. } else if (!isMobile &&!$('body').hasClass('mini-navbar')) {
  92. fixedSidebar();
  93. $("nav .logo").removeClass("hide");
  94. } else if (isMobile && $('body').hasClass('fixed-sidebar')) {
  95. $('.navbar-static-side').fadeOut();
  96. fixedSidebar();
  97. } else if (!isMobile && $('body').hasClass('fixed-sidebar')) {
  98. fixedSidebar();
  99. } else {
  100. $('#side-menu').removeAttr('style');
  101. }
  102. }
  103. /**
  104. * iframe处理
  105. */
  106. $(function() {
  107. //计算元素集合的总宽度
  108. function calSumWidth(elements) {
  109. var width = 0;
  110. $(elements).each(function() {
  111. width += $(this).outerWidth(true);
  112. });
  113. return width;
  114. }
  115. // 激活指定选项卡
  116. function setActiveTab(element) {
  117. if (!$(element).hasClass('active')) {
  118. var currentId = $(element).data('id');
  119. syncMenuTab(currentId);
  120. // 显示tab对应的内容区
  121. $('.RuoYi_iframe').each(function() {
  122. if ($(this).data('id') == currentId) {
  123. $(this).show().siblings('.RuoYi_iframe').hide();
  124. }
  125. });
  126. $(element).addClass('active').siblings('.menuTab').removeClass('active');
  127. scrollToTab(element);
  128. }
  129. }
  130. //滚动到指定选项卡
  131. function scrollToTab(element) {
  132. var marginLeftVal = calSumWidth($(element).prevAll()),
  133. marginRightVal = calSumWidth($(element).nextAll());
  134. // 可视区域非tab宽度
  135. var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
  136. //可视区域tab宽度
  137. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  138. //实际滚动宽度
  139. var scrollVal = 0;
  140. if ($(".page-tabs-content").outerWidth() < visibleWidth) {
  141. scrollVal = 0;
  142. } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
  143. if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
  144. scrollVal = marginLeftVal;
  145. var tabElement = element;
  146. while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) {
  147. scrollVal -= $(tabElement).prev().outerWidth();
  148. tabElement = $(tabElement).prev();
  149. }
  150. }
  151. } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
  152. scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
  153. }
  154. $('.page-tabs-content').animate({
  155. marginLeft: 0 - scrollVal + 'px'
  156. },
  157. "fast");
  158. }
  159. //查看左侧隐藏的选项卡
  160. function scrollTabLeft() {
  161. var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
  162. // 可视区域非tab宽度
  163. var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
  164. //可视区域tab宽度
  165. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  166. //实际滚动宽度
  167. var scrollVal = 0;
  168. if (($(".page-tabs-content").width()) < visibleWidth) {
  169. return false;
  170. } else {
  171. var tabElement = $(".menuTab:first");
  172. var offsetVal = 0;
  173. while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素
  174. offsetVal += $(tabElement).outerWidth(true);
  175. tabElement = $(tabElement).next();
  176. }
  177. offsetVal = 0;
  178. if (calSumWidth($(tabElement).prevAll()) > visibleWidth) {
  179. while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
  180. offsetVal += $(tabElement).outerWidth(true);
  181. tabElement = $(tabElement).prev();
  182. }
  183. scrollVal = calSumWidth($(tabElement).prevAll());
  184. }
  185. }
  186. $('.page-tabs-content').animate({
  187. marginLeft: 0 - scrollVal + 'px'
  188. },
  189. "fast");
  190. }
  191. //查看右侧隐藏的选项卡
  192. function scrollTabRight() {
  193. var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
  194. // 可视区域非tab宽度
  195. var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
  196. //可视区域tab宽度
  197. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  198. //实际滚动宽度
  199. var scrollVal = 0;
  200. if ($(".page-tabs-content").width() < visibleWidth) {
  201. return false;
  202. } else {
  203. var tabElement = $(".menuTab:first");
  204. var offsetVal = 0;
  205. while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素
  206. offsetVal += $(tabElement).outerWidth(true);
  207. tabElement = $(tabElement).next();
  208. }
  209. offsetVal = 0;
  210. while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
  211. offsetVal += $(tabElement).outerWidth(true);
  212. tabElement = $(tabElement).next();
  213. }
  214. scrollVal = calSumWidth($(tabElement).prevAll());
  215. if (scrollVal > 0) {
  216. $('.page-tabs-content').animate({
  217. marginLeft: 0 - scrollVal + 'px'
  218. },
  219. "fast");
  220. }
  221. }
  222. }
  223. //通过遍历给菜单项加上data-index属性
  224. $(".menuItem").each(function(index) {
  225. if (!$(this).attr('data-index')) {
  226. $(this).attr('data-index', index);
  227. }
  228. });
  229. function menuItem() {
  230. // 获取标识数据
  231. var dataUrl = $(this).attr('href'),
  232. dataIndex = $(this).data('index'),
  233. menuName = $.trim($(this).text()),
  234. flag = true;
  235. if (!$('a[href$="' + dataUrl + '"]').hasClass("noactive")) {
  236. $(".nav ul li, .nav li").removeClass("selected");
  237. $(this).parent("li").addClass("selected");
  238. }
  239. setIframeUrl(dataUrl);
  240. if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
  241. // 选项卡菜单已存在
  242. $('.menuTab').each(function() {
  243. if ($(this).data('id') == dataUrl) {
  244. if (!$(this).hasClass('active')) {
  245. $(this).addClass('active').siblings('.menuTab').removeClass('active');
  246. scrollToTab(this);
  247. // 显示tab对应的内容区
  248. $('.mainContent .RuoYi_iframe').each(function() {
  249. if ($(this).data('id') == dataUrl) {
  250. $(this).show().siblings('.RuoYi_iframe').hide();
  251. return false;
  252. }
  253. });
  254. }
  255. flag = false;
  256. return false;
  257. }
  258. });
  259. // 选项卡菜单不存在
  260. if (flag) {
  261. var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
  262. $('.menuTab').removeClass('active');
  263. // 添加选项卡对应的iframe
  264. var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
  265. $('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
  266. $.modal.loading("数据加载中,请稍后...");
  267. $('.mainContent iframe:visible').load(function () {
  268. $.modal.closeLoading();
  269. });
  270. // 添加选项卡
  271. $('.menuTabs .page-tabs-content').append(str);
  272. scrollToTab($('.menuTab.active'));
  273. }
  274. return false;
  275. }
  276. function menuBlank() {
  277. // 新窗口打开外网以http://开头,如http://LeiSP.vip
  278. var dataUrl = $(this).attr('href');
  279. window.open(dataUrl);
  280. return false;
  281. }
  282. $('.menuItem').on('click', menuItem);
  283. $('.menuBlank').on('click', menuBlank);
  284. // 关闭选项卡菜单
  285. function closeTab() {
  286. var closeTabId = $(this).parents('.menuTab').data('id');
  287. var currentWidth = $(this).parents('.menuTab').width();
  288. var panelUrl = $(this).parents('.menuTab').data('panel');
  289. // 当前元素处于活动状态
  290. if ($(this).parents('.menuTab').hasClass('active')) {
  291. // 当前元素后面有同辈元素,使后面的一个元素处于活动状态
  292. if ($(this).parents('.menuTab').next('.menuTab').size()) {
  293. var activeId = $(this).parents('.menuTab').next('.menuTab:eq(0)').data('id');
  294. $(this).parents('.menuTab').next('.menuTab:eq(0)').addClass('active');
  295. $('.mainContent .RuoYi_iframe').each(function() {
  296. if ($(this).data('id') == activeId) {
  297. $(this).show().siblings('.RuoYi_iframe').hide();
  298. return false;
  299. }
  300. });
  301. var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
  302. if (marginLeftVal < 0) {
  303. $('.page-tabs-content').animate({
  304. marginLeft: (marginLeftVal + currentWidth) + 'px'
  305. },
  306. "fast");
  307. }
  308. // 移除当前选项卡
  309. $(this).parents('.menuTab').remove();
  310. // 移除tab对应的内容区
  311. $('.mainContent .RuoYi_iframe').each(function() {
  312. if ($(this).data('id') == closeTabId) {
  313. $(this).remove();
  314. return false;
  315. }
  316. });
  317. }
  318. // 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态
  319. if ($(this).parents('.menuTab').prev('.menuTab').size()) {
  320. var activeId = $(this).parents('.menuTab').prev('.menuTab:last').data('id');
  321. $(this).parents('.menuTab').prev('.menuTab:last').addClass('active');
  322. $('.mainContent .RuoYi_iframe').each(function() {
  323. if ($(this).data('id') == activeId) {
  324. $(this).show().siblings('.RuoYi_iframe').hide();
  325. return false;
  326. }
  327. });
  328. // 移除当前选项卡
  329. $(this).parents('.menuTab').remove();
  330. // 移除tab对应的内容区
  331. $('.mainContent .RuoYi_iframe').each(function() {
  332. if ($(this).data('id') == closeTabId) {
  333. $(this).remove();
  334. return false;
  335. }
  336. });
  337. if($.common.isNotEmpty(panelUrl)){
  338. $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
  339. $('.mainContent .RuoYi_iframe').each(function() {
  340. if ($(this).data('id') == panelUrl) {
  341. $(this).show().siblings('.RuoYi_iframe').hide();
  342. return false;
  343. }
  344. });
  345. }
  346. }
  347. }
  348. // 当前元素不处于活动状态
  349. else {
  350. // 移除当前选项卡
  351. $(this).parents('.menuTab').remove();
  352. // 移除相应tab对应的内容区
  353. $('.mainContent .RuoYi_iframe').each(function() {
  354. if ($(this).data('id') == closeTabId) {
  355. $(this).remove();
  356. return false;
  357. }
  358. });
  359. }
  360. scrollToTab($('.menuTab.active'));
  361. syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
  362. return false;
  363. }
  364. $('.menuTabs').on('click', '.menuTab i', closeTab);
  365. //滚动到已激活的选项卡
  366. function showActiveTab() {
  367. scrollToTab($('.menuTab.active'));
  368. }
  369. $('.tabShowActive').on('click', showActiveTab);
  370. // 点击选项卡菜单
  371. function activeTab() {
  372. if (!$(this).hasClass('active')) {
  373. var currentId = $(this).data('id');
  374. syncMenuTab(currentId);
  375. // 显示tab对应的内容区
  376. $('.mainContent .RuoYi_iframe').each(function() {
  377. if ($(this).data('id') == currentId) {
  378. $(this).show().siblings('.RuoYi_iframe').hide();
  379. return false;
  380. }
  381. });
  382. $(this).addClass('active').siblings('.menuTab').removeClass('active');
  383. scrollToTab(this);
  384. }
  385. }
  386. // 点击选项卡菜单
  387. $('.menuTabs').on('click', '.menuTab', activeTab);
  388. // 刷新iframe
  389. function refreshTab() {
  390. var currentId = $('.page-tabs-content').find('.active').attr('data-id');
  391. var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
  392. var url = target.attr('src');
  393. target.attr('src', url).ready();
  394. }
  395. // 页签全屏
  396. function fullScreenTab() {
  397. var currentId = $('.page-tabs-content').find('.active').attr('data-id');
  398. var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
  399. target.fullScreen(true);
  400. }
  401. // 关闭当前选项卡
  402. function tabCloseCurrent() {
  403. $('.page-tabs-content').find('.active i').trigger("click");
  404. }
  405. //关闭其他选项卡
  406. function tabCloseOther() {
  407. $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() {
  408. $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
  409. $(this).remove();
  410. });
  411. $('.page-tabs-content').css("margin-left", "0");
  412. }
  413. // 关闭全部选项卡
  414. function tabCloseAll() {
  415. $('.page-tabs-content').children("[data-id]").not(":first").each(function() {
  416. $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
  417. $(this).remove();
  418. });
  419. $('.page-tabs-content').children("[data-id]:first").each(function() {
  420. $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').show();
  421. $(this).addClass("active");
  422. });
  423. $('.page-tabs-content').css("margin-left", "0");
  424. syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
  425. }
  426. // 可视化
  427. $('#goKsh').on('click', function () {
  428. location.href = "/qk/ksh"
  429. });
  430. // 辅助决策
  431. $('#goFzjc').on('click', function () {
  432. location.href = "/qk/fzjc"
  433. });
  434. // 全屏显示
  435. $('#fullScreen').on('click', function () {
  436. $(document).toggleFullScreen();
  437. });
  438. // 页签刷新按钮
  439. $('.tabReload').on('click', refreshTab);
  440. // 页签全屏按钮
  441. $('.tabFullScreen').on('click', fullScreenTab);
  442. // 双击选项卡全屏显示
  443. $('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
  444. // 左移按扭
  445. $('.tabLeft').on('click', scrollTabLeft);
  446. // 右移按扭
  447. $('.tabRight').on('click', scrollTabRight);
  448. // 关闭当前
  449. $('.tabCloseCurrent').on('click', tabCloseCurrent);
  450. // 关闭其他
  451. $('.tabCloseOther').on('click', tabCloseOther);
  452. // 关闭全部
  453. $('.tabCloseAll').on('click', tabCloseAll);
  454. // tab全屏显示
  455. $('.tabMaxCurrent').on('click', function () {
  456. $('.page-tabs-content').find('.active').trigger("dblclick");
  457. });
  458. // 关闭全屏
  459. $('#ax_close_max').click(function(){
  460. $('#content-main').toggleClass('max');
  461. $('#ax_close_max').hide();
  462. })
  463. // 双击选项卡全屏显示
  464. function activeTabMax() {
  465. $('#content-main').toggleClass('max');
  466. $('#ax_close_max').show();
  467. }
  468. // 设置锚点
  469. function setIframeUrl(href) {
  470. if($.common.equals("history", mode)) {
  471. storage.set('publicPath', href);
  472. } else {
  473. var nowUrl = window.location.href;
  474. var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
  475. window.location.href = newUrl + "#" + href;
  476. }
  477. }
  478. $(window).keydown(function(event) {
  479. if (event.keyCode == 27) {
  480. $('#content-main').removeClass('max');
  481. $('#ax_close_max').hide();
  482. }
  483. });
  484. window.onhashchange = function() {
  485. var hash = location.hash;
  486. var url = hash.substring(1, hash.length);
  487. $('a[href$="' + url + '"]').click();
  488. };
  489. // 右键菜单实现
  490. $.contextMenu({
  491. selector: ".menuTab",
  492. trigger: 'right',
  493. autoHide: true,
  494. items: {
  495. "close_current": {
  496. name: "关闭当前",
  497. icon: "fa-close",
  498. callback: function(key, opt) {
  499. opt.$trigger.find('i').trigger("click");
  500. }
  501. },
  502. "close_other": {
  503. name: "关闭其他",
  504. icon: "fa-window-close-o",
  505. callback: function(key, opt) {
  506. setActiveTab(this);
  507. tabCloseOther();
  508. }
  509. },
  510. "close_left": {
  511. name: "关闭左侧",
  512. icon: "fa-reply",
  513. callback: function(key, opt) {
  514. setActiveTab(this);
  515. this.prevAll('.menuTab').not(":last").each(function() {
  516. if ($(this).hasClass('active')) {
  517. setActiveTab(this);
  518. }
  519. $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
  520. $(this).remove();
  521. });
  522. $('.page-tabs-content').css("margin-left", "0");
  523. }
  524. },
  525. "close_right": {
  526. name: "关闭右侧",
  527. icon: "fa-share",
  528. callback: function(key, opt) {
  529. setActiveTab(this);
  530. this.nextAll('.menuTab').each(function() {
  531. $('.menuTab[data-id="' + $(this).data('id') + '"]').remove();
  532. $(this).remove();
  533. });
  534. }
  535. },
  536. "close_all": {
  537. name: "全部关闭",
  538. icon: "fa-window-close",
  539. callback: function(key, opt) {
  540. tabCloseAll();
  541. }
  542. },
  543. "step": "---------",
  544. "full": {
  545. name: "全屏显示",
  546. icon: "fa-arrows-alt",
  547. callback: function(key, opt) {
  548. setActiveTab(this);
  549. var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
  550. target.fullScreen(true);
  551. }
  552. },
  553. "refresh": {
  554. name: "刷新页面",
  555. icon: "fa-refresh",
  556. callback: function(key, opt) {
  557. setActiveTab(this);
  558. var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
  559. var url = target.attr('src');
  560. $.modal.loading("数据加载中,请稍后...");
  561. target.attr('src', url).load(function () {
  562. $.modal.closeLoading();
  563. });
  564. }
  565. },
  566. "open": {
  567. name: "新窗口打开",
  568. icon: "fa-link",
  569. callback: function(key, opt) {
  570. var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
  571. window.open(target.attr('src'));
  572. }
  573. },
  574. }
  575. })
  576. });