sunlupeng 1 éve
szülő
commit
6a820afd3d
1 módosított fájl, 47 hozzáadás és 19 törlés
  1. 47 19
      public/drawCarousel.html

+ 47 - 19
public/drawCarousel.html

@@ -75,10 +75,19 @@
       top: 22%;
     }
     .recordBtn {
-        cursor: pointer;
-        position: absolute;
-        right: 8%;
-        top: 20%;
+      cursor: pointer;
+      position: absolute;
+      width: 50px;
+      height: 50px;
+      background: #fff;
+      border-radius: 50%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 14px;
+      font-weight: 600;
+      right: 8%;
+      top: 22%;
     }
 
     .recordBtn>img {
@@ -165,11 +174,6 @@
       align-items: center;
       margin: 10px 0;
     }
-    .recordItem .prise .recordItem .priseTime{
-      display: flex;
-      justify-content: center;
-      align-items: center;
-    }
   </style>
 </head>
 
@@ -179,8 +183,11 @@
       抽奖<br>规则
     </div>
     <div class="recordBtn" @click="showRecordList">
-      <img src="https://xiaoyou.dgtis.com/images/image/2023/09/06/lt1vbg426idwq725ysdm.png" alt="抽奖记录">
+      获奖<br>名单
     </div>
+    <!-- <div class="recordBtn" @click="showRecordList">
+      <img src="https://xiaoyou.dgtis.com/images/image/2023/09/06/lt1vbg426idwq725ysdm.png" alt="抽奖记录">
+    </div> -->
     <div class="container">
       <div class="prize-list" ref="prizeWrap" :style="bgColor">
         <div class="prize-item" v-for="(item, index) in prizeList" :style="prizeStyle(index)">
@@ -193,26 +200,28 @@
     <el-dialog
       v-model="dialogVisible"
       title="抽奖规则"
-      width="50%"
+      width="80%"
       center
     >
       <div style="max-height: 200px;overflow: auto;" v-html="rule"></div>
     </el-dialog>
     <el-dialog
       v-model="dialogRecordList"
-      title="抽奖记录"
-      width="50%"
+      title="获奖名单"
+      width="80%"
       center
     >
     <div class="recordListBox">
       <div class="recordItem title">
-        <div class="prise">获奖时间</div>
-        <div class="priseTime">奖品</div>
+        <div style="width: 30%;text-align: center;">姓名</div>
+        <div style="width: 30%;text-align: center;">奖品</div>
+        <div style="width: 40%;text-align: center;">获奖时间</div>
       </div>
       <el-empty description="暂无数据" v-if="recordList.length==0" :image-size="20"></el-empty>
       <div class="recordItem" v-for="(item, index) in recordList">
-        <div class="prise">{{item.createTime}}</div>
-        <div class="priseTime">{{item.prizeName}}</div>
+        <div style="width: 30%;text-align: center;">{{item.userName}}</div>
+        <div style="width: 30%;text-align: center;">{{item.prizeName}}</div>
+        <div style="width: 40%;text-align: center;">{{item.createTime}}</div>
       </div>
     </div>
   </el-dialog>
@@ -380,13 +389,32 @@
         };
 
         //抽奖记录
+        // async function getRecordList() {
+        //   const postData = {
+        //       actId: state.actId,
+        //     };
+        //     let res = await httpAjax('get', '/mall-prize/prize/user/list', postData);
+        //     if (res.errno === 0) {
+        //       console.log('抽奖记录',res.data);
+        //       state.recordList = res.data;
+        //     } else {
+        //       state.isRunning = false;
+        //       ElementPlus.ElMessage({
+        //         showClose: true,
+        //         message: res.errmsg,
+        //         type: 'error',
+        //       });
+        //     }  
+          
+        // };
+
+        //获奖名单
         async function getRecordList() {
           const postData = {
               actId: state.actId,
             };
-            let res = await httpAjax('get', '/mall-prize/prize/user/list', postData);
+            let res = await httpAjax('get', '/mall-prize/prize/winners', postData);
             if (res.errno === 0) {
-              console.log('抽奖记录',res.data);
               state.recordList = res.data;
             } else {
               state.isRunning = false;