Pārlūkot izejas kodu

update:影片详情样本照片集合正序排序v1

tujidelv 3 gadi atpakaļ
vecāks
revīzija
b932025f0c

+ 3 - 0
src/main/java/top/lvzhiqiang/service/impl/VideoInfoServiceImpl.java

@@ -15,6 +15,7 @@ import top.lvzhiqiang.service.VideoInfoService;
 
 import javax.annotation.Resource;
 import java.io.File;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 
@@ -125,6 +126,7 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
                 for (File file : files) {
                     videoInfo.getImgGFList().add(file.getName());
                 }
+                videoInfo.getImgGFList().sort(Comparator.naturalOrder());
             }
             // 获取样品图像-私有
             File imgSYFile = new File(qibingPath, imgPrefixSYPath);
@@ -133,6 +135,7 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
                 for (File file : files) {
                     videoInfo.getImgSYList().add(file.getName());
                 }
+                videoInfo.getImgSYList().sort(Comparator.naturalOrder());
             }
         } else if ("bubing".equals(type)) {
             videoInfo = null;

+ 7 - 5
src/main/resources/static/js/my-voddetail.js

@@ -62,7 +62,7 @@ function initWaterfall(imgTitle) {
         image: {
             verticalFit: true,
             titleSrc: function (item) {
-                return imgTitle + "" + item.src.substring(item.src.lastIndexOf("/") + 1);
+                return item.src.substring(item.src.lastIndexOf("/") + 1);
             }
         },
         gallery: {
@@ -154,12 +154,12 @@ function initDetail() {
                 if (data.genres == undefined || data.genres === '') {
                     $("#genres").html('--');
                 } else {
-                    $("#genres").html(data.genres.replaceAll(",", "&nbsp;|&nbsp;"));
+                    $("#genres").html(data.genres.replaceAll(",", "&nbsp;&nbsp;&nbsp;"));
                 }
                 if (data.cast == undefined || data.cast === '') {
                     $("#cast").html('--');
                 } else {
-                    $("#cast").html(data.cast.replaceAll(",", "&nbsp;|&nbsp;"));
+                    $("#cast").html(data.cast.replaceAll(",", "&nbsp;&nbsp;&nbsp;"));
                 }
 
                 $("#commentfirstspan").html(data.commentFirst);
@@ -194,6 +194,8 @@ function initDetail() {
                 initWaterfall(imgTitle);
 
                 console.log(data);
+                $("#cover").css("display", "none");
+                show();
             } else {
                 alert(data.message);
             }
@@ -203,8 +205,8 @@ function initDetail() {
             $("#cover").css("display", "block");
         },
         complete: function () {
-            $("#cover").css("display", "none");
-            show();
+            // $("#cover").css("display", "none");
+            // show();
         },
         error: function (data) {
             //请求出错处理