yuantianjiao 6 years ago
parent
commit
b34de6823f

+ 0
- 0
`${k} View File


BIN
dist/dist.zip View File


+ 7
- 1
dist/index.html View File

@@ -1 +1,7 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>城的空间抽奖</title><link href=./static/css/app.624ad3971afb56772dc4c62ef519ecf4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a96777d0d5038fab28c.js></script><script type=text/javascript src=./static/js/app.f099cd5c7cfadfdc3e3f.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" charset=utf-8><title>城的空间抽奖</title><style>body{
2
+        width: 100%;
3
+        height: 100%;
4
+        overflow-x: hidden;
5
+        overflow-y: scroll;
6
+        -webkit-overflow-scrolling: touch;
7
+      }</style><link href=./static/css/app.a1fad811f2a2b8bd61318a1cadd79a58.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a96777d0d5038fab28c.js></script><script type=text/javascript src=./static/js/app.3597ad5c875ebd240578.js></script></body></html>

+ 0
- 2
dist/static/css/app.624ad3971afb56772dc4c62ef519ecf4.css
File diff suppressed because it is too large
View File


+ 0
- 1
dist/static/css/app.624ad3971afb56772dc4c62ef519ecf4.css.map
File diff suppressed because it is too large
View File


+ 2
- 0
dist/static/css/app.a1fad811f2a2b8bd61318a1cadd79a58.css
File diff suppressed because it is too large
View File


+ 1
- 0
dist/static/css/app.a1fad811f2a2b8bd61318a1cadd79a58.css.map
File diff suppressed because it is too large
View File


BIN
dist/static/img/bg.1ce7159.png View File


BIN
dist/static/img/bg.ec3202b.jpg View File


BIN
dist/static/img/qrCode.0464973.jpg View File


BIN
dist/static/img/qrCode.0afc4f3.jpg View File


+ 2
- 0
dist/static/js/app.3597ad5c875ebd240578.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/static/js/app.3597ad5c875ebd240578.js.map
File diff suppressed because it is too large
View File


+ 0
- 2
dist/static/js/app.f099cd5c7cfadfdc3e3f.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/static/js/app.f099cd5c7cfadfdc3e3f.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["webpack:///webpack/bootstrap bfccabe1de92ab68f2fb"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap bfccabe1de92ab68f2fb"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 4b1ce5263a75ef8f0f13"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4b1ce5263a75ef8f0f13"],"sourceRoot":""}

+ 10
- 1
index.html View File

@@ -2,8 +2,17 @@
2 2
 <html>
3 3
   <head>
4 4
     <meta charset="utf-8">
5
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
5
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" charset="utf-8" />
6 6
     <title>城的空间抽奖</title>
7
+    <style>
8
+      body{
9
+        width: 100%;
10
+        height: 100%;
11
+        overflow-x: hidden;
12
+        overflow-y: scroll;
13
+        -webkit-overflow-scrolling: touch;
14
+      }
15
+    </style>
7 16
   </head>
8 17
   <body>
9 18
     <div id="app"></div>

+ 6
- 1
src/App.vue View File

@@ -5,8 +5,13 @@
5 5
 </template>
6 6
 
7 7
 <script>
8
+import overscroll from './util/scroll'
9
+
8 10
 export default {
9
-  name: 'App'
11
+  name: 'App',
12
+  mounted () {
13
+    overscroll(window.document.getElementById('#app'))
14
+  }
10 15
 }
11 16
 </script>
12 17
 

BIN
src/assets/bg.jpg View File


BIN
src/assets/bg.png View File


BIN
src/assets/qrCode.jpg View File


+ 58
- 46
src/page/index/index.vue View File

@@ -28,14 +28,14 @@
28 28
     </transition>
29 29
     <div class="turntable">
30 30
       <div :class='{ "round": round }' class="turntable-body">
31
-        <div v-for='(item, index) in data.prizeList' :key='index' :class='item.class'>
31
+        <div v-for='(item, index) in data.prizeList' :key='index' :class='item.class' >
32 32
           <img :src="item.img" alt="">
33
-          <span :class='item.font'>{{item.PrizeName}}</span>
33
+          <span :class='item.font' v-html="item.PrizeName">{{item.PrizeName}}</span>
34 34
         </div>
35 35
         <img :src="turntable" alt="" width="100%" height="100%">
36 36
       </div>
37 37
       <img class="pointer"  @click="run" :src="pointer" alt="">
38
-      <div class="titleText">山的艺墅季金秋送好礼</div>
38
+      <div class="titleText">山的艺墅季 金秋送好礼</div>
39 39
       <img class="down" :src="down" alt="">
40 40
       <img class="yf1" :src="yf1" alt="">
41 41
       <img class="yf2" :src="yf2" alt="">
@@ -60,9 +60,11 @@
60 60
         <div class="list">
61 61
           <div v-for='(item, index) in  data.list' :key='index'>
62 62
             <img :src="item.UserHeadImg" alt="">
63
+            <span>
64
+              <div>{{item.UserName}}</div>
65
+              <div>{{toolClass.dateFormatM(item.CreateDate)}}</div>
66
+            </span>
63 67
             <span>{{item.PrizeName}}</span>
64
-            <!-- <span>{{this.toolClass.dateFormatM(item.CreateDate)}}</span> -->
65
-            <span>{{item.UserName}}</span>
66 68
           </div>
67 69
         </div>
68 70
       </div>
@@ -73,15 +75,7 @@
73 75
           <img :src="jt" alt="">
74 76
         </div>
75 77
         <div class="content">
76
-          <pre style="white-space:pre-line; text-align: left;">{{data.prize.LuckdrawRule}}</pre>
77
-          <!-- <div class="mb">抽奖活动</div>
78
-          <div v-for="(item,index) in data.prizeList" :key='index'>
79
-            <span>{{item.PrizeName}}</span>
80
-            <span>{{item.Probability}}%几率</span>
81
-          </div>
82
-          <div class="mb mt">抽奖方式:通过分享链接,点击立即抽奖按钮,每个活动每人仅可参加一次</div>
83
-          <div class="mb">领取方式:线下出示奖品二维码即可扫码核销</div>
84
-          <div>领取地点:悦见山G99</div> -->
78
+          <pre style="white-space:pre-line; text-align: left;line-height: .18rem;">{{data.prize.LuckdrawRule}}</pre>
85 79
         </div>
86 80
       </div>
87 81
       <img class="bird" :src="bird" alt="">
@@ -95,9 +89,10 @@
95 89
 </template>
96 90
 
97 91
 <script>
92
+import { getToLogin } from '@/util/util'
98 93
 import wxsdk from '@/util/share'
99 94
 import logo from '@/assets/indexlogo.jpg'
100
-import bg from '@/assets/bg.png'
95
+import bg from '@/assets/bg.jpg'
101 96
 import turntable from '@/assets/zhuanpan.png'
102 97
 import pointer from '@/assets/zhizhen.png'
103 98
 import paper from '@/assets/zhi.png'
@@ -188,7 +183,7 @@ export default {
188 183
     this.getUserInfo({ code: this.code, luckdrawid: this.lotteryId }).then((res) => {
189 184
       if (typeof (res) === 'string') {
190 185
         if (res.indexOf('401-') > -1) {
191
-          // this.toolClass.getCode(res.substring(4, res.length))
186
+          this.toolClass.getCode(res.substring(4, res.length))
192 187
         }
193 188
       } else {
194 189
         this.data.userInfo = this.userInfo
@@ -209,36 +204,20 @@ export default {
209 204
   methods: {
210 205
     ...mapAppActions(['getUserInfo', 'getPrize', 'setPrize', 'getRecord', 'setUser']),
211 206
     getData () {
212
-      if (this.$route.params.id) {
213
-        this.setUser({ toId: this.lotteryId, fromId: this.$route.params.id })
214
-      }
215
-      if (this.data.userInfo.record) {
216
-        this.winning = this.data.userInfo.record.PrizeName
217
-        this.showDialog = true
218
-        if (this.data.userInfo.detail) {
219
-          if (this.data.userInfo.detail.Url) {
220
-            this.showBtn = 1
221
-            this.jump = this.data.userInfo.detail.Url
222
-          }
223
-        }
224
-      }
225 207
       this.getPrize({ id: this.lotteryId }).then((res) => {
226 208
         this.data.prize = this.prize
227 209
         this.data.prizeList = this.data.prize.Prizes
228 210
         this.init()
229 211
       })
230 212
       this.getRecord({ id: this.lotteryId }).then((res) => {
231
-        // if (this.list.length >= 10) {
232
-        //   this.data.list = this.list.slice(0, 10)
233
-        // } else {
234 213
         this.data.list = this.list
235
-        // }
236 214
       })
215
+      let logo = this.logo.substring(2, this.logo.length)
237 216
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
238
-        title: '城的空间抽奖',
239
-        desc: '抽奖小游戏',
240
-        link: `${window.location.origin}${window.location.pathname}/#/from/${this.data.userInfo.user.Id}`,
241
-        thu_image: location.origin + this.logo
217
+        title: '悦见山,金秋送好礼',
218
+        desc: '扫码分享,免费抽取赢森林音乐节门票,机会有限,速来参加',
219
+        link: `${window.location.origin}${window.location.pathname}#/from/${this.data.userInfo.user.Id}`,
220
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
242 221
       })
243 222
     },
244 223
     init () {
@@ -256,7 +235,7 @@ export default {
256 235
         this.data.prizeList[i].font = 'font' + i
257 236
         this.data.prizeList[i].img = lineList[i]
258 237
         console.log(deg * (i + 1))
259
-        rule += `.prize${i}{transform: rotate(${deg * (i + 1)}deg);transform-origin:0 0;} .font${i}{transform: rotate(${(deg / 2)}deg);transform-origin:0 0;}`
238
+        rule += `.prize${i}{transform: rotate(${deg * (i + 1)}deg);transform-origin:0 0;} .font${i}{transform: rotate(${(deg / 3)}deg);transform-origin:0 0;}`
260 239
       }
261 240
       let style = document.createElement('style')
262 241
       style.type = 'text/css'
@@ -284,6 +263,10 @@ export default {
284 263
             this.stylesheet = document.styleSheets[document.styleSheets.length - 1]
285 264
             this.round = true
286 265
             resolve(res)
266
+          }).catch((err) => {
267
+            console.log(err)
268
+            reject(err)
269
+            this.isRun = false
287 270
           })
288 271
         }
289 272
       })
@@ -296,14 +279,43 @@ export default {
296 279
       this.showDialog = false
297 280
     },
298 281
     run () {
299
-      this.start().then((res) => {
300
-        this.winning = res.prize.PrizeName
301
-        this.showBtn = res.detail.Url ? 1 : 0
302
-        this.jump = res.detail.Url
303
-        setTimeout(() => {
304
-          this.showDialog = true
305
-        }, 10000)
306
-      })
282
+      if (getToLogin()) {
283
+        this.$dialog.confirm({
284
+          title: '提示',
285
+          message: '您不是城的空间会员,前往注册免费获取抽奖机会',
286
+          confirmButtonText: '立即前往',
287
+          cancelButtonText: '放弃机会',
288
+          overlay: true,
289
+          lockScroll: true
290
+        }).then(() => {
291
+          const luckshare = this.$route.params.id ? `&luckshare=${this.$route.params.id}` : ''
292
+          window.location.href = `/c/#/sendSms?isLottery=1${luckshare}`
293
+        }).catch(() => {
294
+          return false
295
+        })
296
+      } else {
297
+        this.start().then((res) => {
298
+          window.setTimeout(() => {
299
+            this.getRecord({ id: this.lotteryId }).then((res) => {
300
+              this.data.list = this.list
301
+            })
302
+          }, 10000)
303
+
304
+          if (this.$route.params.id) {
305
+            this.setUser({ toId: this.lotteryId, fromId: this.$route.params.id })
306
+          }
307
+
308
+          this.winning = res.prize.PrizeName
309
+          this.showBtn = res.detail.Url ? 1 : 0
310
+          this.jump = res.detail.Url
311
+          setTimeout(() => {
312
+            this.showDialog = true
313
+            this.isRun = false
314
+          }, 10000)
315
+        }).catch(() => {
316
+          this.isRun = false
317
+        })
318
+      }
307 319
     },
308 320
     stop () {
309 321
       console.log('stop')

+ 18
- 3
src/page/index/page.scss View File

@@ -3,6 +3,14 @@ body * {
3 3
   font-family: myFont;
4 4
 }
5 5
 
6
+body{
7
+  width: 100%;
8
+  height: 100%;
9
+  overflow-x: hidden;
10
+  overflow-y: scroll;
11
+  -webkit-overflow-scrolling: touch;
12
+}
13
+
6 14
 .bg {
7 15
   position: relative;
8 16
   width: 100%;
@@ -91,7 +99,7 @@ body * {
91 99
     }
92 100
     .titleText{
93 101
       position: absolute;
94
-      top: -0.7rem;
102
+      top: -0.6rem;
95 103
       left: 50%;
96 104
       transform: translateX(-50%);
97 105
       z-index: 1;
@@ -122,14 +130,13 @@ body * {
122 130
           display: -webkit-box;
123 131
           -webkit-line-clamp: 2;
124 132
           -webkit-box-orient: vertical;
125
-          width: .7rem;
126 133
           margin: 0 auto;
127 134
           position: absolute;
128 135
           top: 0rem;
129 136
           left: 0rem;
130 137
           width: 100%;
131 138
           text-align: right;
132
-          padding: 0 .3rem 0 .4rem;
139
+          padding: 0 .3rem 0 .5rem;
133 140
           box-sizing: border-box;
134 141
         }
135 142
       }
@@ -243,6 +250,14 @@ body * {
243 250
             flex: 1;
244 251
             text-align: left;
245 252
             margin: 0.1rem 0.1rem;
253
+            display: flex;
254
+            flex-flow: column nowrap;
255
+            div{
256
+              text-align: left;
257
+            }
258
+            div:nth-last-of-type(1){
259
+              font-family: initial;
260
+            }
246 261
           }
247 262
           span:nth-of-type(2) {
248 263
             text-align: right;

+ 12
- 2
src/page/lotteryDetail/index.vue View File

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="mainPage">
3
-    <div>核销时间:{{this.toolClass.dateFormat(data.prize.VerificationStart)}} ~ {{this.toolClass.dateFormat(data.prize.VerificationEnd)}}</div>
3
+    <div>核销时间:<span v-if="data.prize">{{this.showDate(data.prize.VerificationStart)}} ~ {{this.showDate(data.prize.VerificationEnd)}}</span></div>
4 4
     <div class="name">核销地点:{{data.caseAddress}}</div>
5 5
     <div>
6 6
       <qrCode :msg='msg' v-if='data.record.Status === 0'></qrCode>
@@ -44,7 +44,17 @@ export default {
44 44
     })
45 45
   },
46 46
   methods: {
47
-    ...mapPrizeActions(['getLotteryDetail'])
47
+    ...mapPrizeActions(['getLotteryDetail']),
48
+    showDate (dt) {
49
+      const theDT = new Date(dt)
50
+      const fullYear = theDT.getFullYear(theDT)
51
+      const month = theDT.getMonth() + 1
52
+      const fullMonth = month > 9 ? month : `0${month}`
53
+      const day = theDT.getDate()
54
+      const fullDay = day > 9 ? day : `0${day}`
55
+
56
+      return `${fullYear}-${fullMonth}-${fullDay}`
57
+    }
48 58
   }
49 59
 }
50 60
 </script>

+ 13
- 3
src/page/lotteryList/index.vue View File

@@ -2,16 +2,22 @@
2 2
   <div class="mainPage">
3 3
     <div class="list title">
4 4
       <span>奖品</span>
5
-      <span>领取时间</span>
5
+      <span>获取时间</span>
6
+      <span>状态</span>
6 7
     </div>
7
-    <div class="list" v-for='(item,index) in data.list' :key='index' @click="toDetail(item)">
8
+    <div class="list" v-if="data.list" v-for='(item,index) in data.list' :key='index' @click="toDetail(item)">
8 9
       <span>{{item.PrizeName}}</span>
9 10
       <span>{{toolClass.dateFormat(item.CreateDate)}}</span>
11
+      <span>{{item.Status === 1 ? '已领取' : '未领取'}}</span>
12
+    </div>
13
+    <div v-if="!data.list" class="bottomMsg">
14
+      <img :src="bottomMsg" alt="">
10 15
     </div>
11 16
   </div>
12 17
 </template>
13 18
 
14 19
 <script>
20
+import bottomMsg from '@/assets/bottomMsg.png'
15 21
 import { mapState, createNamespacedHelpers } from 'vuex'
16 22
 const { mapActions: mapPrizeActions } = createNamespacedHelpers('prize')
17 23
 const { mapActions: mapAppActions } = createNamespacedHelpers('app')
@@ -21,7 +27,8 @@ export default {
21 27
       data: {
22 28
         list: [],
23 29
         userInfo: {}
24
-      }
30
+      },
31
+      bottomMsg
25 32
     }
26 33
   },
27 34
   computed: {
@@ -45,6 +52,9 @@ export default {
45 52
     ...mapPrizeActions(['getLotteryList']),
46 53
     ...mapAppActions(['getUserInfo']),
47 54
     toDetail (item) {
55
+      if (item.Status === 1) {
56
+        return
57
+      }
48 58
       if (item.Url) {
49 59
         window.location.href = item.Url
50 60
       } else {

+ 11
- 3
src/page/lotteryList/page.scss View File

@@ -7,11 +7,13 @@
7 7
   span{
8 8
     color: rgba(108,108,108,1);
9 9
     display: block;
10
-    width: 60%;
11 10
     text-align: center;
11
+    overflow:hidden;
12
+    text-overflow:ellipsis;
13
+    white-space:nowrap
12 14
   }
13
-  span:nth-of-type(1){
14
-    width: 40%;
15
+  span{
16
+    flex: 1;
15 17
   }
16 18
 }
17 19
 .title{
@@ -20,4 +22,10 @@
20 22
     color: #000;
21 23
     font-weight: bold;
22 24
   }
25
+}
26
+.bottomMsg{
27
+  img{
28
+    margin-top: 1.5rem;
29
+    width: 3rem;
30
+  }
23 31
 }

+ 4
- 1
src/store/app.js View File

@@ -1,5 +1,6 @@
1 1
 import Ajax from '../util/ajax'
2 2
 import api from '../util/api'
3
+
3 4
 const http = {}
4 5
 
5 6
 // 请求数据
@@ -131,9 +132,11 @@ export default {
131 132
     },
132 133
 
133 134
     setPrize (context, data) {
134
-      return new Promise((resolve) => {
135
+      return new Promise((resolve, reject) => {
135 136
         http.setPrize(data).then((res) => {
136 137
           resolve(res)
138
+        }).catch((err) => {
139
+          reject(err)
137 140
         })
138 141
       })
139 142
     },

+ 1
- 0
src/store/prize.js View File

@@ -11,6 +11,7 @@ http.getLotteryList = (data) => {
11 11
         userid: data.userid
12 12
       }
13 13
     }).then(res => {
14
+      console.log(res)
14 15
       resolve(res)
15 16
     }).catch((err) => {
16 17
       reject(err)

+ 7
- 2
src/util/ajax.js View File

@@ -1,6 +1,7 @@
1 1
 import axios from 'axios'
2 2
 import qs from 'qs'
3 3
 import { Toast } from 'vant'
4
+import { setToLogin } from './util'
4 5
 
5 6
 const Axios = axios.create({
6 7
   timeout: 60000,
@@ -49,7 +50,9 @@ const ajax = (...args) => {
49 50
       const { Message, Status } = data
50 51
       if (Status) {
51 52
         if (Message === 406) {
52
-          window.location.href = '/c/#/sendSms?isLottery=1'
53
+          // window.location.href = '/c/#/sendSms?isLottery=1'
54
+          resolve({})
55
+          setToLogin(true)
53 56
         } else {
54 57
           resolve(Message)
55 58
         }
@@ -60,10 +63,12 @@ const ajax = (...args) => {
60 63
         } else if (typeof (Message) === 'string' && Message.indexOf('logerror') > -1) {
61 64
           console.log(Message)
62 65
         } else {
66
+          console.log(Message)
63 67
           Toast.fail(Message)
68
+          reject(Message)
64 69
         }
65 70
       }
66
-    }).catch(reject)
71
+    })
67 72
   })
68 73
 }
69 74
 

+ 26
- 0
src/util/scroll.js View File

@@ -0,0 +1,26 @@
1
+
2
+export default function overscroll (el) {
3
+  el.addEventListener('touchstart', function () {
4
+    const top = el.scrollTop
5
+    const totalScroll = el.scrollHeight
6
+    const currentScroll = top + el.offsetHeight
7
+
8
+    if (top === 0) {
9
+      el.scrollTop = 1
10
+    } else if (currentScroll === totalScroll) {
11
+      el.scrollTop = top - 1
12
+    }
13
+  })
14
+
15
+  el.addEventListener('touchmove', function (evt) {
16
+    if (el.offsetHeight < el.scrollHeight) {
17
+      evt._isScroller = true
18
+    }
19
+  })
20
+
21
+  window.document.body.addEventListener('touchmove', function (evt) {
22
+    if (!evt._isScroller) {
23
+      evt.preventDefault()
24
+    }
25
+  })
26
+}

+ 9
- 0
src/util/util.js View File

@@ -59,4 +59,13 @@ const toolClass = {
59 59
   }
60 60
 }
61 61
 
62
+let toLogin = false
63
+export function setToLogin (l) {
64
+  toLogin = l
65
+}
66
+
67
+export function getToLogin () {
68
+  return toLogin
69
+}
70
+
62 71
 export default toolClass

+ 0
- 0
{ View File