DESKTOP-O04BTUJ\muzen 3 lat temu
rodzic
commit
187f880a6c
2 zmienionych plików z 27 dodań i 24 usunięć
  1. 23 19
      public/index.html
  2. 4 5
      src/pages/lottery/index.vue

+ 23 - 19
public/index.html

@@ -1,25 +1,29 @@
 <!DOCTYPE html>
 <html lang="zh-CN">
 
-    <head>
-        <meta charset="utf-8">
-        <meta http-equiv="X-UA-Compatible" content="IE=edge">
-        <title>
-            <%= htmlWebpackPlugin.options.title %>
-        </title>
-        <script>
-            var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
-        </script>
-        <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
-    </head>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>
+        <%= htmlWebpackPlugin.options.title %>
+    </title>
+    <script>
+        var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
+        document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
+    <script>
+        var vConsole = new window.VConsole();
+    </script>
+    <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
+</head>
 
-    <body>
-        <noscript>
-            <strong>Please enable JavaScript to continue.</strong>
-        </noscript>
-        <div id="app"></div>
-        <!-- built files will be auto injected -->
-    </body>
+<body>
+    <noscript>
+        <strong>Please enable JavaScript to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+</body>
 
 </html>

+ 4 - 5
src/pages/lottery/index.vue

@@ -21,9 +21,7 @@
     <!-- 活动规则 -->
     <view class="rules">
       <view class="title">活动规则</view>
-      <view v-for="item in ruleList" :key="item.sort">
-        {{ item.description }}
-      </view>
+      <view v-for="(item, index) in rule" :key="index">{{ item }}</view>
     </view>
 
     <!-- 弹窗 -->
@@ -73,7 +71,7 @@ export default {
       // 今日剩余抽奖机会
       hasLotteryCount: 0,
       // 活动规则
-      ruleList: [],
+      rule: '',
       // 表单
       form: {},
       // 防止连点
@@ -84,6 +82,7 @@ export default {
     this.userId = e.userId
     this.statusBarHeight = uni.getWindowInfo().statusBarHeight + 'px'
     this.getList()
+    this.getUserInfo()
   },
   methods: {
     close() {
@@ -122,7 +121,7 @@ export default {
             })
           })
           // 活动规则
-          this.ruleList = j.ruleList
+          this.rule = j.rule.split('\n')
         }
       })
     },