Prechádzať zdrojové kódy

Merge branch 'pre' of http://git.dgtis.com/sunlupeng/pointsMall

sunlupeng 1 rok pred
rodič
commit
5078dbb8d8

+ 88 - 38
public/drawCarousel.html

@@ -7,6 +7,9 @@
   <title>转盘抽奖</title>
   <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
   <style>
+    .el-overlay {
+      background-color:rgba(0, 0, 0, 0.8);
+    }
 ::-webkit-scrollbar {
   width: 6px;
   height: 6px;
@@ -42,7 +45,8 @@
     }
 
     #app {
-      background: url('https://xiaoyou.dgtis.com/images/image/2023/08/16/obnd1td7k6c65ehxciz6.png') no-repeat;
+      /* background: url('https://xiaoyou.dgtis.com/images/image/2023/09/12/5opx47olb1unf4po3vxt.png') no-repeat; */
+      background: url('https://xiaoyou.dgtis.com/images/image/2023/09/19/y5epqefrpodtfzyw0qd9.png') no-repeat;
       background-size: 100% 100%;
       width: 640px;
       height: 680px;
@@ -67,14 +71,23 @@
       align-items: center;
       font-size: 14px;
       font-weight: 600;
-      left: 10%;
-      top: 15%;
+      left: 8%;
+      top: 22%;
     }
     .recordBtn {
-        cursor: pointer;
-        position: absolute;
-        right: 10%;
-        top: 12%;
+      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 {
@@ -87,7 +100,7 @@
       height: 500px;
       margin: 0 auto;
       position: relative;
-      top: 23%;
+      top: 22%;
     }
 
     .prize-list {
@@ -123,18 +136,18 @@
 
     .btn {
       width: 80px;
-      height: 80px;
-      background: url('https://xiaoyou.dgtis.com/images/image/2023/08/15/wwn4p7lua9t5h0rx8tlz.png') no-repeat center / 100% 100%;
+      height: 110px;
+      background: url('https://xiaoyou.dgtis.com/images/image/2023/09/12/xvtwunkntyc65fngc9pb.png') no-repeat center / 100% 100%;
       position: absolute;
       left: 0;
       right: 0;
-      top: 0;
+      top: -5%;
       bottom: 0;
       margin: auto;
       cursor: pointer;
     }
 
-    .btn::before {
+    /* .btn::before {
       content: "";
       width: 41px;
       height: 39px;
@@ -144,9 +157,9 @@
       right: 0;
       top: -30px;
       margin: auto;
-      /* -webkit-transform: rotate(-5deg);
-      transform: rotate(-5deg); */
-    }
+      -webkit-transform: rotate(-5deg);
+      transform: rotate(-5deg);
+    } */
     .recordListBox{
       max-height: 200px;
       overflow: auto;
@@ -161,11 +174,6 @@
       align-items: center;
       margin: 10px 0;
     }
-    .recordItem .prise .recordItem .priseTime{
-      display: flex;
-      justify-content: center;
-      align-items: center;
-    }
   </style>
 </head>
 
@@ -175,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)">
@@ -189,31 +200,31 @@
     <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>
-  </div>
-
   <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
   <script src="https://unpkg.com/element-plus"></script>
   <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.1.0/jquery.js"></script>
@@ -321,9 +332,9 @@
             console.log("接收值:", e.data)
             state.token = e.data.token;
             state.actId = e.data.actId;
-            // ElementPlus.ElLoading.service();
+            ElementPlus.ElLoading.service();
             getTurntableInfo();
-            // ElementPlus.ElLoading.service().close();
+            ElementPlus.ElLoading.service().close();
           })
         })
         
@@ -378,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;
@@ -493,11 +523,31 @@
             transform: rotate(${totalRunAngle.value - state.baseRunAngle}deg);
           `
           if(state.prizeList[state.prizeId].prizeType!='40'){
-            ElementPlus.ElMessage({
-              showClose: true,
-              message: "恭喜抽中了" + state.prizeList[state.prizeId].prizeName + "," + "请到个人中心查看。",
-              type: 'success',
+            ElementPlus.ElMessageBox.alert("恭喜,您中了" + state.prizeList[state.prizeId].prizeName + "," + "可在“个人中心”我的礼品券中查看,在礼品兑换中兑换相应物品。", {
+              showClose:false,
+              center:true,
+              confirmButtonText: '确定',
+            })
+            // ElementPlus.ElMessage({
+            //   offset:window.screen.height / 2,
+            //   duration:3000,
+            //   showClose: true,
+            //   message: "恭喜,您中了" + state.prizeList[state.prizeId].prizeName + "," + "可在“个人中心”我的礼品券中查看,在礼品兑换中兑换响应物品。",
+            //   type: 'success',
+            // })
+          }else{
+            ElementPlus.ElMessageBox.alert("很遗憾,您未中奖。", {
+              showClose:false,
+              center:true,
+              confirmButtonText: '确认',
             })
+            // ElementPlus.ElMessage({
+            //   offset:window.screen.height / 4,
+            //   duration:10000,
+            //   showClose: true,
+            //   message: "很遗憾,您未中奖。",
+            //   type: 'error',
+            // })
           }
         }
 

+ 11 - 2
src/views/HomeView/FestiveEvents.vue

@@ -76,6 +76,16 @@ export default {
         },
         handleClickReceive(val){
             console.log(val);
+            //节日游戏
+            if(val.type=='1'){
+                this.$router.push({
+                    path: '/home/festiveEvents/game',
+                    query: {
+                        url: val.activityUrl,
+                        actId:val.actId
+                    }
+                });
+            }
             //答题
             if(val.type=='2'){
                 this.$router.push({
@@ -85,12 +95,11 @@ export default {
                     }
                 });
             }
-            //外部页面
+            //抽奖
             if(val.type=='3'){
                 this.$router.push({
                     path: '/home/festiveEvents/drawCarouselGame',
                     query: {
-                        url: val.activityUrl,
                         actId:val.actId
                     }
                 });

+ 40 - 28
src/views/HomeView/Game.vue

@@ -1,38 +1,37 @@
 <template>
-    <div class="right-wrap" style="display: flex;justify-content: center;align-items: center;">
-        <iframe id="iframe"  frameborder="0" style="width:900px;height:500px;margin-top: 20px;margin-bottom: 20px;" :src="src"></iframe>
+    <div class="timeline-container">
+        <div class="timeline-content">
+            <div class="timeline-entry-list">
+                <div class="gameBox">
+                    <iframe id="iframe"  frameborder="0" :src="src" style="width: 100%;height: 100%;"></iframe>
+                </div>
+            </div>
+            <SiderInfo></SiderInfo>
+        </div>
     </div>
 </template>
 <script>
+import SiderInfo from '@/components/SiderInfo.vue'
 import { getToken } from '@/utils/auth'
-export default {
-    data() {
-        return {
-            src: this.$route.query.activityUrl, //需要加载的子页面url
+export default{
+  components: {
+    SiderInfo
+  },
+  data() {
+    return {
+            src: this.$route.query.url ? this.$route.query.url : '', //需要加载的子页面url
+            // src: 'http://192.168.100.94:8080',
             actId:this.$route.query.actId
         };
-    },
-    created() {
-       
-    },
-    async mounted(){
+  },
+  created(){},
+  async mounted(){
 	    var that = this
-	    this.iframe = document.getElementById('iframe')
+	    this.iframe = document.getElementById('iframe');
 	    this.iframe.onload = function(){
 	        // iframe加载完成后要进行的操作
 	        that.postMsg()
-	    }  
-		// if (iframe.attachEvent){ // 兼容IE写法
-        //     iframe.attachEvent("onload", function(){
-        //         // iframe加载完成后要进行的操作
-        //         that.postMsg()
-        //     })
-        // } else {
-        //     iframe.onload = function(){
-        //         // iframe加载完成后要进行的操作
-        //         that.postMsg()
-        //     }
-        // }
+	    };
 	},
 	methods: {
         async postMsg() {
@@ -46,11 +45,24 @@ export default {
           	this.iframe.contentWindow.postMessage(param,'*')
         },
     }
-};
+}
 </script>
 <style scoped>
-.right-wrap {
+.timeline-container{
+    margin: 0 auto;
+}
+.timeline-entry-list{
+    margin-right: 17.5rem;
+    border-radius: 2px;
+    
+    position: relative;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.timeline-entry-list .gameBox{
+    width: 720px;
+    height: 720px;
     background-color: #fff;
 }
-</style>
-
+</style>

+ 10 - 1
src/views/HomeView/MyCenter.vue

@@ -18,7 +18,16 @@
                         <el-table size="small" :data="firstList" border style="margin-top: 30px;width: 960px">
                             <el-table-column align="center" type="index" width="50" label="序号"></el-table-column>
                             <el-table-column align="center" prop="integralTypeName" label="积分类型"></el-table-column>
-                            <el-table-column align="center" prop="integral" label="积分"></el-table-column>
+                            <el-table-column align="center" prop="integral" label="积分">
+                                <template slot-scope="scope">
+                                    <span style="color: #67C23A;font-weight: 600;font-size: 14px;" v-if="scope.row.pm == 0">
+                                        + {{ scope.row.integral }}
+                                    </span>
+                                    <span style="color: #F56C6C;font-weight: 600;font-size: 14px;" v-else>
+                                        - {{ scope.row.integral }}
+                                    </span>
+                                </template>
+                            </el-table-column>
                             <el-table-column align="center" prop="createTime" label="获取时间"></el-table-column>
                         </el-table>
                         <div class="myPage">

+ 1 - 1
src/views/HomeView/SignIn.vue

@@ -15,7 +15,7 @@
                 </div>
               </div>
               <!-- <div class="figure-card">
-                <div class="figure" style="color: #1e80ff;">{{ continuousSignCount }}</div>
+                <div class="figure" style="color: #1e80ff;">{{ continuousSignCount?continuousSignCount:0 }}</div>
                 <div class="attention">
                   <span class="text">本月连续签到天数</span>
                 </div>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
src/views/NoticeCenter.vue