yuantianjiao 6 years ago
parent
commit
dd444f1da7

+ 1
- 1
dist/index.html View File

4
         overflow-x: hidden;
4
         overflow-x: hidden;
5
         overflow-y: scroll;
5
         overflow-y: scroll;
6
         -webkit-overflow-scrolling: touch;
6
         -webkit-overflow-scrolling: touch;
7
-      }</style><link href=./static/css/app.792d471da91686e908f22bf88ee4e73e.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.7ab5aba10a7b07270b0d.js></script></body></html>
7
+      }</style><link href=./static/css/app.2f364324b9013a10c001697e90df6f42.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.ca1b3c4c7db05277ea50.js></script></body></html>

dist/static/css/app.2f364324b9013a10c001697e90df6f42.css
File diff suppressed because it is too large
View File


dist/static/css/app.2f364324b9013a10c001697e90df6f42.css.map
File diff suppressed because it is too large
View File


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


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


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


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


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

1
-{"version":3,"sources":["webpack:///webpack/bootstrap 1193e5c3c447ebde35e3"],"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","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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 1193e5c3c447ebde35e3"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap d3941c597053ff6b796a"],"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,I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"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 d3941c597053ff6b796a"],"sourceRoot":""}

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

212
       this.getRecord({ id: this.lotteryId }).then((res) => {
212
       this.getRecord({ id: this.lotteryId }).then((res) => {
213
         this.data.list = this.list
213
         this.data.list = this.list
214
       })
214
       })
215
-      let logo = this.logo.substring(2, this.logo.length)
215
+      // let logo = this.logo.substring(2, this.logo.length)
216
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
216
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
217
         title: '悦见山,金秋送好礼',
217
         title: '悦见山,金秋送好礼',
218
         desc: '扫码分享,免费抽取赢森林音乐节门票,机会有限,速来参加',
218
         desc: '扫码分享,免费抽取赢森林音乐节门票,机会有限,速来参加',
219
         link: `${window.location.origin}${window.location.pathname}#/from/${this.data.userInfo.user.Id}`,
219
         link: `${window.location.origin}${window.location.pathname}#/from/${this.data.userInfo.user.Id}`,
220
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
220
+        thu_image: `https://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/citymini%2Findexlogo.jpg?x-oss-process=style/wxicon`
221
       })
221
       })
222
     },
222
     },
223
     init () {
223
     init () {

+ 7
- 5
src/store/app.js View File

7
 http.getUserInfo = (data) => {
7
 http.getUserInfo = (data) => {
8
   let queryData = {}
8
   let queryData = {}
9
   if (data.code) {
9
   if (data.code) {
10
-    queryData = data
11
-  } else {
12
     queryData = {
10
     queryData = {
13
-      luckdrawid: data.luckdrawid,
14
-      from: data.from
11
+      code: data.code
15
     }
12
     }
13
+  } else {
14
+    queryData = {}
16
   }
15
   }
17
   return new Promise((resolve, reject) => {
16
   return new Promise((resolve, reject) => {
18
     Ajax(api.lottery.userInfo.url, {
17
     Ajax(api.lottery.userInfo.url, {
19
       method: api.lottery.userInfo.method,
18
       method: api.lottery.userInfo.method,
20
-      queryData: queryData
19
+      queryData: queryData,
20
+      urlData: {
21
+        id: data.luckdrawid
22
+      }
21
     }).then(res => {
23
     }).then(res => {
22
       resolve(res)
24
       resolve(res)
23
     }).catch((err) => {
25
     }).catch((err) => {

+ 22
- 6
src/util/ajax.js View File

3
 import { Toast } from 'vant'
3
 import { Toast } from 'vant'
4
 import { setToLogin } from './util'
4
 import { setToLogin } from './util'
5
 
5
 
6
+const token = function (headers) {
7
+  let JWT = ''
8
+  if (headers) {
9
+    localStorage.setItem('JWT', headers.authorization)
10
+    JWT = headers.authorization
11
+  }
12
+  const token = JWT ? JWT : localStorage.getItem('JWT')
13
+
14
+  return !token ? '' : token
15
+}
16
+
6
 const Axios = axios.create({
17
 const Axios = axios.create({
7
   timeout: 60000,
18
   timeout: 60000,
8
   responseType: 'json',
19
   responseType: 'json',
10
   queryData: {},
21
   queryData: {},
11
   urlData: {},
22
   urlData: {},
12
   headers: {
23
   headers: {
13
-    'Content-Type': 'multipart/form-data'
24
+    'Content-Type': 'multipart/form-data',
25
+    'authorization': token()
14
   }
26
   }
15
 })
27
 })
16
 
28
 
17
 Axios.interceptors.request.use((config) => {
29
 Axios.interceptors.request.use((config) => {
30
+  config.headers.authorization = token()
18
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
31
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
32
+  config.urlData = { ...config.urlData, org: 'MQ' }
19
   let queryData = qs.stringify(config.queryData)
33
   let queryData = qs.stringify(config.queryData)
20
   // 判断是通过斜杠传参还是通过query传参
34
   // 判断是通过斜杠传参还是通过query传参
21
   if (config.url.indexOf(':') > -1) {
35
   if (config.url.indexOf(':') > -1) {
25
         return url.replace(re, config.urlData[k])
39
         return url.replace(re, config.urlData[k])
26
       }, config.url)
40
       }, config.url)
27
     }
41
     }
28
-  } else {
29
-    if (queryData) {
30
-      config.url += '?' + queryData
31
-    }
42
+  }
43
+  if (queryData) {
44
+    config.url += '?' + queryData
32
   }
45
   }
33
   let fm = new FormData()
46
   let fm = new FormData()
34
   for (let k in config.data) {
47
   for (let k in config.data) {
46
 
59
 
47
 const ajax = (...args) => {
60
 const ajax = (...args) => {
48
   return new Promise((resolve, reject) => {
61
   return new Promise((resolve, reject) => {
49
-    Axios(...args).then(({ data }) => {
62
+    Axios(...args).then(({ data, headers }) => {
63
+      if (headers.authorization) {
64
+        token(headers)
65
+      }
50
       const { message, result, code } = data
66
       const { message, result, code } = data
51
       if (code === 200) {
67
       if (code === 200) {
52
         resolve(result)
68
         resolve(result)

+ 8
- 6
src/util/api.js View File

1
-const baseUrl = '/api-v2'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
2
 // const baseUrl = '/check-api'
3
 // const baseUrl = '/check-api'
3
-const wechat = ''
4
+const wechat = '/wechat/:org'
5
+// const guest = '/guest/:org'
4
 
6
 
5
 const $api = {
7
 const $api = {
6
   common: {
8
   common: {
12
   lottery: {
14
   lottery: {
13
     userInfo: { // 获取用户信息
15
     userInfo: { // 获取用户信息
14
       method: 'get',
16
       method: 'get',
15
-      url: `${baseUrl}${wechat}/user`
17
+      url: `${baseUrl}${wechat}/luckdraw/user/:id`
16
     },
18
     },
17
     getPrize: { // 获取抽奖信息
19
     getPrize: { // 获取抽奖信息
18
       method: 'get',
20
       method: 'get',
24
     },
26
     },
25
     getRecord: { // 中奖记录
27
     getRecord: { // 中奖记录
26
       method: 'get',
28
       method: 'get',
27
-      url: `${baseUrl}${wechat}/record`
29
+      url: `${baseUrl}${wechat}/luckdraw/record`
28
     },
30
     },
29
     userRecordList: { // 用户中奖记录列表
31
     userRecordList: { // 用户中奖记录列表
30
       method: 'get',
32
       method: 'get',
31
-      url: `${baseUrl}${wechat}/user/record`
33
+      url: `${baseUrl}${wechat}/user/luckdraw/record`
32
     },
34
     },
33
     userRecordDetail: { // 用户中奖记录详情
35
     userRecordDetail: { // 用户中奖记录详情
34
       method: 'get',
36
       method: 'get',
35
-      url: `${baseUrl}${wechat}/user/record/:id`
37
+      url: `${baseUrl}${wechat}/user/luckdraw/record/:id`
36
     },
38
     },
37
     setUser: { // 分享发送userId
39
     setUser: { // 分享发送userId
38
       method: 'post',
40
       method: 'post',