From ca44e7447a188211f35413b299e7aa6a8db7ba0f Mon Sep 17 00:00:00 2001 From: 406803045 <406803045@qq.com> Date: Thu, 6 Jun 2019 09:17:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=EF=BC=8C=E6=8E=88=E6=9D=83=EF=BC=8C=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .babelrc | 12 + .env.staging | 1 + babel.config.js | 3 +- build/index.js | 2 +- package.json | 5 +- public/index.1.html | 27 ++ public/index.html | 9 - src/api/coupon.js | 15 ++ src/api/user.js | 20 +- src/assets/css/index.scss | 25 +- src/assets/images/arrow-left.png | Bin 0 -> 838 bytes .../images/coupon/s-coupon-detail-down@2x.png | Bin 0 -> 389 bytes .../images/coupon/s-coupon-detail-up@2x.png | Bin 0 -> 378 bytes .../images/coupon/s-coupon-empty@2x.png | Bin 0 -> 2414 bytes src/components/ListEmpty.vue | 35 +++ src/components/QrCodePopup.vue | 134 +++++++++ src/components/VerificationCode.vue | 9 +- src/config/env.staging.js | 2 +- src/filters/filter.js | 56 +++- src/filters/index.js | 4 +- src/main.js | 5 +- src/permission.js | 46 ++-- src/router/index.js | 2 +- src/store/modules/user.js | 6 + src/utils/directives.js | 33 +++ src/utils/request.js | 6 +- src/views/account/coupon.vue | 254 ++++++++++++------ src/views/account/index.vue | 55 ++-- vue.config.js | 56 ++-- 29 files changed, 627 insertions(+), 195 deletions(-) create mode 100644 .babelrc create mode 100644 public/index.1.html create mode 100644 src/api/coupon.js create mode 100644 src/assets/images/arrow-left.png create mode 100644 src/assets/images/coupon/s-coupon-detail-down@2x.png create mode 100644 src/assets/images/coupon/s-coupon-detail-up@2x.png create mode 100644 src/assets/images/coupon/s-coupon-empty@2x.png create mode 100644 src/components/ListEmpty.vue create mode 100644 src/components/QrCodePopup.vue create mode 100644 src/utils/directives.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..dc2f4b5 --- /dev/null +++ b/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ "@babel/preset-env", { + "targets": { + "browsers": [ "last 1 version", "ie >= 11" ] + } + }] + ], + "plugins": [ + "@babel/plugin-transform-runtime" + ] +} \ No newline at end of file diff --git a/.env.staging b/.env.staging index 7f76b07..1d8a5fc 100644 --- a/.env.staging +++ b/.env.staging @@ -4,6 +4,7 @@ VUE_APP_ENV = 'staging' #base url BASE_URL = https://www.top1buyer.com/ #appid + VUE_APP_WECHAT_APPID='wx6bb2125514b4c1ff' # base api VUE_APP_BASE_API = '/stage-api' diff --git a/babel.config.js b/babel.config.js index 3fcb398..9a68476 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,6 @@ +process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true module.exports = { - presets: ['@vue/app'], + presets: [['@vue/app', { useBuiltIns: 'entry' }]], plugins: [ [ 'import', diff --git a/build/index.js b/build/index.js index d1d939e..33aca52 100644 --- a/build/index.js +++ b/build/index.js @@ -3,7 +3,7 @@ const chalk = require('chalk') // const config = require('../vue.config.js') const rawArgv = process.argv.slice(2) const args = rawArgv.join(' ') - +// npm run preview -- --report if (process.env.npm_config_preview || rawArgv.includes('--preview')) { const report = rawArgv.includes('--report') diff --git a/package.json b/package.json index 4dcc7cf..0cbb0aa 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "dev": "vue-cli-service serve", "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", + "build:sit": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src", "test:unit": "jest --clearCache && vue-cli-service test:unit", @@ -15,8 +15,10 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@babel/polyfill": "^7.4.4", "@chenfengyuan/vue-qrcode": "^1.0.0", "axios": "0.18.0", + "core-js": "^2.6.9", "crypto-js": "^3.1.9-1", "good-storage": "^1.1.0", "js-cookie": "^2.2.0", @@ -52,6 +54,7 @@ "script-loader": "0.7.2", "serve-static": "^1.13.2", "svgo": "1.2.2", + "vconsole": "^2.5.2", "vue-template-compiler": "2.6.10" }, "engines": { diff --git a/public/index.1.html b/public/index.1.html new file mode 100644 index 0000000..8f3b79a --- /dev/null +++ b/public/index.1.html @@ -0,0 +1,27 @@ + + +
+ + + + + <% for (var i in + htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %> + + + <% } %> +