sunlupeng преди 1 година
родител
ревизия
6114692b02
променени са 1 файла, в които са добавени 12 реда и са изтрити 6 реда
  1. 12 6
      public/drawCarousel.html

+ 12 - 6
public/drawCarousel.html

@@ -18,10 +18,6 @@
       background-size: 100% 100%;
       width: 720px;
       height: 480px;
-      display: flex;
-      justify-content: center;
-      align-items: flex-end;
-      padding-bottom: 20px;
     }
 
     [v-cloak] {
@@ -34,6 +30,7 @@
       height: 352px;
       margin: 0 auto;
       position: relative;
+      top: 23%;
     }
 
     .prize-list {
@@ -90,6 +87,8 @@
       right: 0;
       top: -30px;
       margin: auto;
+      /* -webkit-transform: rotate(-5deg);
+      transform: rotate(-5deg); */
     }
   </style>
 </head>
@@ -113,6 +112,7 @@
   <script>
     const {
       createApp,
+      onBeforeMount,
       onMounted,
       onUnmounted,
       ref,
@@ -202,14 +202,19 @@
             `
           }
         })
-
-        onMounted(() => {
+       
+        onBeforeMount(()=>{
+          debugger
           window.addEventListener('message', function (e) {
             console.log("接收值:", e.data)
             state.token = e.data.token;
             state.actId = e.data.actId;
             getTurntableInfo();
           })
+        })
+        
+        onMounted(() => {
+         
           prizeWrap.value.style = `${bgColor.value} transform: rotate(-${rotateAngle.value / 2}deg)`;
         })
 
@@ -219,6 +224,7 @@
 
         // 获取大转盘信息
         async function getTurntableInfo() {
+          debugger
           const postData = {
             actId: state.actId,
           };