From 437a74c950f626398edd13025c654286280e7bbc Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 01 九月 2025 18:01:30 +0800
Subject: [PATCH] bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js |  129 ++++++++++++++++++++++++++----------------
 1 files changed, 80 insertions(+), 49 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js
index ae905e3..e3522fe 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js
@@ -45,7 +45,11 @@
     let intro = $('#intro').val();
     let coverImg = $('#coverImg').val();
     let homeBackdropImg = $('#homeBackdropImg').val();
+    let type = $('#type').val();
+    let drawIntegral = $('#drawIntegral').val();
+    let loseIntegral = $('#loseIntegral').val();
     let content = editor.getContent();
+    let contentOne = editor1.getContent();
     if(null == name || '' == name){
         Feng.error("请填写有效的比赛名称");
         return
@@ -92,16 +96,13 @@
         return
     }
     if(null == basePeople || '' == basePeople){
-        Feng.error("请填写有效的基础报名人数");
-        return
+        basePeople = 0;
     }
     if(null == participationIntegral || '' == participationIntegral){
-        Feng.error("请填写有效的参赛可获积分");
-        return
+        participationIntegral = 0;
     }
     if(null == winIntegral || '' == winIntegral){
-        Feng.error("请填写有效的胜场可获积分");
-        return
+        winIntegral = 0;
     }
     if(null == address || '' == address){
         Feng.error("请填写有效的比赛地点");
@@ -123,27 +124,30 @@
         Feng.error("请填写有效的赛事简介");
         return
     }
-    if(null == coverImg || '' == coverImg){
-        Feng.error("请上传有效的比赛封面图");
-        return
-    }
-    if(null == homeBackdropImg || '' == homeBackdropImg){
-        Feng.error("请上传有效的首页默认背景图");
-        return
-    }
-    if(WorldCupInfo.goodsPicArray1 == 0){
-        Feng.error("请上传有效的比赛图片");
-        return
-    }
+    // if(null == coverImg || '' == coverImg){
+    //     Feng.error("请上传有效的比赛封面图");
+    //     return
+    // }
+    // if(null == homeBackdropImg || '' == homeBackdropImg){
+    //     Feng.error("请上传有效的首页默认背景图");
+    //     return
+    // }
+    // if(WorldCupInfo.goodsPicArray1 == 0){
+    //     Feng.error("请上传有效的比赛图片");
+    //     return
+    // }
     if(null == content || '' == content){
         Feng.error("请填写有效的比赛详情");
+        return
+    }
+    if(null == contentOne || '' == contentOne){
+        Feng.error("请填写有效的参赛协议");
         return
     }
     let data = {
         'name': name,
         'startTime': new Date(startTime + " 00:00:00"),
         'endTime': new Date(endTime + " 23:59:59"),
-        'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -163,7 +167,14 @@
         'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1),
         'intro': intro,
         'content': content,
-        'stores': JSON.stringify(WorldCupInfo.stores)
+        'stores': JSON.stringify(WorldCupInfo.stores),
+        'type': type,
+        'drawIntegral': drawIntegral,
+        'loseIntegral': loseIntegral,
+        'contentOne': contentOne
+    }
+    if(null != registrationClosingTime && '' != registrationClosingTime){
+        data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59");
     }
 
     //提交信息
@@ -171,7 +182,7 @@
         if (res.code==200){
             Feng.success("添加成功!");
             WorldCupInfo.close();
-            window.parent.WorldCup.refresh();
+            window.parent.WorldCup.search();
         }else{
             Feng.error(res.msg);
         }
@@ -209,6 +220,10 @@
     let coverImg = $('#coverImg').val();
     let homeBackdropImg = $('#homeBackdropImg').val();
     let content = editor.getContent();
+    let type = $('#type').val();
+    let drawIntegral = $('#drawIntegral').val();
+    let loseIntegral = $('#loseIntegral').val();
+    let contentOne = editor1.getContent();
     if(null == name || '' == name){
         Feng.error("请填写有效的比赛名称");
         return
@@ -255,16 +270,13 @@
         return
     }
     if(null == basePeople || '' == basePeople){
-        Feng.error("请填写有效的基础报名人数");
-        return
+        basePeople = 0;
     }
     if(null == participationIntegral || '' == participationIntegral){
-        Feng.error("请填写有效的参赛可获积分");
-        return
+        participationIntegral = 0;
     }
     if(null == winIntegral || '' == winIntegral){
-        Feng.error("请填写有效的胜场可获积分");
-        return
+        winIntegral = 0;
     }
     if(null == address || '' == address){
         Feng.error("请填写有效的比赛地点");
@@ -286,28 +298,32 @@
         Feng.error("请填写有效的赛事简介");
         return
     }
-    if(null == coverImg || '' == coverImg){
-        Feng.error("请上传有效的比赛封面图");
-        return
-    }
-    if(null == homeBackdropImg || '' == homeBackdropImg){
-        Feng.error("请上传有效的首页默认背景图");
-        return
-    }
-    if(WorldCupInfo.goodsPicArray1 == 0){
-        Feng.error("请上传有效的比赛图片");
-        return
-    }
+    // if(null == coverImg || '' == coverImg){
+    //     Feng.error("请上传有效的比赛封面图1");
+    //     return
+    // }
+    // if(null == homeBackdropImg || '' == homeBackdropImg){
+    //     Feng.error("请上传有效的首页默认背景图");
+    //     return
+    // }
+    // if(WorldCupInfo.goodsPicArray1 == 0){
+    //     Feng.error("请上传有效的比赛图片");
+    //     return
+    // }
     if(null == content || '' == content){
         Feng.error("请填写有效的比赛详情");
         return
     }
+    if(null == contentOne || '' == contentOne){
+        Feng.error("请填写有效的参赛协议");
+        return
+    }
+
     let data = {
         'id': $('#id').val(),
         'name': name,
         'startTime': new Date(startTime + " 00:00:00"),
         'endTime': new Date(endTime + " 23:59:59"),
-        'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -327,7 +343,14 @@
         'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1),
         'intro': intro,
         'content': content,
-        'stores': JSON.stringify(WorldCupInfo.stores)
+        'stores': JSON.stringify(WorldCupInfo.stores),
+        'type': type,
+        'drawIntegral': drawIntegral,
+        'loseIntegral': loseIntegral,
+        'contentOne': contentOne
+    }
+    if(null != registrationClosingTime && '' != registrationClosingTime){
+        data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59");
     }
 
     //提交信息
@@ -335,7 +358,7 @@
         if (res.code==200){
             Feng.success("编辑成功!");
             WorldCupInfo.close();
-            window.parent.WorldCup.refresh();
+            window.parent.WorldCup.search();
         }else{
             Feng.error(res.msg);
         }
@@ -402,16 +425,16 @@
                 $('.cash').hide();
             }
             if(v == 2){
-                $('.classHour').hide();
+                $('.paiCoin').hide();
             }
             if(v == 3){
-                $('.paiCoin').hide();
+                $('.classHour').hide();
             }
         }
 
     });
 
-    if(null != $('#id').val()){
+    if(null != $('#id').val() && '' != $('#id').val()){
         WorldCupInfo.stores = JSON.parse($('#storeInfo').val());
         WorldCupInfo.initStore();
         let lng = $('#longitude').val();
@@ -541,12 +564,18 @@
 
 WorldCupInfo.initStore = function (){
     let html = '';
+    let page = $('#page').val();
     for (let i = 0; i < WorldCupInfo.stores.length; i++) {
         let item = WorldCupInfo.stores[i];
-        html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td><td><button style="height: 30px;\n' +
-            '    line-height: 30px;\n' +
-            '    font-size: 14px;\n' +
-            '    width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>'
+        html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td>';
+        if("info" != page){
+            html += '<td><button style="height: 30px;\n' +
+                    '    line-height: 30px;\n' +
+                    '    font-size: 14px;\n' +
+                    '    width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>'
+        }else{
+            html += '</tr>';
+        }
     }
     $('#stores tbody').html(html);
 }
@@ -565,7 +594,9 @@
 
 
 var editor = null;
+var editor1 = null;
 $(function () {
     //初始化编辑器
     editor = UE.getEditor('content');
+    editor1 = UE.getEditor('contentOne');
 });
\ No newline at end of file

--
Gitblit v1.7.1