From db3e6f6d5a8f29a5dc576aba2eab76a8133ce03c Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期五, 08 三月 2024 21:46:10 +0800
Subject: [PATCH] 11.27,9

---
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html |   74 ++++++++++++++++++++++++------------
 1 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html
index 2f346f1..ab0eff3 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html
@@ -12,26 +12,26 @@
             <input hidden id="s6" value="${c6.isOpen}">
             <input hidden id="s7" value="${c7.isOpen}">
             <input hidden id="s8" value="${c8.isOpen}">
-            <input hidden id="s9" value="${c9.isOpen}">
+            <input hidden id="s9" value="${worldCupStores}">
             <div class="row">
                 <div class="col-lg-6" style="">
                     <div class="form-group" style="margin-left: 96px">
                         <label class="col-sm-4 control-label" >
-                              报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭
+                            报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭
                         </label>
                     </div>
-                <div class="form-group">
-                    <label class="col-sm-3 control-label">排序:</label>
-                    <div class="col-sm-9">
-                        <input class="form-control"  style="width: 200px;"  type="text" id="px1" value="${c1.sort}">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">排序:</label>
+                        <div class="col-sm-9">
+                            <input class="form-control"  style="width: 200px;"  type="text" id="px1" value="${c1.sort}">
+                        </div>
                     </div>
-                </div>
-                @if(c1==null){
-                <#avatar id="c1" name="背景图" />
-                @}
-                @if(c1!=null){
-                <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/>
-                @}
+                    @if(c1==null){
+                    <#avatar id="c1" name="背景图" />
+                    @}
+                    @if(c1!=null){
+                    <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/>
+                    @}
                 </div>
                 <div class="col-lg-6" style="">
                     <div class="form-group" style="margin-left: 96px">
@@ -183,27 +183,32 @@
             </div>
 
             <div style="font-size: x-large;">社区世界杯板块</div>
+            @for(obj in worldCupStores){
             <div class="row">
+                <input hidden name="cupId" value="${obj.id}">
+                <input hidden name="backgroundImage" value="${obj.backgroundImage}">
+                <input hidden name="isOpen" value="${obj.isOpen}">
                 <div class="col-lg-6" style="">
                     <div class="form-group" style="margin-left: 96px">
                         <label class="col-sm-4 control-label" >
-                            社区世界杯:<input type="radio" name="r9" value="1">开启 <input type="radio" name="r9" value="0">关闭
+                            社区世界杯:<input type="radio" name="${obj.id}" value="1" ${obj.isOpen == 1 ? 'checked' : ''}>开启 <input type="radio" name="${obj.id}" value="0" ${obj.isOpen == 0 ? 'checked' : ''}>关闭
                         </label>
                     </div>
                     <div class="form-group">
                         <label class="col-sm-3 control-label">排序:</label>
                         <div class="col-sm-9">
-                            <input class="form-control"  style="width: 200px;"  type="text" id="px9" value="${c9.sort}">
+                            <input class="form-control"  style="width: 200px;"  type="text" name="px9" value="${obj.sort}">
                         </div>
                     </div>
-                    @if(c9==null){
-                    <#avatar id="c9" name="背景图" />
+                    @if(obj==null){
+                    <#avatar id="${obj.id}" name="背景图" />
                     @}
-                    @if(c9!=null){
-                    <#avatar id="c9" name="背景图" avatarImg="${c9.backgroundImage}"/>
+                    @if(obj!=null){
+                    <#avatar id="${obj.id}" name="背景图" avatarImg="${obj.backgroundImage}"/>
                     @}
                 </div>
             </div>
+            @}
 
             <div style="font-size: x-large;">首页其他板块设置</div>
             <#button name="添加" icon="fa-plus" clickFun="TCompetition.openAddTCompetition(id)"/>
@@ -279,13 +284,32 @@
             }
         }
 
-        var OBJradio=document.getElementsByName("r9")
-        for(i=0;i<OBJradio.length;i++){//循环查找这个radio
-            if($("#s9").val()==OBJradio[i].value){//判断是否与radio的值相同
-                OBJradio[i].checked=true//修改选中状态
-            }
-        }
+        // for (let i = 0; i < $('input[name="isOpen"]').length; i++) {
+        //     var OBJradio=document.getElementsByName("r9")
+        //     for(i=0;i<OBJradio.length;i++){//循环查找这个radio
+        //         if([i].isOpen==OBJradio[i].value){//判断是否与radio的值相同
+        //             OBJradio[i].checked=true//修改选中状态
+        //         }
+        //     }
+        // }
 
+        // var arrStr = $("#s9").val();
+        // arrStr = arrStr.replaceAll("WorldCupStore(","{")
+        // arrStr = arrStr.replaceAll(")","}")
+        // arrStr = arrStr.replaceAll("=",":")
+        // console.log(arrStr)
+        // var arr = []
+        // arr = JSON.parse(arrStr)
+        // console.log(arr)
+        // for (let i = 0; i < arr.length; i++) {
+        // console.log(arr[i])
+        //     var OBJradio=document.getElementsByName("r9")
+        //     for(i=0;i<OBJradio.length;i++){//循环查找这个radio
+        //         if(arr[i].isOpen==OBJradio[i].value){//判断是否与radio的值相同
+        //             OBJradio[i].checked=true//修改选中状态
+        //         }
+        //     }
+        // }
 
     }
 </script>

--
Gitblit v1.7.1