From 77c6744454e7f35e73f7a79ccec431410c097566 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 02 九月 2025 17:56:37 +0800
Subject: [PATCH] bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js |  115 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 67 insertions(+), 48 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 038ec1a..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,10 +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();
-    if("" == registrationClosingTime){
-        registrationClosingTime = null;
-    }
+    let contentOne = editor1.getContent();
     if(null == name || '' == name){
         Feng.error("请填写有效的比赛名称");
         return
@@ -95,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("请填写有效的比赛地点");
@@ -126,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") : null),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -166,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");
     }
 
     //提交信息
@@ -212,9 +220,10 @@
     let coverImg = $('#coverImg').val();
     let homeBackdropImg = $('#homeBackdropImg').val();
     let content = editor.getContent();
-    if("" == registrationClosingTime){
-        registrationClosingTime = null;
-    }
+    let type = $('#type').val();
+    let drawIntegral = $('#drawIntegral').val();
+    let loseIntegral = $('#loseIntegral').val();
+    let contentOne = editor1.getContent();
     if(null == name || '' == name){
         Feng.error("请填写有效的比赛名称");
         return
@@ -261,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("请填写有效的比赛地点");
@@ -292,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") : null),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -333,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");
     }
 
     //提交信息
@@ -408,10 +425,10 @@
                 $('.cash').hide();
             }
             if(v == 2){
-                $('.classHour').hide();
+                $('.paiCoin').hide();
             }
             if(v == 3){
-                $('.paiCoin').hide();
+                $('.classHour').hide();
             }
         }
 
@@ -577,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