Commit 13765a50 authored by 薛智杰's avatar 薛智杰

Merge branch 'feature/husky' into 'master'

代码整理

See merge request !34
parents b2c2a087 e799d829
{"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/mixins/test.js":{"size":322,"mtime":1589359813051,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/mixins/test.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/store/index.js":{"size":476,"mtime":1589359813052,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/store/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/common/eventHub.js":{"size":85,"mtime":1589359813051,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/common/eventHub.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/app.wpy":{"size":1364,"mtime":1589359841630,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/app.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/counter.wpy":{"size":1711,"mtime":1589359841630,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/counter.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/group.wpy":{"size":898,"mtime":1589359841631,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/group.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/groupitem.wpy":{"size":580,"mtime":1589359841631,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/groupitem.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/panel.wpy":{"size":652,"mtime":1589355621718,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/panel.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/wepy-list.wpy":{"size":1226,"mtime":1589359841631,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/wepy-list.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/list.wpy":{"size":862,"mtime":1589359919775,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/components/list.wpy","messages":[],"errorCount":0,"warningCount":0,"output":"<style lang=\"less\">\n .mylist:odd {\n color: red;\n }\n .mylist:even {\n color: green;\n }\n</style>\n<template>\n <div class=\"list\">\n This component is not used. because list is an aliasField in package.json \n </div>\n</template>\n<script>\n import wepy from '@wepy/core';\n\n wepy.component({\n data: {\n list: [\n {\n id: '0',\n title: 'loading'\n }\n ]\n },\n\n events: {\n 'index-broadcast': (...args) => {\n let $event = args[args.length - 1];\n console.log(`${this.$name} receive ${$event.name} from ${$event.source.name}`);\n }\n },\n\n methods: {\n tap () {\n // this.num = this.num + 1\n console.log(this.$name + ' tap');\n },\n add () {\n let len = this.list.length;\n this.list.push({id: len + 1, title: 'title_' + len});\n }\n }\n });\n</script>\n"}},"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/pages/index.wpy":{"size":8055,"mtime":1589359907050,"hashOfConfig":"r8rusv","results":{"filePath":"/Users/congmin.hao/project/quantgroup/frontend/mini-programe-wepy/src/pages/index.wpy","messages":[],"errorCount":0,"warningCount":0}}}
\ No newline at end of file
{"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/api.js":{"size":1456,"mtime":1591152013873,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/api.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/eventHub.js":{"size":85,"mtime":1589859265146,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/eventHub.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/china.js":{"size":98459,"mtime":1591152013874,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/china.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/loading.wpy":{"size":546,"mtime":1590668180981,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/loading.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/network.wpy":{"size":1393,"mtime":1590668180982,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/network.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/openAnimation.wpy":{"size":16975,"mtime":1590668180983,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/openAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/popup.wpy":{"size":4193,"mtime":1590668180984,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/popup.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/sharedPopup.wpy":{"size":7796,"mtime":1590748788488,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/sharedPopup.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/sign.wpy":{"size":11289,"mtime":1591009136706,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/sign.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/starAnimation.wpy":{"size":3928,"mtime":1590668180988,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/starAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/videolist.wpy":{"size":10575,"mtime":1591152013874,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/videolist.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/videoPause.wpy":{"size":898,"mtime":1589859265147,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/components/custom/videoPause.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/mixins/test.js":{"size":322,"mtime":1589859265230,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/mixins/test.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/help.wpy":{"size":2955,"mtime":1591152013874,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/help.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/morehelp.wpy":{"size":253,"mtime":1590668181078,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/morehelp.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/myraffles.wpy":{"size":3338,"mtime":1591152013874,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/myraffles.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/prize.wpy":{"size":7816,"mtime":1591152530875,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/prize.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/store/index.js":{"size":539,"mtime":1590668181080,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/store/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/app.wpy":{"size":1303,"mtime":1591152044593,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/app.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/raffleProbability.js":{"size":708,"mtime":1591152141364,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/raffleProbability.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/wxRequest.js":{"size":1780,"mtime":1590748788487,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/common/wxRequest.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/raffle.wpy":{"size":7289,"mtime":1591153023372,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/raffle.wpy","messages":[],"errorCount":0,"warningCount":0}},"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/index.wpy":{"size":24127,"mtime":1591153127282,"hashOfConfig":"2o995l","results":{"filePath":"/Users/xuezhijie/workspace/quant/mini-program-wepy/src/pages/index.wpy","messages":[],"errorCount":0,"warningCount":0}}}
\ No newline at end of file
dist/*
src/components/vant/*
\ No newline at end of file
src/components/vant/*
weapp/*
static/*
\ No newline at end of file
module.exports = {
root: true,
globals: { wx: true },
globals: {
wx: true,
getCurrentPages: true
},
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
......@@ -17,7 +20,6 @@ module.exports = {
settings: {
'html/html-extensions': ['.html', '.wpy']
},
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
......
......@@ -914,6 +914,12 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
"dev": true
},
"@wepy/babel-plugin-import-regenerator": {
"version": "0.0.2",
"resolved": "http://npmprivate.quantgroups.com/@wepy%2fbabel-plugin-import-regenerator/-/babel-plugin-import-regenerator-0.0.2.tgz",
......@@ -1747,6 +1753,12 @@
"readdirp": "~3.4.0"
}
},
"ci-info": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/ci-info/download/ci-info-2.0.0.tgz",
"integrity": "sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y=",
"dev": true
},
"circular-json": {
"version": "0.3.3",
"resolved": "http://npmprivate.quantgroups.com/circular-json/-/circular-json-0.3.3.tgz",
......@@ -2078,6 +2090,33 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"cosmiconfig": {
"version": "6.0.0",
"resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-6.0.0.tgz?cache=0&sync_timestamp=1572710682964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcosmiconfig%2Fdownload%2Fcosmiconfig-6.0.0.tgz",
"integrity": "sha1-2k/uhTxS9rHmk19BwaL8UL1KmYI=",
"dev": true,
"requires": {
"@types/parse-json": "^4.0.0",
"import-fresh": "^3.1.0",
"parse-json": "^5.0.0",
"path-type": "^4.0.0",
"yaml": "^1.7.2"
},
"dependencies": {
"parse-json": {
"version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-5.0.0.tgz",
"integrity": "sha1-c+URTJhtFD76NxLU6iTbmkJm9g8=",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1",
"lines-and-columns": "^1.1.6"
}
}
}
},
"create-error-class": {
"version": "3.0.2",
"resolved": "http://npmprivate.quantgroups.com/create-error-class/-/create-error-class-3.0.2.tgz",
......@@ -3246,6 +3285,15 @@
"locate-path": "^2.0.0"
}
},
"find-versions": {
"version": "3.2.0",
"resolved": "https://registry.npm.taobao.org/find-versions/download/find-versions-3.2.0.tgz",
"integrity": "sha1-ECl/mAMKeGgpaBaQVF72We0dJU4=",
"dev": true,
"requires": {
"semver-regex": "^2.0.0"
}
},
"flat-cache": {
"version": "1.3.4",
"resolved": "http://npmprivate.quantgroups.com/flat-cache/-/flat-cache-1.3.4.tgz",
......@@ -3800,6 +3848,76 @@
"sshpk": "^1.7.0"
}
},
"husky": {
"version": "4.2.5",
"resolved": "https://registry.npm.taobao.org/husky/download/husky-4.2.5.tgz?cache=0&sync_timestamp=1586469908461&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhusky%2Fdownload%2Fhusky-4.2.5.tgz",
"integrity": "sha1-K092Imc6cVefkB2Yhe1Eg5S1+jY=",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"ci-info": "^2.0.0",
"compare-versions": "^3.6.0",
"cosmiconfig": "^6.0.0",
"find-versions": "^3.2.0",
"opencollective-postinstall": "^2.0.2",
"pkg-dir": "^4.2.0",
"please-upgrade-node": "^3.2.0",
"slash": "^3.0.0",
"which-pm-runs": "^1.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz",
"integrity": "sha1-kK51xCTQCNJiTFvynq0xd+v881k=",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.0.0.tgz?cache=0&sync_timestamp=1585815752864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.0.0.tgz",
"integrity": "sha1-bpgIHtLRf6q2FetSrGbsH+YgnnI=",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor-convert%2Fdownload%2Fcolor-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.1.0.tgz",
"integrity": "sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "http://npmprivate.quantgroups.com/iconv-lite/-/iconv-lite-0.4.24.tgz",
......@@ -3828,6 +3946,24 @@
"dev": true,
"optional": true
},
"import-fresh": {
"version": "3.2.1",
"resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.2.1.tgz?cache=0&sync_timestamp=1573665120798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.2.1.tgz",
"integrity": "sha1-Yz/2GFBueTr1rJG/SLcmd+FcvmY=",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
},
"dependencies": {
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz",
"integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=",
"dev": true
}
}
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "http://npmprivate.quantgroups.com/imurmurhash/-/imurmurhash-0.1.4.tgz",
......@@ -4184,6 +4320,12 @@
}
}
},
"json-parse-better-errors": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=",
"dev": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "http://npmprivate.quantgroups.com/json-schema/-/json-schema-0.2.3.tgz",
......@@ -4329,6 +4471,12 @@
"type-check": "~0.3.2"
}
},
"lines-and-columns": {
"version": "1.1.6",
"resolved": "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz",
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true
},
"loader-utils": {
"version": "1.4.0",
"resolved": "http://npmprivate.quantgroups.com/loader-utils/-/loader-utils-1.4.0.tgz",
......@@ -4694,6 +4842,12 @@
"mimic-fn": "^1.0.0"
}
},
"opencollective-postinstall": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/opencollective-postinstall/download/opencollective-postinstall-2.0.3.tgz",
"integrity": "sha1-eg//l49tv6TQBiOPusmO1BmMMlk=",
"dev": true
},
"optionator": {
"version": "0.8.3",
"resolved": "http://npmprivate.quantgroups.com/optionator/-/optionator-0.8.3.tgz",
......@@ -4845,6 +4999,23 @@
}
}
},
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz",
"integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=",
"dev": true,
"requires": {
"callsites": "^3.0.0"
},
"dependencies": {
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz",
"integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=",
"dev": true
}
}
},
"parse-glob": {
"version": "3.0.4",
"resolved": "http://npmprivate.quantgroups.com/parse-glob/-/parse-glob-3.0.4.tgz",
......@@ -4920,6 +5091,12 @@
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"path-type": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/path-type/download/path-type-4.0.0.tgz",
"integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=",
"dev": true
},
"pend": {
"version": "1.2.0",
"resolved": "http://npmprivate.quantgroups.com/pend/-/pend-1.2.0.tgz",
......@@ -4959,6 +5136,66 @@
"pinkie": "^2.0.0"
}
},
"pkg-dir": {
"version": "4.2.0",
"resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz",
"integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=",
"dev": true,
"requires": {
"find-up": "^4.0.0"
},
"dependencies": {
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz",
"integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=",
"dev": true,
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz",
"integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=",
"dev": true,
"requires": {
"p-locate": "^4.1.0"
}
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1586101408834&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz",
"integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=",
"dev": true,
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz",
"integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=",
"dev": true,
"requires": {
"p-limit": "^2.2.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz",
"integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=",
"dev": true
},
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz",
"integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=",
"dev": true
}
}
},
"pkg-up": {
"version": "2.0.0",
"resolved": "http://npmprivate.quantgroups.com/pkg-up/-/pkg-up-2.0.0.tgz",
......@@ -4968,6 +5205,15 @@
"find-up": "^2.1.0"
}
},
"please-upgrade-node": {
"version": "3.2.0",
"resolved": "https://registry.npm.taobao.org/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz?cache=0&sync_timestamp=1565266069139&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fplease-upgrade-node%2Fdownload%2Fplease-upgrade-node-3.2.0.tgz",
"integrity": "sha1-rt3T+ZTJM+StmLmdmlVu+g4v6UI=",
"dev": true,
"requires": {
"semver-compare": "^1.0.0"
}
},
"pluralize": {
"version": "1.2.1",
"resolved": "http://npmprivate.quantgroups.com/pluralize/-/pluralize-1.2.1.tgz",
......@@ -5489,6 +5735,12 @@
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
"semver-compare": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/semver-compare/download/semver-compare-1.0.0.tgz",
"integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
"dev": true
},
"semver-diff": {
"version": "2.1.0",
"resolved": "http://npmprivate.quantgroups.com/semver-diff/-/semver-diff-2.1.0.tgz",
......@@ -5498,6 +5750,12 @@
"semver": "^5.0.3"
}
},
"semver-regex": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/semver-regex/download/semver-regex-2.0.0.tgz",
"integrity": "sha1-qTwsWERTmncCMzeRB7OMe0rJ0zg=",
"dev": true
},
"set-blocking": {
"version": "2.0.0",
"resolved": "http://npmprivate.quantgroups.com/set-blocking/-/set-blocking-2.0.0.tgz",
......@@ -6355,6 +6613,12 @@
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
"which-pm-runs": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/which-pm-runs/download/which-pm-runs-1.0.0.tgz",
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
"dev": true
},
"wide-align": {
"version": "1.1.3",
"resolved": "http://npmprivate.quantgroups.com/wide-align/-/wide-align-1.1.3.tgz",
......@@ -6560,6 +6824,12 @@
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"dev": true
},
"yaml": {
"version": "1.10.0",
"resolved": "https://registry.npm.taobao.org/yaml/download/yaml-1.10.0.tgz",
"integrity": "sha1-O1k63ZRIdgd9TWg/7gEIG9n/8x4=",
"dev": true
},
"yaml-js": {
"version": "0.0.8",
"resolved": "http://npmprivate.quantgroups.com/yaml-js/-/yaml-js-0.0.8.tgz",
......
......@@ -11,8 +11,6 @@ import wepy from '@wepy/core';
import vuex from '@wepy/x';
import promisify from '@wepy/use-promisify';
import { login } from './common/api';
wepy.use(promisify);
wepy.use(vuex);
......
......@@ -33,7 +33,7 @@ module.exports = {
return http.post('/api/user/join/list');
},
getOneRaffle(params) {
return http.post('/api/user/join/info',params);
return http.post('/api/user/join/info', params);
},
getUserPhone() {
return http.post('/api/user/get/phone');
......@@ -44,7 +44,7 @@ module.exports = {
updateUserPhone(params) {
return http.post('/api/user/update/phone', params);
},
getPrize(params){
getPrize(params) {
return http.post('/api/user/prize/receive', params, { 'content-type': 'application/json' });
}
};
function getCommonDivisor(FirstNum,SecondNum) {
if (SecondNum == 0) return FirstNum;
function getCommonDivisor(firstNum, secondNum) {
if (secondNum === 0) return firstNum;
var remainder = parseInt(FirstNum % SecondNum) ;
var remainder = parseInt(firstNum % secondNum);
return getCommonDivisor(SecondNum, remainder);
return getCommonDivisor(secondNum, remainder);
}
function getProbability (quantity,coinQuantity) {
//如果用户克币数是0
if(quantity == 0) {
return '0/'+coinQuantity;
function getProbability (quantity, coinQuantity) {
// 如果用户克币数是0
if (quantity === 0) {
return '0/' + coinQuantity;
}
var divisor = getCommonDivisor(quantity,coinQuantity);
var value = quantity/divisor;
var value2 = coinQuantity/divisor;
//如果分子比分母大说明中奖概率是100%,那么返回中奖概率
if(value>=value2) {
return coinQuantity+"/"+coinQuantity
var divisor = getCommonDivisor(quantity, coinQuantity);
var value = quantity / divisor;
var value2 = coinQuantity / divisor;
// 如果分子比分母大说明中奖概率是100%,那么返回中奖概率
if (value >= value2) {
return coinQuantity + '/' + coinQuantity;
} else {
return value+"/"+value2
return value + '/' + value2;
}
}
module.exports = {
getProbability:getProbability
getProbability
};
"use strict";
'use strict';
var areaList = {
province_list: {
......
......@@ -151,7 +151,7 @@
_invalidDown: 0,
_videoContexts: [],
loading: false,
isFirstUp: true,
isFirstUp: true
},
watch: {
videoList () {
......
......@@ -79,15 +79,10 @@
},
methods: {
tomorehelp(){
wx.navigateTo({url: '/pages/morehelp'})
tomorehelp() {
wx.navigateTo({url: '/pages/morehelp'});
}
},
onLoad () {
},
}
});
</script>
<config>
......
......@@ -269,7 +269,8 @@
</template>
<script>
let touchDotX = 0, touchDotY = 0;
let touchDotX = 0;
let touchDotY = 0;
import store from '../store';
import { mapState, mapActions } from '@wepy/x';
import wepy from '@wepy/core';
......@@ -323,13 +324,25 @@
methods: {
...mapActions([ 'setIsConnected', 'setUserInfo' ]),
moveSwiper(e) {
if (e.$wx.detail.source == 'touch') {
if (e.$wx.detail.source === 'touch') {
let current = e.$wx.detail.current;
this.currentIndex = current;
}
},
swipermoveDone(e) {
if (e.$wx.detail.source == 'touch') {
function debounce(func, wait) {
let timeout;
return function () {
if (timeout) clearTimeout(timeout);
let callNow = !timeout;
timeout = setTimeout(func, wait);
if (callNow) func();
};
}
if (e.$wx.detail.source === 'touch') {
let current = e.$wx.detail.current;
let totalPage = 3;
let nextlist = [
......@@ -340,17 +353,7 @@
{value: 15, text: '白色条纹马克杯,马克吐温同款15', imgsrc: '/static/images/peo3.jpg', price: '¥2399.01', people: 2200, sku: '100004549235'}
];
let that = this;
function debounce(func, wait) {
let timeout;
return function () {
if (timeout) clearTimeout(timeout);
let callNow = !timeout;
timeout = setTimeout(func, wait);
if (callNow) func();
};
}
/* if(current <= 2) {
debounce(setTimeout(function(){
that.topPage +=1;
......@@ -370,7 +373,7 @@
that.circular = true;
return;
}
that.list = [ ...that.list, ...nextlist];
that.list = [...that.list, ...nextlist];
}, 1000), 500);
}
}
......@@ -459,11 +462,11 @@
// }
},
deleteAnimation (current) {
if (current && current.itemid != undefined) {
if (current && current.itemid !== undefined) {
let list = this.list;
list = list.map((item, index) => {
item.select = '';
if (index == current.itemid) {
if (index === +current.itemid) {
item.select = true;
}
return item;
......@@ -478,7 +481,7 @@
this.current = this.currentIndex - 1;
}
setTimeout(function() {
let newlist = that.list.filter((item, index) => index != current.itemid);
let newlist = that.list.filter((item, index) => index !== +current.itemid);
// 正常情况下,current.itemid都会比current大一个,因为current有个隐藏元素,当相等或小于的时候就有问题,要重新设置current,最小不能超过0
if (current.itemid <= that.current) {
that.current = Math.max(that.current - 1, 0);
......@@ -526,15 +529,15 @@
success (res) {
console.log('requestSubscribeMessage success', res);
if (res.errMsg === 'requestSubscribeMessage:ok') {
const rs = tmplIds.every(v => res[v] === 'accept');
// 兼容写法,有时响应中的模板id不是3个
const rs = tmplIds.every(v => res[v] === undefined || res[v] === 'accept');
if (rs) {
that.sign = true;
setTimeout(async () => {
const innerAudioContext = wx.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = '/static/audio/supermarie.mp3';
innerAudioContext.onPlay(() => {
});
innerAudioContext.onPlay(() => {});
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
......@@ -557,16 +560,14 @@
}
const openid = wx.getStorageSync('openId');
return {
title: `${this.$wepy.userInfo && this.$wepy.userInfo.nickName || '您的好朋友'}邀请您来抽奖啦~`,
title: `${(this.$wepy.userInfo && this.$wepy.userInfo.nickName) || '您的好朋友'}邀请您来抽奖啦~`,
path: `/pages/index?openid=${openid}`,
imageUrl: this.$wepy.awardsInfo.photoUrl,
success: function(res) {
let shareId = res.shareTickets[0];
console.log('shareId', shareId);
// 转发成功
},
fail: function(res) {
// 转发失败
console.log(res);
}
};
......@@ -574,11 +575,11 @@
getAwards: function() {
const { batchId, photoUrl, quantity, name, chance, progress } = this.awardsInfo;
if (!batchId || !this.mainInfo || !this.mainInfo.account) {
Notify({ message: '服务器异常,请稍后重试', background: '#FF5D15', safeAreaInsetTop: true});
Notify({ message: '服务器异常,请稍后重试', background: '#FF5D15', safeAreaInsetTop: true });
return;
}
if (this.mainInfo && this.mainInfo.account && this.mainInfo.account.quantity === 0) {
Notify({ message: '您的克币数为0, 无法参与抽奖', background: '#FF5D15', safeAreaInsetTop: true});
Notify({ message: '您的克币数为0, 无法参与抽奖', background: '#FF5D15', safeAreaInsetTop: true });
return;
}
wx.navigateTo({
......
......@@ -101,24 +101,24 @@
</template>
<script>
import wepy from '@wepy/core';
import { getRaffles } from '../common/api'
import { getRaffles } from '../common/api';
wepy.page({
data: {
list:[],
fonts:['','待开奖','未中奖','待领取','未发货','已发货'],
list: [],
fonts: ['', '待开奖', '未中奖', '待领取', '未发货', '已发货']
},
methods: {
goprize(event) {
let detail = event.$wx.currentTarget;
let id = detail.dataset.id || '';
wx.navigateTo({url:'/pages/prize?joinRecordId='+id});
wx.navigateTo({url: '/pages/prize?joinRecordId=' + id});
}
},
onLoad () {
getRaffles().then(res=>{
getRaffles().then(res => {
this.list = res || [];
});
},
}
});
</script>
<config>
......
......@@ -99,98 +99,98 @@
import wepy from '@wepy/core';
import Dialog from '../components/vant/dialog/dialog';
import Notify from '../components/vant/notify/notify';
import { getOneRaffle, getUserPhone, getPrize } from '../common/api'
import { getOneRaffle, getUserPhone, getPrize } from '../common/api';
var raffle = require('../common/raffleProbability');
var area = require('../components/custom/china.js');
wepy.page({
data: {
quantity:0,
prize:{},
name:'',
phone:'',
address:'',
province:'',
city:'',
county:'',
cityValue:'',
areaList:[],
showAddress:false,
joinRecordId:null,
chance:'',
btnfont:'领取',
idNumber:''
quantity: 0,
prize: {},
name: '',
phone: '',
address: '',
province: '',
city: '',
county: '',
cityValue: '',
areaList: [],
showAddress: false,
joinRecordId: null,
chance: '',
btnfont: '领取',
idNumber: ''
},
methods: {
goprize() {
if(!this.prize.cash) {
if(!this.name){
Notify({message: '请填写收货人', background:'#FF5D15'});
if (!this.prize.cash) {
if (!this.name) {
Notify({message: '请填写收货人', background: '#FF5D15'});
return;
}
let reg = /^1\d{10}$/
if(!this.phone){
Notify({message: '请填写手机号码', background:'#FF5D15'});
let reg = /^1\d{10}$/;
if (!this.phone) {
Notify({message: '请填写手机号码', background: '#FF5D15'});
return;
}
if(!reg.test(this.phone)) {
Notify({message: '请填写正确的手机号码', background:'#FF5D15'});
if (!reg.test(this.phone)) {
Notify({message: '请填写正确的手机号码', background: '#FF5D15'});
return;
}
if(!this.idNumber) {
Notify({message: '请填写身份证号', background:'#FF5D15'});
if (!this.idNumber) {
Notify({message: '请填写身份证号', background: '#FF5D15'});
return;
}
if(!this.city){
Notify({message: '请选择所在地区', background:'#FF5D15'});
if (!this.city) {
Notify({message: '请选择所在地区', background: '#FF5D15'});
return;
}
if(!this.address){
Notify({message: '请填写详细地址', background:'#FF5D15'});
if (!this.address) {
Notify({message: '请填写详细地址', background: '#FF5D15'});
return;
}
}
let params = {
joinRecordId:this.joinRecordId,
name:this.name,
phone:this.phone,
province:this.province,
city:this.city,
county:this.county,
address:this.address,
idNumber:this.idNumber,
joinRecordId: this.joinRecordId,
name: this.name,
phone: this.phone,
province: this.province,
city: this.city,
county: this.county,
address: this.address,
idNumber: this.idNumber
};
let message = '您所领取的奖品我们将在3到5个工作日内寄出,请您耐心等待,感谢您的参与!';
let cashmeg = '您所领取的奖品我们将会在几分钟内发出,请您耐心等待,感谢您的参与!';
let that = this;
if(this.btnfont!=='领取') return;
if (this.btnfont !== '领取') return;
this.btnfont = '...';
getPrize(params).then(()=>{
getPrize(params).then(() => {
this.btnfont = '领取';
Dialog.alert({
title: '领取成功',
message: that.prize.cash?cashmeg:message,
message: that.prize.cash ? cashmeg : message
}).then(() => {
wx.reLaunch({url:'/pages/index'})
wx.reLaunch({url: '/pages/index'});
});
}).catch(()=>{
}).catch(() => {
this.btnfont = '领取';
});
},
onClose() {
this.showAddress = !this.showAddress;
},
setValue(event){
setValue(event) {
let value = event.$wx.detail;
let form = event.$wx.currentTarget.dataset.form;
if(form) this[form] = value;
if (form) this[form] = value;
},
getaddress(event) {
let detail = event.$wx.detail.values;
this.province = detail[0].name;
this.city = detail[1].name;
this.county = detail[2].name;
this.cityValue = detail[0].name+detail[1].name+detail[2].name
this.onClose()
this.cityValue = detail[0].name + detail[1].name + detail[2].name;
this.onClose();
}
},
computed: {
......@@ -199,22 +199,23 @@
onLoad (query) {
let joinRecordId = query.joinRecordId || '';
this.joinRecordId = joinRecordId;
if(!joinRecordId) Notify({message: '缺少参数错误!', background:'#FF5D15'});
//请求接口得到数据
getOneRaffle({joinRecordId:joinRecordId}).then(data=>{
let dat = data|| {};
if (!joinRecordId) Notify({message: '缺少参数错误!', background: '#FF5D15'});
// 请求接口得到数据
getOneRaffle({joinRecordId: joinRecordId}).then(data => {
console.log(555, data);
let dat = data || {};
this.prize = dat.prize;
this.quantity = dat.quantity;
this.chance = raffle.getProbability(dat.quantity,dat.prize.coinQuantity);
this.chance = raffle.getProbability(+dat.quantity, +dat.prize.coinQuantity);
});
getUserPhone().then(data=>{
getUserPhone().then(data => {
this.phone = data.phone;
});
this.areaList = area.areaList;
/*this.prize = {cash:false,name:'Nintendo Switch任天堂游戏机Nintendo Switch任天堂游戏机',photoUrl:'/static/images/test2.png',coinQuantity:5000};
/* this.prize = {cash:false,name:'Nintendo Switch任天堂游戏机Nintendo Switch任天堂游戏机',photoUrl:'/static/images/test2.png',coinQuantity:5000};
this.quantity = 300;
this.chance = raffle.getProbability(this.quantity,this.prize.coinQuantity);*/
},
this.chance = raffle.getProbability(this.quantity,this.prize.coinQuantity); */
}
});
</script>
<config>
......
......@@ -139,7 +139,7 @@
import wepy from '@wepy/core';
import Notify from '../components/vant/notify/notify';
import Dialog from '../components/vant/dialog/dialog';
import { updateUserPhone, confirmRaffle, register,getUserPhone } from '../common/api'
import { updateUserPhone, confirmRaffle, register } from '../common/api';
import store from '../store';
wepy.page({
store,
......@@ -152,27 +152,27 @@
name: '',
chance: '',
photoUrl: '',
btnfont:'立即参与',
hasPhone:false,
btnfont: '立即参与',
hasPhone: false
},
methods: {
check() {
this.isCheck = !this.isCheck;
},
async getPhoneNumber(e) {
if(this.btnfont !== '立即参与') {return;}
if (this.btnfont !== '立即参与') { return; }
let that = this;
let detail = e.$wx.detail || {};
function goprize() {
updateUserPhone(detail).then(()=>{
updateUserPhone(detail).then(() => {
that.confirmRaff();
wx.setStorageSync('hasPhone',true);
wx.setStorageSync('hasPhone', true);
that.hasPhone = true;
}).catch(()=>{
}).catch(() => {
that.btnfont = '立即参与';
});
}
if(detail.encryptedData) {
if (detail.encryptedData) {
this.btnfont = '提交中...';
wx.checkSession({
success () {
......@@ -183,40 +183,40 @@
goprize();
}
});
}else {
Notify({message: '参与失败,请重新授权!',background:'#FF5D15'})
} else {
Notify({message: '参与失败,请重新授权!', background: '#FF5D15'});
}
},
async confirmRaff() {
let title = ['参与成功!','参与失败!','参与失败!'];
let message = ['参与成功,坐等开奖。','当前抽奖已结束。','当前奖品已经没有库存了。'];
//如果用户还未注册
let title = ['参与成功!', '参与失败!', '参与失败!'];
let message = ['参与成功,坐等开奖。', '当前抽奖已结束。', '当前奖品已经没有库存了。'];
// 如果用户还未注册
let isRegister = wx.getStorageSync('isRegister');
if(isRegister === false) {
if (isRegister === false) {
await register(store.state.userInfo);
wx.setStorageSync('isRegister', true);
}
this.btnfont = '提交中...';
confirmRaffle({batchId:this.batchId}).then(data=>{
confirmRaffle({batchId: this.batchId}).then(data => {
this.btnfont = '立即参与';
let code = data.joinCode;
if(code === undefined) code = 3;
if (code === undefined) code = 3;
Dialog.alert({
title: title[code],
message: message[code],
message: message[code]
}).then(() => {
wx.reLaunch({url:'/pages/index'})
wx.reLaunch({url: '/pages/index'});
});
}).catch(()=>{
}).catch(() => {
this.btnfont = '立即参与';
})
});
},
joinin() {
if(!this.isCheck) {
Notify({message: '勾选同意后才可以抽奖!', background:'#FF5D15'})
if (!this.isCheck) {
Notify({message: '勾选同意后才可以抽奖!', background: '#FF5D15'});
return;
}
if(this.hasPhone) {
if (this.hasPhone) {
this.confirmRaff();
}
}
......@@ -224,7 +224,7 @@
computed: {
imgsrc() {
let imgsrc = '/static/images/selected.png';
if(this.isCheck) {
if (this.isCheck) {
imgsrc = '/static/images/selected.png';
} else {
imgsrc = '/static/images/selectno.png';
......@@ -247,7 +247,7 @@
}
this.hasPhone = wx.getStorageSync('hasPhone');
this.batchId = batchId;
this.quantity = quantity||'';
this.quantity = quantity || '';
this.name = name;
this.chance = chance;
this.photoUrl = photoUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment