Browse Source

update:优化video页面显示

tujidelv 3 years ago
parent
commit
09e2846dfe

+ 1 - 0
src/main/java/top/lvzhiqiang/entity/VideoInfo.java

@@ -137,5 +137,6 @@ public class VideoInfo implements Serializable {
 
     private String videoInfoFlag;
     private String videoInfoPoolFlag;
+    private String videoLoveFootFlag;
     private String javdbUrl;
 }

+ 1 - 1
src/main/resources/mapper/VideoInfoLoveFootMapper.xml

@@ -14,7 +14,7 @@
         left join video_info_pool temp2 on vi.identification_code = temp2.identification_code and temp2.delete_flag = 1
         where vi.delete_flag = 1
         <if test="keyword != null and keyword != ''">
-            and (vi.name like concat('%',#{keyword},'%')  or vi.identification_code like concat('%',#{keyword},'%'))
+            and (vi.name like #{keyword} or vi.identification_code like #{keyword})
         </if>
         <if test="genres != null and genres != ''">
             and

+ 4 - 1
src/main/resources/mapper/VideoInfoPoolMapper.xml

@@ -6,9 +6,12 @@
 <mapper namespace="top.lvzhiqiang.mapper.VideoInfoPoolMapper">
 
     <select id="getVideoInfoPoolList" resultType="top.lvzhiqiang.entity.VideoInfo">
-        select vi.id,vi.name,vi.identification_code,vi.issue_date,vi.modify_time,vi.type,vi.img_url,IFNULL(vi.cast, vi.genres) AS main_who,IFNULL(vio.score, 0) AS score, IFNULL(vio.comment, '暂无评论') AS comment
+        select vi.id,vi.name,vi.identification_code,vi.issue_date,vi.modify_time,vi.type,vi.img_url,IFNULL(vi.cast, vi.genres) AS main_who,IFNULL(vio.score, 0) AS score, IFNULL(vio.comment, '暂无评论') AS comment,
+            IFNULL(temp1.identification_code, 'false') AS videoInfoFlag,IFNULL(temp2.identification_code, 'false') AS videoLoveFootFlag
         from video_info_pool vi
         left join video_info_other vio on vi.identification_code = vio.identification_code and vio.delete_flag = 1
+        left join video_info temp1 on vi.identification_code = temp1.identification_code and temp1.delete_flag = 1
+        left join crawler_lovefoot_info temp2 on vi.identification_code = temp2.identification_code and temp2.delete_flag = 1
         where vi.delete_flag = 1
         <if test="keyword != null and keyword != ''">
             and (vi.name like #{keyword} or vi.identification_code like #{keyword})

+ 32 - 6
src/main/resources/static/js/my-video.js

@@ -38,7 +38,7 @@ function initOther() {
 
         if ($(this).text() == '足舐') {
             $(".lovefoot").attr("style", "display: block;");
-        }else{
+        } else {
             $(".lovefoot").attr("style", "display: none;");
         }
 
@@ -84,7 +84,12 @@ function search(pageNo, startFlag, searchSelectFlag) {
     if (searchSelectFlag) {
         genres = "";
         cast = "";
-        orderField = "vi.issue_date";
+        if (bigType == '足舐') {
+            orderField = "vi.update_date";
+        } else {
+            orderField = "vi.issue_date";
+        }
+
         order = "desc";
     }
 
@@ -125,17 +130,25 @@ function search(pageNo, startFlag, searchSelectFlag) {
                     }
 
                     var scoreStr = '';
+                    var orginUrl= '';
                     if (bigType == '骑兵') {
                         scoreStr += videoInfo.resolutionRatio + '|';
                         scoreStr += (videoInfo.original === null ? '?' : (videoInfo.original == 1 ? '原档' : '非原档')) + '|';
                         scoreStr += (videoInfo.subtitle === null ? '?' : (videoInfo.subtitle == 1 ? '字幕' : '无字幕')) + '|';
                         scoreStr += (videoInfo.recoding === null ? '?' : (videoInfo.recoding == 1 ? '压缩' : '未压缩')) + '|';
                         scoreStr += videoInfo.score;
+                    } else if (bigType == '码池') {
+                        scoreStr += (videoInfo.videoInfoFlag === 'false' ? '' : '骑兵|');
+                        scoreStr += (videoInfo.videoLoveFootFlag === 'false' ? '' : '足舐|');
+                        scoreStr += (videoInfo.type === 1 ? '待审查' : (videoInfo.type === 2 ? '审查中' : (videoInfo.type === 3 ? '审查已通过' : '审查未通过'))) + '|';
+                        scoreStr += videoInfo.score;
                     } else if (bigType == '足舐') {
                         scoreStr += (videoInfo.videoInfoFlag === 'false' ? '' : '骑兵|');
                         scoreStr += (videoInfo.videoInfoPoolFlag === 'false' ? '' : '码池|');
                         scoreStr += (videoInfo.type === 1 ? '爬取失败' : (videoInfo.type === 2 ? '待审查' : (videoInfo.type === 3 ? '审查已通过' : '审查未通过'))) + '|';
                         scoreStr += videoInfo.score;
+
+                        orginUrl = videoInfo.orginUrl;
                     } else {
                         scoreStr = videoInfo.score;
                     }
@@ -145,8 +158,8 @@ function search(pageNo, startFlag, searchSelectFlag) {
                         "       <a class=\"myui-vodlist__thumb lazyload\" title=\"\" style=\"background-image: url(&quot;apics/" + videoInfo.imgUrl + "&quot;);\">" +
                         "           <span class=\"bigpreview playvideo play hidden-xs\" imgUrl='" + videoInfo.imgUrl + "'></span>" +
                         "           <span class=\"pic-tag pic-tag-top\">" +
-                        "               <span class=\"tag identificationCode\" style=\"background-color: #FB7299;\">" + videoInfo.identificationCode + "</span>" +
-                        "               <span class=\"tag\" style=\"background-color: #00C0FF;\">" + date + "</span>" +
+                        "               <span class=\"tag identificationCode\" title=\"https://www.javbus.com/" + videoInfo.identificationCode + "\" style=\"background-color: #FB7299;\">" + videoInfo.identificationCode + "</span>" +
+                        "               <span class=\"tag identificationDate\" title=\"" + orginUrl + "\" style=\"background-color: #00C0FF;\">" + date + "</span>" +
                         "           </span>" +
                         "           <span class=\"pic-text text-right\" title='" + (videoInfo.comment === '' ? '暂无评论' : videoInfo.comment) + "'>" + scoreStr + "</span>" +
                         "       </a>" +
@@ -230,7 +243,12 @@ function getQueryHeaderInfo(bigType, startFlag, searchSelectFlag) {
                 $("ul.leixingul").find("a:eq(1)").addClass("btn-warm");
                 $("ul.yanyuanul").find("a:eq(1)").addClass("btn-warm");
                 $("ul.paixuul").find("a.btn-warm").removeClass("btn-warm");
-                $("ul.paixuul").find("a:eq(1)").addClass("btn-warm");
+
+                if (bigType == '足舐') {
+                    $("ul.paixuul").find("a:eq(3)").addClass("btn-warm");
+                } else {
+                    $("ul.paixuul").find("a:eq(1)").addClass("btn-warm");
+                }
             }
 
             //请求成功时处理
@@ -339,7 +357,8 @@ function initContentEvent() {
         var bigTypeText = $("#bigType").text();
         if (bigTypeText == '足舐') {
             var orginUrl = $(this).attr("orginUrl");
-            window.open(orginUrl);
+            let orginUrlArr = orginUrl.split(",");
+            window.open(orginUrlArr[0]);
         } else {
             var type = $("#bigType").attr("prepath");
             var code = $(this).attr("identificationCode");
@@ -359,4 +378,11 @@ function initContentEvent() {
     $(".identificationCode").dblclick(function () {
         window.open("https://www.javbus.com/" + $(this).text(), "_blank");
     });
+    $(".identificationDate").dblclick(function () {
+        let title = $(this).attr("title");
+        let orginUrlArr = title.split(",");
+        if (orginUrlArr.length > 1) {
+            window.open(orginUrlArr[1]);
+        }
+    });
 }

+ 1 - 1
src/main/resources/static/video.html

@@ -207,7 +207,7 @@
                         <li><a class="btn text-muted">排序</a></li>
                         <li><a class="btn btn-warm searchbtn" orderField="vi.issue_date" order="desc">发布时间</a></li>
                         <li><a class="btn searchbtn" orderField="vi.modify_time" order="asc">更新时间</a></li>
-                        <li><a class="btn searchbtn lovefoot" orderField="vi.update_date" order="asc" style="display: none;">原始更新时间</a></li>
+                        <li><a class="btn searchbtn lovefoot" orderField="vi.update_date" order="desc" style="display: none;">原始更新时间</a></li>
                         <li><a class="btn searchbtn" orderField="vio.score" order="asc">评分</a></li>
                     </ul>
                 </div>