yuantianjiao 6 yıl önce
ebeveyn
işleme
0f639ca3b2

+ 1
- 2
.gitignore Dosyayı Görüntüle

@@ -1,6 +1,5 @@
1 1
 .DS_Store
2
-node_modules/
3
-/dist/
2
+/node_modules/
4 3
 npm-debug.log*
5 4
 yarn-debug.log*
6 5
 yarn-error.log*

+ 1
- 0
dist/index.html Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>lottery</title><link href=./static/css/app.05f8272d5b029f53c08c35512bba8973.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.5798a71a4392d7e6df24.js></script></body></html>

+ 2
- 0
dist/static/css/app.05f8272d5b029f53c08c35512bba8973.css
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 1
- 0
dist/static/css/app.05f8272d5b029f53c08c35512bba8973.css.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


BIN
dist/static/img/bg.83bb19e.png Dosyayı Görüntüle


BIN
dist/static/img/bottomMsg.ceb3401.png Dosyayı Görüntüle


BIN
dist/static/img/dialog.d0507e4.png Dosyayı Görüntüle


BIN
dist/static/img/huxian.30c9cb8.png Dosyayı Görüntüle


BIN
dist/static/img/indexlogo.66ddd32.jpg Dosyayı Görüntüle


BIN
dist/static/img/line5.03ea747.png Dosyayı Görüntüle


BIN
dist/static/img/qrCode.0afc4f3.jpg Dosyayı Görüntüle


BIN
dist/static/img/xiaoniao.ba6ad4c.png Dosyayı Görüntüle


BIN
dist/static/img/zhi.f14c816.png Dosyayı Görüntüle


BIN
dist/static/img/zhizhen.0705f0d.png Dosyayı Görüntüle


BIN
dist/static/img/zhuanpan.87afe19.png Dosyayı Görüntüle


+ 2
- 0
dist/static/js/app.5798a71a4392d7e6df24.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 1
- 0
dist/static/js/app.5798a71a4392d7e6df24.js.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 2
- 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js Dosyayı Görüntüle

@@ -0,0 +1,2 @@
1
+!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="./",t.oe=function(r){throw console.error(r),r}}([]);
2
+//# sourceMappingURL=manifest.3ad1d5771e9b13dbdad2.js.map

+ 1
- 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 2c935b476ed9449aa6f7"],"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,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b13dbdad2.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 2c935b476ed9449aa6f7"],"sourceRoot":""}

+ 26
- 0
dist/static/js/vendor.2a96777d0d5038fab28c.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 1
- 0
dist/static/js/vendor.2a96777d0d5038fab28c.js.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 2
- 1
package.json Dosyayı Görüntüle

@@ -66,7 +66,8 @@
66 66
     "webpack": "^3.6.0",
67 67
     "webpack-bundle-analyzer": "^2.9.0",
68 68
     "webpack-dev-server": "^2.9.1",
69
-    "webpack-merge": "^4.1.0"
69
+    "webpack-merge": "^4.1.0",
70
+    "weixin-js-sdk": "^1.3.3"
70 71
   },
71 72
   "engines": {
72 73
     "node": ">= 6.0.0",

BIN
src/assets/indexlogo.jpg Dosyayı Görüntüle


+ 9
- 0
src/page/index/index.vue Dosyayı Görüntüle

@@ -85,6 +85,8 @@
85 85
 </template>
86 86
 
87 87
 <script>
88
+import wxsdk from '@/util/share'
89
+import logo from '@/assets/indexlogo.jpg'
88 90
 import bg from '@/assets/bg.png'
89 91
 import turntable from '@/assets/zhuanpan.png'
90 92
 import pointer from '@/assets/zhizhen.png'
@@ -152,6 +154,7 @@ export default {
152 154
       line7,
153 155
       line8,
154 156
       line9,
157
+      logo,
155 158
       isRun: false,
156 159
       round: false,
157 160
       showDialog: false,
@@ -194,6 +197,12 @@ export default {
194 197
           this.data.list = this.list
195 198
         }
196 199
       })
200
+      wxsdk({ url: window.location.href.split('#')[0] }, {
201
+        title: '城的空间',
202
+        desc: '银城悦见山5A全龄城的空间服务,生活本该有趣处!',
203
+        link: 'http://cdkj.ycjcjy.com/c/',
204
+        thu_image: this.logo
205
+      })
197 206
     })
198 207
   },
199 208
   computed: {

+ 5
- 1
src/util/ajax.js Dosyayı Görüntüle

@@ -48,7 +48,11 @@ const ajax = (...args) => {
48 48
     Axios(...args).then(({ data }) => {
49 49
       const { Message, Status } = data
50 50
       if (Status) {
51
-        resolve(Message)
51
+        if (Message === 401) {
52
+          window.location.href = 'http://cdkj.ycjcjy.com/c/#/sendSms?isLottery=1'
53
+        } else {
54
+          resolve(Message)
55
+        }
52 56
       } else {
53 57
         console.log(data)
54 58
         Toast.fail(Message)

+ 6
- 0
src/util/api.js Dosyayı Görüntüle

@@ -2,6 +2,12 @@ const baseUrl = '/check-api'
2 2
 const wechat = ''
3 3
 
4 4
 const $api = {
5
+  common: {
6
+    shareWx: {
7
+      method: 'post',
8
+      url: `${baseUrl}/wx/share/initWxJsConfig`
9
+    }
10
+  },
5 11
   lottery: {
6 12
     userInfo: { // 获取用户信息
7 13
       method: 'get',

+ 46
- 0
src/util/share.js Dosyayı Görüntüle

@@ -0,0 +1,46 @@
1
+import wechatConfig from '@/config/index'
2
+import Ajax from './ajax'
3
+import api from './api'
4
+
5
+function wxsdk (params, config) {
6
+  const wx = require('weixin-js-sdk')
7
+  const shareData = {
8
+    title: config.title, // 分享标题
9
+    desc: config.desc, // 分享标题
10
+    link: config.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
11
+    imgUrl: config.thu_image // 分享图标
12
+  }
13
+  // 初始化
14
+  return new Promise(function (resolve, reject) {
15
+    Ajax(api.common.shareWx.url, {
16
+      method: api.common.shareWx.method,
17
+      data: params
18
+    }).then(res => {
19
+      wx.config({
20
+        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
21
+        appId: wechatConfig.appid, // 必填,公众号的唯一标识
22
+        timestamp: res.timestamp, // 必填,生成签名的时间戳
23
+        nonceStr: res.noncestr, // 必填,生成签名的随机串
24
+        signature: res.signature, // 必填,签名,见附录1
25
+        jsApiList: [
26
+          'onMenuShareTimeline',
27
+          'onMenuShareAppMessage',
28
+          'onMenuShareQQ',
29
+          'onMenuShareWeibo',
30
+          'onMenuShareQZone',
31
+          'openLocation'
32
+        ]
33
+      })
34
+      wx.ready(function () {
35
+        wx.onMenuShareTimeline(shareData)
36
+        wx.onMenuShareAppMessage(shareData)
37
+        console.log(shareData)
38
+        resolve()
39
+      })
40
+    }).catch((err) => {
41
+      reject(err)
42
+    })
43
+  })
44
+}
45
+
46
+export default wxsdk