diff --git a/package-lock.json b/package-lock.json index 04d6fc2..c64c1ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "@vue/cli-plugin-eslint": "^4.1.0", "@vue/cli-service": "^4.5.19", "babel-eslint": "^10.0.3", + "compression-webpack-plugin": "^6.1.1", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", "sass-loader": "^8.0.0", @@ -3716,6 +3717,266 @@ "node": ">= 0.8.0" } }, + "node_modules/compression-webpack-plugin": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-6.1.1.tgz", + "integrity": "sha512-BEHft9M6lwOqVIQFMS/YJGmeCYXVOakC5KzQk05TFpMBlODByh1qNsZCWjUBxCQhUP9x0WfGidxTbGkjbWO/TQ==", + "dev": true, + "dependencies": { + "cacache": "^15.0.5", + "find-cache-dir": "^3.3.1", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "webpack-sources": "^1.4.3" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/compression-webpack-plugin/node_modules/cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/compression-webpack-plugin/node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/compression-webpack-plugin/node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/compression-webpack-plugin/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/compression-webpack-plugin/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/compression-webpack-plugin/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/compression-webpack-plugin/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/compression-webpack-plugin/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/compression-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/compression-webpack-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/compression-webpack-plugin/node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/compression-webpack-plugin/node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/compression-webpack-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/compression/node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -6659,7 +6920,7 @@ "node_modules/fsevents/node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "inBundle": true, "license": "MIT", "optional": true, @@ -17157,6 +17418,190 @@ } } }, + "compression-webpack-plugin": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-6.1.1.tgz", + "integrity": "sha512-BEHft9M6lwOqVIQFMS/YJGmeCYXVOakC5KzQk05TFpMBlODByh1qNsZCWjUBxCQhUP9x0WfGidxTbGkjbWO/TQ==", + "dev": true, + "requires": { + "cacache": "^15.0.5", + "find-cache-dir": "^3.3.1", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "webpack-sources": "^1.4.3" + }, + "dependencies": { + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -19712,7 +20157,7 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "bundled": true, "optional": true, "requires": { diff --git a/package.json b/package.json index 6f51772..df427d4 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@vue/cli-plugin-eslint": "^4.1.0", "@vue/cli-service": "^4.5.19", "babel-eslint": "^10.0.3", + "compression-webpack-plugin": "^6.1.1", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", "sass-loader": "^8.0.0", diff --git a/src/assets/images/home/background.png b/src/assets/images/home/background.png deleted file mode 100644 index 1959f88..0000000 Binary files a/src/assets/images/home/background.png and /dev/null differ diff --git a/src/components/tabbar/styles/navbar.css b/src/components/tabbar/styles/navbar.css index 7a6fe37..44ba6cf 100644 --- a/src/components/tabbar/styles/navbar.css +++ b/src/components/tabbar/styles/navbar.css @@ -29,7 +29,7 @@ position: relative; height: 700px; overflow: hidden; - background: url('../../../assets/images/home/background.png') no-repeat center/cover; + background: url('https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/ui/media/background.png') no-repeat center/cover; padding: 0 50px; } .navbarHeight video { diff --git a/src/router/index.js b/src/router/index.js index dc987b0..69b82ed 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,87 +42,87 @@ const routes = [ { path: "/questionDetail", name: "questionDetail", - component: questionDetail + component: () => import('../view/newsHome/homeComponents/questionDetail.vue') }, { path: "/news", name: "news", - component: news + component: () => import('../view/newsHome/news/index.vue') }, { path: "/newsDetail", name: "newsDetail", - component: newsDetail + component: () => import('../view/newsHome/news/detail.vue') }, { path: "/business", name: "business", - component: business, + component: () => import('../view/business/index.vue'), }, { path: "/sea", name: "sea", - component: sea, + component: () => import('../view/business/tab/sea.vue'), }, { path: "/air", name: "air", - component: air, + component: () => import('../view/business/tab/air.vue'), }, { path: "/road", name: "road", - component: road, + component: () => import('../view/business/tab/road.vue'), }, { path: "/globalNetwork", name: "globalNetwork", - component: globalNetwork + component: () => import('../view/globalNetwork/index.vue') }, { path: "/platform", name: "platform", - component: platform + component: () => import('../view/platform/index.vue') }, { path: "/warehouseMap", name: "warehouseMap", - component: warehouseMap + component: () => import('../view/platform/tab/warehouseMap.vue') }, { path: "/AMAZON", name: "AMAZON", - component: AMAZON + component: () => import('../view/platform/tab/AMAZON.vue') }, { path: "/AMZDetail", name: "AMZDetail", - component: AMZDetail + component: () => import('../view/platform/tab/components/AMZDetail.vue') }, { path: "/about", name: "about", - component: about + component: () => import('../view/about/index.vue') }, { path: "/connection", name: "connection", - component: connection + component: () => import('../view/about/components/connection.vue') }, { path: "/corporateCulture", name: "corporateCulture", - component: corporateCulture + component: () => import('../view/about/components/corporateCulture.vue') }, { path: "/inviteJob", name: "inviteJob", - component: inviteJob + component: () => import('../view/about/components/inviteJob.vue') }, { path: '/developmentDocking', name: "developmentDocking", - component: developmentDocking, + component: () => import('../view/developmentDocking/index.vue'), children: [ { path: 'main', @@ -134,27 +134,22 @@ const routes = [ { path: "/inviteList", name: "inviteList", - component: inviteList + component: () => import('../view/about/components/inviteList.vue') }, { path: "/inviteListDetail", name: "inviteListDetail", - component: inviteListDetail + component: () => import('../view/about/components/inviteListDetail.vue') }, { path: "/login", name: "Login page", - component: Login + component: () => import('./pages/login.vue') }, { path: "/signup", name: "Signup page", - component: Signup - }, - { - path: '/password_forgot', - name: 'Forgot Password page', - component: Forgotpassword + component: () => import('./pages/signup.vue') }, { path: '*', // 捕获所有不匹配的路径 diff --git a/src/view/newsHome/index.vue b/src/view/newsHome/index.vue index 6ea65d5..11bcf72 100644 --- a/src/view/newsHome/index.vue +++ b/src/view/newsHome/index.vue @@ -411,7 +411,7 @@ export default { element.classList.add('slide-up-enter-active'); element.style.opacity = '1'; - }, 500); + }, 350); } }); @@ -419,7 +419,7 @@ export default { isElementInViewport(el) { const rect = el.getBoundingClientRect(); return ( - rect.top <= (document.documentElement.clientHeight / 2 ) + rect.top <= (document.documentElement.clientHeight / 1.2 ) ); }, setNewsActive(item,index) { diff --git a/src/view/platform/index.vue b/src/view/platform/index.vue index ebc6c71..a77afb9 100644 --- a/src/view/platform/index.vue +++ b/src/view/platform/index.vue @@ -84,7 +84,7 @@ export default { activeIndex: 0, // 默认选中第一个按钮 buttons: [ { label: '亚马逊仓库地址',transportMode:'OCEAN' }, - { label: '仓库地址分布图',transportMode:'AIR' }, + // { label: '仓库地址分布图',transportMode:'AIR' }, { label: 'AMAZON注册',transportMode:'RAIL' } ], tableData_American: @@ -2912,24 +2912,29 @@ export default { handleClick(tab, event) { console.log(tab, event); }, - setActive(item,index) { - if(index === 0){ - this.$router.push({ - name:'platform' - }) - }else if(index === 1){ - this.$router.push({ - name:'warehouseMap' - }) - }else if(index === 2){ - this.$router.push({ - name:'AMAZON' - }) - } - // this.activeIndex = index; - - - }, + setActive(item,index) { + if(index === 0){ + this.$router.push({ + name:'platform' + }) + } + else if(index === 1){ + this.$router.push({ + name:'AMAZON' + }) + // this.$router.push({ + // name:'warehouseMap' + // }) + } + // else if(index === 2){ + // this.$router.push({ + // name:'AMAZON' + // }) + // } + // this.activeIndex = index; + + + }, goClient(){ window.location.href= `http://47.119.163.201/#/home/index` } diff --git a/src/view/platform/tab/AMAZON.vue b/src/view/platform/tab/AMAZON.vue index bccb593..f27aacb 100644 --- a/src/view/platform/tab/AMAZON.vue +++ b/src/view/platform/tab/AMAZON.vue @@ -189,29 +189,35 @@ return { activeName:'first', activeRegistar:'first', - activeIndex: 2, // 默认选中第一个按钮 + activeIndex: 1, // 默认选中第一个按钮 buttons: [ { label: '亚马逊仓库地址',transportMode:'OCEAN' }, - { label: '仓库地址分布图',transportMode:'AIR' }, + // { label: '仓库地址分布图',transportMode:'AIR' }, { label: 'AMAZON注册',transportMode:'RAIL' } ] } }, methods: { setActive(item,index) { + console.log(item,index,'item,index') if(index === 0){ this.$router.push({ name:'platform' }) - }else if(index === 1){ - this.$router.push({ - name:'warehouseMap' - }) - }else if(index === 2){ + } + else if(index === 1){ this.$router.push({ name:'AMAZON' }) + // this.$router.push({ + // name:'warehouseMap' + // }) } + // else if(index === 2){ + // this.$router.push({ + // name:'AMAZON' + // }) + // } // this.activeIndex = index; diff --git a/src/view/platform/tab/warehouseMap.vue b/src/view/platform/tab/warehouseMap.vue index d2ada6d..119eaf4 100644 --- a/src/view/platform/tab/warehouseMap.vue +++ b/src/view/platform/tab/warehouseMap.vue @@ -168,7 +168,7 @@ activeIndex: 1, // 默认选中第一个按钮 buttons: [ { label: '亚马逊仓库地址',transportMode:'OCEAN' }, - { label: '仓库地址分布图',transportMode:'AIR' }, + // { label: '仓库地址分布图',transportMode:'AIR' }, { label: 'AMAZON注册',transportMode:'RAIL' } ], activeWarehouseIndex: 1, @@ -188,20 +188,25 @@ } }, methods: { - setActive(item,index) { + setActive(item,index) { if(index === 0){ this.$router.push({ name:'platform' }) - }else if(index === 1){ - this.$router.push({ - name:'warehouseMap' - }) - }else if(index === 2){ + } + else if(index === 1){ this.$router.push({ name:'AMAZON' }) + // this.$router.push({ + // name:'warehouseMap' + // }) } + // else if(index === 2){ + // this.$router.push({ + // name:'AMAZON' + // }) + // } // this.activeIndex = index; diff --git a/vue.config.js b/vue.config.js index 3edee25..1882b55 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,10 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); +const path = require('path'); + +const webpack = require('webpack') +const CompressionPlugin = require('compression-webpack-plugin') +const zlib = require('zlib') module.exports = { devServer:{ @@ -22,5 +27,38 @@ module.exports = { chunks: 'all' } } - } + }, + configureWebpack: { + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + '@i': path.resolve(__dirname, './src/assets'), + } + }, + plugins: [ + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + // 下面两项配置才是 compression-webpack-plugin 压缩配置 + // 压缩成 .gz 文件 + new CompressionPlugin({ + filename: '[path][base].gz', + algorithm: 'gzip', + test: /\.js$|\.css$|\.html$/, + threshold: 10240, + minRatio: 0.8 + }), + // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 + new CompressionPlugin({ + filename: '[path][base].br', + algorithm: 'brotliCompress', + test: /\.(js|css|html|svg)$/, + compressionOptions: { + params: { + [zlib.constants.BROTLI_PARAM_QUALITY]: 11 + } + }, + threshold: 10240, + minRatio: 0.8 + }) + ] + } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index d78e295..d146adc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -971,7 +971,7 @@ dependencies: "@types/node" "*" -"@types/json-schema@^7.0.5": +"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8": "integrity" "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" "resolved" "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" "version" "7.0.15" @@ -1573,7 +1573,7 @@ "resolved" "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" "version" "3.5.2" -"ajv@^6.1.0", "ajv@^6.10.2", "ajv@^6.12.3", "ajv@^6.12.4", "ajv@^6.9.1": +"ajv@^6.1.0", "ajv@^6.10.2", "ajv@^6.12.3", "ajv@^6.12.4", "ajv@^6.12.5", "ajv@^6.9.1": "integrity" "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==" "resolved" "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" "version" "6.12.6" @@ -2654,6 +2654,17 @@ dependencies: "mime-db" ">= 1.43.0 < 2" +"compression-webpack-plugin@^6.1.1": + "integrity" "sha512-BEHft9M6lwOqVIQFMS/YJGmeCYXVOakC5KzQk05TFpMBlODByh1qNsZCWjUBxCQhUP9x0WfGidxTbGkjbWO/TQ==" + "resolved" "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-6.1.1.tgz" + "version" "6.1.1" + dependencies: + "cacache" "^15.0.5" + "find-cache-dir" "^3.3.1" + "schema-utils" "^3.0.0" + "serialize-javascript" "^5.0.1" + "webpack-sources" "^1.4.3" + "compression@^1.7.4": "integrity" "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==" "resolved" "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz" @@ -7472,6 +7483,15 @@ "ajv" "^6.12.4" "ajv-keywords" "^3.5.2" +"schema-utils@^3.0.0": + "integrity" "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==" + "resolved" "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "@types/json-schema" "^7.0.8" + "ajv" "^6.12.5" + "ajv-keywords" "^3.5.2" + "select-hose@^2.0.0": "integrity" "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==" "resolved" "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz" @@ -7547,6 +7567,13 @@ dependencies: "randombytes" "^2.1.0" +"serialize-javascript@^5.0.1": + "integrity" "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==" + "resolved" "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "randombytes" "^2.1.0" + "serve-index@^1.9.1": "integrity" "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==" "resolved" "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz"