Forráskód Böngészése

产品导入修改

moshaorui 5 napja
szülő
commit
7e13f92c97
1 módosított fájl, 4 hozzáadás és 1 törlés
  1. 4 1
      app/Libraries/CommonHelper.php

+ 4 - 1
app/Libraries/CommonHelper.php

@@ -494,7 +494,10 @@ Admin::script(
             if ($(this).hasClass('fullscreen-image') || $(this).hasClass('video-thumbnail')) {
                 return;
             }
-            const fileName = this.src.split('/').pop().split('?')[0];
+
+           // const fileName = this.src.split('/').pop().split('?')[0];
+            const getFileName = url => url.split('?')[0].split('/').pop();
+            const fileName = getFileName(this.src);
 
             $(this).wrap('<div class="download-wrapper"></div>')
                 .after(`<div class="download-hover">