doc: close the entire dev branch

This commit is contained in:
Leon Xu committed 2022-04-13 19:05:31 +00:00
1 parent fd65bff339
commit f64eb97635
45 files changed
+1927 -74

No files matched your search

+1
View File
@@ -4,6 +4,7 @@ node_modules
# local env files
.env
.env.local
.env.*.local
+105 -39
View File
@@ -10,7 +10,12 @@
"dependencies": {
"axios": "^0.26.1",
"core-js": "^3.8.3",
"echarts": "4.9.0",
"md5-js": "^0.0.3",
"swiper": "^5.4.5",
"vant": "^2.12.33",
"vue": "^2.6.14",
"vue-awesome-swiper": "^4.1.1",
"vue-router": "^3.5.1"
},
"devDependencies": {
@@ -21,12 +26,10 @@
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"babel-plugin-import": "^1.13.3",
"echarts": "^4.9.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"less": "^4.0.0",
"less-loader": "^8.0.0",
"vant": "^2.12.46",
"vue-template-compiler": "^2.6.14"
}
},
@@ -1631,7 +1634,6 @@
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
"integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
"dev": true,
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
@@ -1866,7 +1868,6 @@
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
"dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
@@ -2189,14 +2190,12 @@
"node_modules/@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg==",
"dev": true
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"node_modules/@vant/popperjs": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
"integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
"dev": true,
"dependencies": {
"@popperjs/core": "^2.9.2"
}
@@ -2204,8 +2203,7 @@
"node_modules/@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==",
"dev": true
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
},
"node_modules/@vue/babel-helper-vue-transform-on": {
"version": "1.0.2",
@@ -4854,6 +4852,14 @@
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"node_modules/dom7": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
"dependencies": {
"ssr-window": "^2.0.0"
}
},
"node_modules/domelementtype": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
@@ -4939,7 +4945,6 @@
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz",
"integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==",
"dev": true,
"dependencies": {
"zrender": "4.3.2"
}
@@ -7376,6 +7381,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/md5-js": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/md5-js/-/md5-js-0.0.3.tgz",
"integrity": "sha1-bijeJSM9VbNHb2qMA0X8pTAZ1Lc=",
"bin": {
"md5": "bin/cli.js"
}
},
"node_modules/mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
@@ -9174,8 +9187,7 @@
"node_modules/regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
"dev": true
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
},
"node_modules/regenerator-transform": {
"version": "0.15.0",
@@ -9817,6 +9829,11 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"node_modules/ssr-window": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
},
"node_modules/ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
@@ -10020,6 +10037,23 @@
"node": ">= 10"
}
},
"node_modules/swiper": {
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz",
"integrity": "sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==",
"hasInstallScript": true,
"dependencies": {
"dom7": "^2.1.5",
"ssr-window": "^2.0.0"
},
"engines": {
"node": ">= 4.7.0"
},
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/vladimirkharlampidi"
}
},
"node_modules/table": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz",
@@ -10448,10 +10482,9 @@
}
},
"node_modules/vant": {
"version": "2.12.46",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.46.tgz",
"integrity": "sha512-FNWja2LenIxEin1OtBqjn/zpkPVRdCP9E3OAZdpzsCr+f7YQitDFuG8CbOu+GobLDKhl/NTPJXUpIW+V4SuAIA==",
"dev": true,
"version": "2.12.33",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.33.tgz",
"integrity": "sha512-vR2LmJNoSB+Gox1qSdWEOROMOl6lkDcxMLq1hu59AS0VePk41FMuqqV96Rmvo724HRFK8AlJLHrRmPTDOtGFzA==",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
@@ -10477,6 +10510,18 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
},
"node_modules/vue-awesome-swiper": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz",
"integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ==",
"engines": {
"node": ">=8"
},
"peerDependencies": {
"swiper": "^5.2.0",
"vue": "2.x"
}
},
"node_modules/vue-eslint-parser": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -10579,8 +10624,7 @@
"node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g==",
"dev": true
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"node_modules/vue-loader": {
"version": "17.0.0",
@@ -11439,8 +11483,7 @@
"node_modules/zrender": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-4.3.2.tgz",
"integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g==",
"dev": true
"integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g=="
}
},
"dependencies": {
@@ -12548,7 +12591,6 @@
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
"integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
@@ -12736,8 +12778,7 @@
"@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
"dev": true
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
},
"@sideway/address": {
"version": "4.1.4",
@@ -13031,14 +13072,12 @@
"@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg==",
"dev": true
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"@vant/popperjs": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
"integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
"dev": true,
"requires": {
"@popperjs/core": "^2.9.2"
}
@@ -13046,8 +13085,7 @@
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==",
"dev": true
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
},
"@vue/babel-helper-vue-transform-on": {
"version": "1.0.2",
@@ -15037,6 +15075,14 @@
"entities": "^2.0.0"
}
},
"dom7": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
"requires": {
"ssr-window": "^2.0.0"
}
},
"domelementtype": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
@@ -15101,7 +15147,6 @@
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz",
"integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==",
"dev": true,
"requires": {
"zrender": "4.3.2"
}
@@ -16919,6 +16964,11 @@
"semver": "^6.0.0"
}
},
"md5-js": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/md5-js/-/md5-js-0.0.3.tgz",
"integrity": "sha1-bijeJSM9VbNHb2qMA0X8pTAZ1Lc="
},
"mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
@@ -18201,8 +18251,7 @@
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
"dev": true
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
},
"regenerator-transform": {
"version": "0.15.0",
@@ -18726,6 +18775,11 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"ssr-window": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
@@ -18868,6 +18922,15 @@
}
}
},
"swiper": {
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz",
"integrity": "sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==",
"requires": {
"dom7": "^2.1.5",
"ssr-window": "^2.0.0"
}
},
"table": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz",
@@ -19186,10 +19249,9 @@
}
},
"vant": {
"version": "2.12.46",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.46.tgz",
"integrity": "sha512-FNWja2LenIxEin1OtBqjn/zpkPVRdCP9E3OAZdpzsCr+f7YQitDFuG8CbOu+GobLDKhl/NTPJXUpIW+V4SuAIA==",
"dev": true,
"version": "2.12.33",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.33.tgz",
"integrity": "sha512-vR2LmJNoSB+Gox1qSdWEOROMOl6lkDcxMLq1hu59AS0VePk41FMuqqV96Rmvo724HRFK8AlJLHrRmPTDOtGFzA==",
"requires": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
@@ -19209,6 +19271,12 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
},
"vue-awesome-swiper": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz",
"integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ==",
"requires": {}
},
"vue-eslint-parser": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -19283,8 +19351,7 @@
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g==",
"dev": true
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"vue-loader": {
"version": "17.0.0",
@@ -19936,8 +20003,7 @@
"zrender": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-4.3.2.tgz",
"integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g==",
"dev": true
"integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g=="
}
}
}
+5 -2
View File
@@ -10,7 +10,12 @@
"dependencies": {
"axios": "^0.26.1",
"core-js": "^3.8.3",
"echarts": "4.9.0",
"md5-js": "^0.0.3",
"swiper": "^5.4.5",
"vant": "^2.12.33",
"vue": "^2.6.14",
"vue-awesome-swiper": "^4.1.1",
"vue-router": "^3.5.1"
},
"devDependencies": {
@@ -21,12 +26,10 @@
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"babel-plugin-import": "^1.13.3",
"echarts": "^4.9.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"less": "^4.0.0",
"less-loader": "^8.0.0",
"vant": "^2.12.46",
"vue-template-compiler": "^2.6.14"
}
}
+1 -25
View File
@@ -1,32 +1,8 @@
<template>
<div id="app">
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view/>
<router-view />
</div>
</template>
<style lang="less">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>
+21
View File
@@ -0,0 +1,21 @@
/**
* 公共的请求接口
*/
const base = {
host: "https://api.tianapi.com",
baseUrl: "https://yupn.api.storeapi.net",
covInfo: "/ncov/index",
chinaData: "/api/94/219?format=json",
worldData: "/api/94/220?format=json",
cityData: "/api/94/221",
allData: "/api/94/222?format=json",
swiperBanner: "https://iwenwiki.com/wapicovid19/ncovimg.php",
travelUrl: "https://apis.juhe.cn/springTravel",
travelData: "/citys",
travelQuery: "/query",
CityUrl: "https://bang.360.cn",
getCity: "/aj/getcitycode",
};
export default base;
+63
View File
@@ -0,0 +1,63 @@
/**
* 请求接口的方法
*/
import axios from "axios";
import base from "./base";
import md5 from "md5-js";
const api = {
getCovInfo(params) {
return axios.get(base.host + base.covInfo, {
params,
});
},
getChinaData(params, params1) {
return axios.get(base.baseUrl + base.chinaData, {
params,
params1,
});
},
getWorldData(params, params1) {
return axios.get(base.baseUrl + base.worldData, {
params,
params1,
});
},
getCityData(city_name) {
let rules = md5(
"appid6938city_name" +
city_name +
"formatjson709b25c001c8d3325061a5baf7bb7615"
);
let canshu =
"format=json&appid=6938&city_name=" + city_name + "&sign=" + rules;
return axios.get(base.baseUrl + base.cityData + "?" + canshu);
},
getAllData(params, params1) {
return axios.get(base.baseUrl + base.allData, {
params,
params1,
});
},
getSwiperBanner() {
return axios.get(base.swiperBanner);
},
getTravel(params) {
return axios.get(base.travelUrl + base.travelData, {
params,
});
},
getTravelData(param, params) {
return axios.get(base.travelUrl + base.travelQuery, {
param,
params,
});
},
getCity() {
return axios.get(base.CityUrl + base.getCity);
},
};
export default api;
+44
View File
@@ -0,0 +1,44 @@
/* CSS初始化文件 */
body,
ul,
li,
p,
h1,
h2,
h3,
h4,
h5 {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
a {
text-decoration: none;
color: #333;
}
img {
border: 0;
}
/* 移动端布局 */
html {
font-size: 13vw;
}
/* 防止字体过大 */
@media (min-width: 750px) {
html {
font-size: 100px;
}
}
body {
font-size: 14px;
font-family: "Microsoft YaHei", "Arial Narrow", Arial, sans-serif;
margin: 0 auto;
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

+184
View File
@@ -0,0 +1,184 @@
<template>
<section class="num">
<article class="content">
<article class="title">
截至{{ formatDate(covData.modifyTime) }}全国数据统计
</article>
<ul class="wrap">
<li>
<span>
较昨日
<em style="color: rgb(247, 76, 49)">
{{ number(covData.currentConfirmedIncr) }}
</em>
</span>
<section class="bold">
{{ division(covData.currentConfirmedCount) }}
</section>
<strong>现存确诊</strong>
</li>
<li>
<span>
较昨日
<em style="color: rgb(247, 76, 49)">
{{ number(covData.confirmedIncr) }}
</em>
</span>
<section class="bold">{{ division(covData.suspectedCount) }}</section>
<strong>境外输入</strong>
</li>
<li>
<span
>较昨日
<em style="color: rgb(162, 90, 78)">
{{ number(covData.suspectedIncr) }}
</em>
</span>
<section class="bold">{{ division(covData.seriousCount) }}</section>
<strong>现存无症状</strong>
</li>
<li>
<span
>较昨日
<em style="color: rgb(174, 33, 44)">
{{ number(covData.confirmedIncr) }}
</em>
</span>
<section class="bold">{{ division(covData.confirmedCount) }}</section>
<strong>累计确诊</strong>
</li>
<li>
<span
>较昨日
<em style="color: rgb(93, 112, 146)">
{{ number(covData.deadIncr) }}
</em>
</span>
<section class="bold">{{ division(covData.deadCount) }}</section>
<strong>累计死亡</strong>
</li>
<li>
<span
>较昨日
<em style="color: rgb(40, 183, 163)">
{{ number(covData.curedIncr) }}
</em>
</span>
<section class="bold">{{ division(covData.curedCount) }}</section>
<strong>累计治愈</strong>
</li>
</ul>
</article>
</section>
</template>
<script>
export default {
name: "CovidData",
props: ["covData"],
methods: {
number(val) {
val = val > 0 ? "+" + val : val;
if (val == 0) {
return "";
}
return val;
},
formatDate(num) {
let date = new Date(num);
var YY = date.getFullYear() + "-";
var MM =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var DD =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var hh =
(date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
var mm =
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
return YY + MM + DD + hh + mm;
},
division(num) {
if (num == undefined) return "";
return num.toLocaleString();
},
},
};
</script>
<style lang="less" scoped>
.num {
background: #f5f5f5;
padding-top: 0.3rem;
.content {
background: #fff;
padding: 0.3rem;
min-height: 2rem;
border-radius: 0.2rem 0.2rem 0 0;
.title {
color: #666;
margin-bottom: 0.2rem;
}
}
.wrap {
display: flex;
flex-wrap: wrap;
padding-top: 0.2rem;
border-radius: 0.1rem;
box-shadow: 0 0 3px 2px rgba(194, 192, 192, 0.2);
li {
width: 33.33%;
text-align: center;
margin-bottom: 0.24rem;
position: "relative";
color: #666;
.number {
span {
color: #777;
font-weight: bold;
}
}
strong {
color: #333;
}
}
.bold {
font-weight: bold;
}
li::after {
content: "";
display: block;
position: absolute;
right: 1px;
top: 0.2rem;
height: 0.8rem;
border-right: 1px solid #eee;
}
li:nth-child(3n)::after {
content: "";
border-right: 0;
}
.bold {
font-size: 0.2rem;
}
li:nth-child(1) .bold {
color: rgb(247, 76, 49);
}
li:nth-child(2) .bold {
color: rgb(247, 131, 8);
}
li:nth-child(3) .bold {
color: rgb(162, 90, 78);
}
li:nth-child(4) .bold {
color: rgb(174, 33, 44);
}
li:nth-child(5) .bold {
color: rgb(93, 112, 146);
}
li:nth-child(6) .bold {
color: rgb(40, 183, 163);
}
}
}
</style>
+50
View File
@@ -0,0 +1,50 @@
<template>
<section class="list">
<section>
<router-link :to="{ name: 'RiskAreas' }">
<img src="../assets/images/1.png" alt="" />
<section>风险地区</section>
</router-link>
</section>
<section>
<router-link :to="{ name: 'CovidTest' }">
<img src="../assets/images/2.png" alt="" />
<section>核酸检测</section>
</router-link>
</section>
<section>
<router-link :to="{ name: 'Prevention' }">
<img src="../assets/images/3.png" alt="" />
<section>核酸物资</section>
</router-link>
</section>
<section>
<router-link :to="{ name: 'TravelAdvisory' }">
<img src="../assets/images/4.png" alt="" />
<section>出行政策</section>
</router-link>
</section>
</section>
</template>
<script>
export default {
name: "CovidNav",
};
</script>
<style lang="less" scoped>
.list {
display: flex;
padding-bottom: 0.2rem;
> section {
flex: 1;
text-align: center;
color: #666;
img {
width: 0.8rem;
height: 0.8rem;
}
}
}
</style>
+82
View File
@@ -0,0 +1,82 @@
<template>
<section class="hot">
<article class="title">
<img src="../assets/images/hot.png" alt="hot image" class="icon" />
<a href="#">查看更多</a>
</article>
<ul class="list">
<li v-for="item in covNews" :key="item.id">
<span>最新</span>{{ item.title }}
<img src="../assets/images/right.png" alt="" />
</li>
</ul>
</section>
</template>
<script>
export default {
name: "CovidNews",
props: {
covNews: {
type: Array,
default: function () {
return [];
},
},
},
};
</script>
<style lang="less" scoped>
.hot {
padding: 0.2rem;
border-bottom: 1px solid #eee;
.icon {
width: 1.2rem;
vertical-align: top;
}
.title {
border-left: 0.04rem solid #002fa7;
padding-left: 0.1rem;
a {
float: right;
font-weight: normal;
color: #002fa7;
font-size: 0.26rem;
img {
width: 0.26rem;
}
}
}
img {
width: 0.75rem;
.icon {
width: 1.2rem;
vertical-align: top;
}
}
.list {
li {
line-height: 0.44rem;
margin-bottom: 0.2rem;
letter-spacing: 0.03rem;
font-size: 0.3rem;
color: #666;
}
span {
background: #ff5555;
color: #fff;
font-size: 0.26rem;
padding: 0.02rem 0.06rem;
border-radius: 0.06rem;
}
img {
float: right;
width: 0.24rem;
padding-right: 0.2rem;
}
}
}
</style>
+23
View File
@@ -0,0 +1,23 @@
<template>
<header></header>
</template>
<script>
export default {
name: "TheHeader",
};
</script>
<style scoped>
header {
position: relative;
width: 100%;
height: 0;
padding-top: 33.5%;
color: #fff;
font-size: 0.28rem;
text-align: center;
background: url(../assets/images/1.jpg) no-repeat;
background-size: cover;
}
</style>
+13 -6
View File
@@ -1,10 +1,17 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import "./assets/css/common.css";
import "./plugins/vant";
import myCharts from "./plugins/echarts";
Vue.use(myCharts);
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/css/swiper.css";
Vue.use(VueAwesomeSwiper);
Vue.config.productionTip = false
Vue.config.productionTip = false;
new Vue({
router,
render: h => h(App)
}).$mount('#app')
render: (h) => h(App),
}).$mount("#app");
+303
View File
@@ -0,0 +1,303 @@
/**
* 开发成vue插件使用
*/
import echarts from "echarts";
import country from "../utils/country";
import "../utils/map";
const install = function (Vue) {
Object.defineProperties(Vue.prototype, {
$myChart: {
get() {
return {
chinaMap(id, data) {
var myChart = echarts.init(document.getElementById(id));
var option = {
tooltip: {
//悬浮弹框
triggerOn: "click", //提示框触发的条件
enterable: true, //鼠标是否可进入提示框浮层中,默认为false
formatter(item) {
//item=下面serves里面的data里面的每一项 //[{} ] data={} a b c d
return (
'<a href="/cities/' +
item.name +
'" style="color:#fff">省份:' +
item.name +
"--详情</a>"
);
},
},
visualMap: [
{
//映射高亮颜色
orient: "vertical", //水平的
type: "piecewise", //离散
bottom: 0,
textGap: 4,
itemGap: 4,
itemWidth: 10,
itemHeight: 10,
padding: 2,
textStyle: {
fontSize: 9,
},
pieces: [
// 配置颜色区间
{
min: 0,
max: 0,
color: "#FFFFFF",
},
{
min: 1,
max: 9,
color: "#FAEBD2",
},
{
min: 10,
max: 99,
color: "#E9A188",
},
{
min: 100,
max: 499,
color: "#D56355",
},
{
min: 500,
max: 999,
color: "#BB3937",
},
{
min: 1000,
max: 10000,
color: "#772526",
},
{
min: 10000,
color: "#480F10",
},
],
},
],
series: [
{
name: "省",
type: "map", //地图 bar line map
map: "china", //中国地图 需要引入地图china.js
roam: false,
zoom: 1.2,
aspectScale: 0.75,
top: 40,
layoutCenter: ["5%", "5%"],
label: {
normal: {
show: true,
textStyle: {
fontSize: 8,
},
},
},
itemStyle: {
normal: {
areaColor: "rgba(0,255,236,0)",
borderColor: "rgba(0,0,0,0.2)",
},
emphasis: {
// 选中的区域颜色及阴影效果等
areaColor: "rgba(255,180,0,0.8)",
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
},
},
data,
},
],
};
myChart.setOption(option);
},
worldMap(id, data) {
var myChart = echarts.init(document.getElementById(id));
var option = {
tooltip: {
//悬浮弹框
triggerOn: "click", //提示框触发的条件
enterable: true, //鼠标是否可进入提示框浮层中,默认为false
formatter(item) {
//item=下面serves里面的data里面的每一项 //[{} ] data={} a b c d
return item.name + ":确诊人数" + item.value;
},
},
visualMap: [
{
//映射高亮颜色
orient: "vertical", //垂直
type: "piecewise", //离散
bottom: 0,
pieces: [
// 配置颜色区间
{
min: 0,
max: 0,
color: "#FFFFFF",
},
{
min: 1,
max: 10000,
color: "#FDFDCF",
},
{
min: 10000,
max: 100000,
color: "#FE9E83",
},
{
min: 100000,
max: 500000,
color: "#E55A4E",
},
{
min: 500000,
// max: 10000,
color: "#4F070D",
},
],
},
],
series: [
{
name: "国",
type: "map", //地图 bar line map
map: "world",
nameMap: country, //自定义地区的名称映射
roam: false,
zoom: 1.2,
aspectScale: 0.75,
top: 40,
layoutCenter: ["5%", "5%"],
label: {
normal: {
show: false,
textStyle: {
fontSize: 8,
},
},
},
itemStyle: {
normal: {
areaColor: "rgba(0,255,236,0)",
borderColor: "rgba(0,0,0,0.2)",
},
emphasis: {
// 选中的区域颜色及阴影效果等
areaColor: "rgba(255,180,0,0.8)",
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
},
},
data,
},
],
};
myChart.setOption(option);
},
cityMap(id, cityname, data) {
var myChart = echarts.init(document.getElementById(id));
var option = {
tooltip: {
//悬浮弹框
triggerOn: "click", //提示框触发的条件
enterable: true,
formatter(data) {
//[{} ] data={}
return data.name;
},
},
visualMap: [
{
//映射高亮颜色
orient: "vertical", //垂直
type: "piecewise", //离散
bottom: 0,
pieces: [
// 配置颜色区间
{
min: 0,
max: 0,
color: "#FFFFFF",
},
{
min: 1,
max: 10,
color: "#FDFDCF",
},
{
min: 10,
max: 100,
color: "#FE9E83",
},
{
min: 100,
max: 500,
color: "#E55A4E",
},
{
min: 500,
max: 10000,
color: "#4F070D",
},
],
},
],
series: [
{
name: "市",
type: "map", //地图
map: cityname, //中国地图
roam: false,
zoom: 1.2,
aspectScale: 0.75,
top: 40,
layoutCenter: ["5%", "5%"],
label: {
normal: {
show: true,
textStyle: {
fontSize: 8,
},
},
},
itemStyle: {
normal: {
areaColor: "rgba(0,255,236,0)",
borderColor: "rgba(0,0,0,0.2)",
},
emphasis: {
// 选中的区域颜色及阴影效果等
areaColor: "rgba(255,180,0,0.8)",
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
},
},
data,
},
],
};
myChart.setOption(option);
},
};
},
},
});
};
export default install;
+22
View File
@@ -0,0 +1,22 @@
import Vue from "vue";
import {
Tab,
Tabs,
Cascader,
Field,
Popup,
Button,
IndexBar,
IndexAnchor,
Cell,
} from "vant";
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Cascader);
Vue.use(Field);
Vue.use(Popup);
Vue.use(Button);
Vue.use(IndexBar);
Vue.use(IndexAnchor);
Vue.use(Cell);
+37
View File
@@ -1,6 +1,12 @@
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import CovidTest from "../views/CovidTest.vue";
import CovidRiskAreas from "../views/CovidRiskAreas.vue";
import CovidPrevention from "../views/CovidPrevention.vue";
import ChinaCities from "../views/Map/ChinaCities.vue";
import TravelAdvisory from "../views/TravelAdvisory.vue";
import SelectCity from "../views/SelectCity.vue";
Vue.use(VueRouter);
@@ -10,6 +16,37 @@ const routes = [
name: "home",
component: HomeView,
},
{
path: "/covidtest",
name: "CovidTest",
component: CovidTest,
},
{
path: "/riskareas",
name: "RiskAreas",
component: CovidRiskAreas,
},
{
path: "/prevention",
name: "Prevention",
component: CovidPrevention,
},
{
path: "/cities/:cityname",
name: "ChinaCities",
component: ChinaCities,
props: true,
},
{
path: "/travel",
name: "TravelAdvisory",
component: TravelAdvisory,
},
{
path: "/selectcity",
name: "SelectCity",
component: SelectCity,
},
];
const router = new VueRouter({
+191
View File
@@ -0,0 +1,191 @@
export default {
"Afghanistan": "阿富汗",
"Albania": "阿尔巴尼亚",
"Algeria": "阿尔及利亚",
"Angola": "安哥拉",
"Argentina": "阿根廷",
"Armenia": "亚美尼亚",
"Australia": "澳大利亚",
"Austria": "奥地利",
"Azerbaijan": "阿塞拜疆",
"Bahamas": "巴哈马",
"Bahrain": "巴林",
"Bangladesh": "孟加拉国",
"Belarus": "白俄罗斯",
"Belgium": "比利时",
"Belize": "伯利兹",
"Benin": "贝宁",
"Bhutan": "不丹",
"Bolivia": "玻利维亚",
"Bosnia and Herz.": "波斯尼亚和黑塞哥维那",
"Botswana": "博茨瓦纳",
"Brazil": "巴西",
"British Virgin Islands": "英属维京群岛",
"Brunei": "文莱",
"Bulgaria": "保加利亚",
"Burkina Faso": "布基纳法索",
"Burundi": "布隆迪",
"Cambodia": "柬埔寨",
"Cameroon": "喀麦隆",
"Canada": "加拿大",
"Cape Verde": "佛得角",
"Cayman Islands": "开曼群岛",
"Central African Rep.": "中非共和国",
"Chad": "乍得",
"Chile": "智利",
"China": "中国",
"Colombia": "哥伦比亚",
"Comoros": "科摩罗",
"Congo": "刚果",
"Costa Rica": "哥斯达黎加",
"Croatia": "克罗地亚",
"Cuba": "古巴",
"Cyprus": "塞浦路斯",
"Czech Rep.": "捷克共和国",
"Côte d'Ivoire": "科特迪瓦",
"Dem. Rep. Congo": "刚果民主共和国",
"Dem. Rep. Korea": "朝鲜",
"Denmark": "丹麦",
"Djibouti": "吉布提",
"Dominican Rep.": "多米尼加共和国",
"Ecuador": "厄瓜多尔",
"Egypt": "埃及",
"El Salvador": "萨尔瓦多",
"Equatorial Guinea": "赤道几内亚",
"Eritrea": "厄立特里亚",
"Estonia": "爱沙尼亚",
"Ethiopia": "埃塞俄比亚",
"Falkland Is.": "福克兰群岛",
"Fiji": "斐济",
"Finland": "芬兰",
"Fr. S. Antarctic Lands": "所罗门群岛",
"France": "法国",
"Gabon": "加蓬",
"Gambia": "冈比亚",
"Georgia": "格鲁吉亚",
"Germany": "德国",
"Ghana": "加纳",
"Greece": "希腊",
"Greenland": "格陵兰岛",
"Guatemala": "危地马拉",
"Guinea": "几内亚",
"Guinea-Bissau": "几内亚比绍",
"Guyana": "圭亚那",
"Haiti": "海地",
"Honduras": "洪都拉斯",
"Hungary": "匈牙利",
"Iceland": "冰岛",
"India": "印度",
"Indonesia": "印度尼西亚",
"Iran": "伊朗",
"Iraq": "伊拉克",
"Ireland": "爱尔兰",
"Isle of Man": "马恩岛",
"Israel": "以色列",
"Italy": "意大利",
"Jamaica": "牙买加",
"Japan": "日本",
"Jordan": "约旦",
"Kazakhstan": "哈萨克斯坦",
"Kenya": "肯尼亚",
"Korea": "韩国",
"Kuwait": "科威特",
"Kyrgyzstan": "吉尔吉斯斯坦",
"Lao PDR": "老挝",
"Latvia": "拉脱维亚",
"Lebanon": "黎巴嫩",
"Lesotho": "莱索托",
"Liberia": "利比里亚",
"Libya": "利比亚",
"Lithuania": "立陶宛",
"Luxembourg": "卢森堡",
"Macedonia": "马其顿",
"Madagascar": "马达加斯加",
"Malawi": "马拉维",
"Malaysia": "马来西亚",
"Maldives": "马尔代夫",
"Mali": "马里",
"Malta": "马耳他",
"Mauritania": "毛利塔尼亚",
"Mauritius": "毛里求斯",
"Mexico": "墨西哥",
"Moldova": "摩尔多瓦",
"Monaco": "摩纳哥",
"Mongolia": "蒙古",
"Montenegro": "黑山共和国",
"Morocco": "摩洛哥",
"Mozambique": "莫桑比克",
"Myanmar": "缅甸",
"Namibia": "纳米比亚",
"Nepal": "尼泊尔",
"Netherlands": "荷兰",
"New Caledonia": "新喀里多尼亚",
"New Zealand": "新西兰",
"Nicaragua": "尼加拉瓜",
"Niger": "尼日尔",
"Nigeria": "尼日利亚",
"Norway": "挪威",
"Oman": "阿曼",
"Pakistan": "巴基斯坦",
"Panama": "巴拿马",
"Papua New Guinea": "巴布亚新几内亚",
"Paraguay": "巴拉圭",
"Peru": "秘鲁",
"Philippines": "菲律宾",
"Poland": "波兰",
"Portugal": "葡萄牙",
"Puerto Rico": "波多黎各",
"Qatar": "卡塔尔",
"Reunion": "留尼旺",
"Romania": "罗马尼亚",
"Russia": "俄罗斯",
"Rwanda": "卢旺达",
"S. Geo. and S. Sandw. Is.": "南乔治亚和南桑威奇群岛",
"S. Sudan": "南苏丹",
"San Marino": "圣马力诺",
"Saudi Arabia": "沙特阿拉伯",
"Senegal": "塞内加尔",
"Serbia": "塞尔维亚",
"Sierra Leone": "塞拉利昂",
"Singapore": "新加坡",
"Slovakia": "斯洛伐克",
"Slovenia": "斯洛文尼亚",
"Solomon Is.": "所罗门群岛",
"Somalia": "索马里",
"South Africa": "南非",
"Spain": "西班牙",
"Sri Lanka": "斯里兰卡",
"Sudan": "苏丹",
"Suriname": "苏里南",
"Swaziland": "斯威士兰",
"Sweden": "瑞典",
"Switzerland": "瑞士",
"Syria": "叙利亚",
"Tajikistan": "塔吉克斯坦",
"Tanzania": "坦桑尼亚",
"Thailand": "泰国",
"Togo": "多哥",
"Tonga": "汤加",
"Trinidad and Tobago": "特立尼达和多巴哥",
"Tunisia": "突尼斯",
"Turkey": "土耳其",
"Turkmenistan": "土库曼斯坦",
"U.S. Virgin Islands": "美属维尔京群岛",
"Uganda": "乌干达",
"Ukraine": "乌克兰",
"United Arab Emirates": "阿拉伯联合酋长国",
"United Kingdom": "英国",
"United States": "美国",
"Uruguay": "乌拉圭",
"Uzbekistan": "乌兹别克斯坦",
"Vanuatu": "瓦努阿图",
"Vatican City": "梵蒂冈城",
"Venezuela": "委内瑞拉",
"Vietnam": "越南",
"W. Sahara": "西撒哈拉",
"Yemen": "也门",
"Yugoslavia": "南斯拉夫",
"Zaire": "扎伊尔",
"Zambia": "赞比亚",
"Zimbabwe": "津巴布韦"
}
+39
View File
@@ -0,0 +1,39 @@
//导入国内 世界 省份
import 'echarts/map/js/china';
import 'echarts/map/js/world'
import 'echarts/map/js/province/beijing';
import 'echarts/map/js/province/shanghai';
import 'echarts/map/js/province/neimenggu';
import 'echarts/map/js/province/tianjin';
import 'echarts/map/js/province/xinjiang';
import 'echarts/map/js/province/hebei';
import 'echarts/map/js/province/henan';
import 'echarts/map/js/province/shandong';
import 'echarts/map/js/province/shanxi';
import 'echarts/map/js/province/jiangsu';
import 'echarts/map/js/province/jiangxi';
import 'echarts/map/js/province/jilin';
import 'echarts/map/js/province/gansu';
import 'echarts/map/js/province/guangdong';
import 'echarts/map/js/province/guangxi';
import 'echarts/map/js/province/guizhou';
import 'echarts/map/js/province/qinghai';
import 'echarts/map/js/province/xianggang';
import 'echarts/map/js/province/xizang';
import 'echarts/map/js/province/zhejiang';
import 'echarts/map/js/province/heilongjiang';
import 'echarts/map/js/province/ningxia';
import 'echarts/map/js/province/neimenggu';
import 'echarts/map/js/province/sichuan';
import 'echarts/map/js/province/yunnan';
import 'echarts/map/js/province/hubei';
import 'echarts/map/js/province/hunan';
import 'echarts/map/js/province/anhui';
import 'echarts/map/js/province/guizhou';
import 'echarts/map/js/province/liaoning'
import 'echarts/map/js/province/taiwan';
import 'echarts/map/js/province/hainan';
import 'echarts/map/js/province/fujian';
import 'echarts/map/js/province/chongqing';
import 'echarts/map/js/province/shanxi1';
+40
View File
@@ -0,0 +1,40 @@
<template>
<section class="info">
<article class="title">病毒信息</article>
<aside class="content">
<p>病毒:SARS-CoV-2,导致疾病命名 COVID-19</p>
<p>传染源:新冠肺炎的患者。无症状感染者也可能成为感染源。</p>
<p>
传播途径:经呼吸道飞沫、接触传播是主要的传播途径。气溶胶传播和消化道等传播途径尚未明确。
</p>
<p>
易感人群:人群普遍易感。老年人及有基础疾病者感染后病情较重,儿童及婴儿也有发病
</p>
<p>
潜伏期:一般为3~7天,最长不超过14天,潜伏期内可能存在感染性,其中无症状比例感染性非常罕见
</p>
<p>宿主:野生动物,可能为中华菊头蝠</p>
</aside>
</section>
</template>
<script>
export default {
name: "CovidInfo",
};
</script>
<style lang="less" scoped>
.info {
padding: 0.2rem;
.title {
border-left: 0.04rem solid #002fa7;
padding-left: 0.1rem;
margin-bottom: 0.2rem;
font-size: 0.25rem;
}
p {
color: #666;
}
}
</style>
+51
View File
@@ -0,0 +1,51 @@
<template>
<section class="wuzi">
<img src="../assets/images/wuzi.png" alt="Covid Supplies" />
<article class="wrapper">
<van-tabs v-model="active" animated>
<van-tab v-for="item in arr" :title="item.title" :key="item.title">
<img :src="item.img" alt="" />
</van-tab>
</van-tabs>
</article>
</section>
</template>
<script>
import img1 from "../assets/images/jiujing.png";
import img2 from "../assets/images/kouzhao.png";
export default {
name: "CovidPrevention",
data() {
return {
active: 1,
arr: [
{
img: img1,
title: "消毒剂",
},
{
img: img2,
title: "口罩",
},
],
};
},
};
</script>
<style lang="less" scoped>
img {
width: 100%;
}
.wuzi {
background: #3343ff;
}
.wrapper {
background: #3343ff;
padding: 0.2rem;
}
</style>
+138
View File
@@ -0,0 +1,138 @@
<template>
<section class="bg">
<section class="content">
<article class="th">全国风险地区汇总</article>
<template v-if="high.length > 0">
<section class="title">
<img src="../assets/images/high.png" alt="high risk warning" />
高风险地区{{ high.length }}个
<span class="time">
截至北京时间 {{ formatDate(covData.modifyTime) }}
</span>
</section>
<ul class="list">
<li v-for="(item, index) in high" :key="index">
{{ item }}
</li>
</ul>
</template>
<template v-if="mid.length > 0">
<section class="title">
<img src="../assets/images/mid.png" alt="mid risk warning" />
中风险地区{{ mid.length }}个
</section>
<ul class="list">
<li v-for="(item, index) in mid" :key="index">{{ item }}</li>
</ul>
</template>
</section>
</section>
</template>
<script>
import api from "@/api/index";
export default {
name: "CovidRiskAreas",
data() {
return {
high: [],
mid: [],
covData: {},
};
},
methods: {
formatDate(num) {
let date = new Date(num);
var YY = date.getFullYear() + "-";
var MM =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var DD =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var hh =
(date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
var mm =
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
return YY + MM + DD + hh + mm;
},
},
created() {
api
.getCovInfo({
key: process.env.VUE_APP_TIANAPI_KEY,
})
.then((res) => {
let data = res.data.newslist[0].desc;
this.covData = {
modifyTime: data.modifyTime,
};
let riskarea = res.data.newslist[0].riskarea;
this.high = riskarea.high;
this.mid = riskarea.mid;
});
},
};
</script>
<style lang="less" scoped>
.area {
background: #f5f5f5;
}
.bg {
height: 3.6rem;
background: url("../assets/images/area.png");
background-size: cover;
padding-top: 3rem;
}
.content {
background: #fff;
margin-left: 0.2rem;
margin-right: 0.2rem;
padding: 0.2rem;
border-radius: 0.2rem;
min-height: 4rem;
margin-bottom: 0.2rem;
.th {
margin-bottom: 0.3rem;
font-size: 0.34rem;
}
.th:before {
display: inline-block;
width: 0.1rem;
height: 0.3rem;
margin-right: 0.1rem;
background-color: #4169e2;
content: "";
vertical-align: middle;
}
.title {
font-size: 0.3rem;
margin-bottom: 0.3rem;
.time {
float: right;
font-size: 0.15rem;
color: #999;
text-align: right;
}
img {
width: 0.4rem;
vertical-align: top;
}
}
.list {
li {
margin-bottom: 0.2rem;
color: #333;
background: #f7f7f7;
padding: 0.1rem;
border-radius: 0.1rem;
letter-spacing: 0.01rem;
line-height: 0.2rem;
}
}
}
</style>
+17
View File
@@ -0,0 +1,17 @@
<template>
<section>
<img src="../assets/images/hesuan.jpg" alt="Covid Test Image" />
</section>
</template>
<script>
export default {
name: "CovidTest",
};
</script>
<style scoped>
img {
width: 100%;
}
</style>
+63 -2
View File
@@ -1,12 +1,73 @@
<template>
<div class="home"></div>
<div class="home">
<TheHeader />
<CovidInfo />
<CovidNews :covNews="covNews" />
<CovidNav />
<CovidData :covData="covData" />
<ChinaMap />
<WorldMap />
<VueSwiper />
</div>
</template>
<script>
import api from "@/api/index";
// @ is an alias to /src
import TheHeader from "@/components/TheHeader.vue";
import CovidNews from "@/components/CovidNews.vue";
import CovidNav from "@/components/CovidNav.vue";
import CovidData from "@/components/CovidData.vue";
// Import view
import CovidInfo from "@/views/CovidInfo.vue";
import ChinaMap from "@/views/Map/ChinaMap.vue";
import WorldMap from "@/views/Map/WorldMap.vue";
import VueSwiper from "@/views/Swiper/VueSwiper.vue";
export default {
name: "HomeView",
components: {},
components: {
TheHeader,
CovidInfo,
CovidNews,
CovidNav,
CovidData,
ChinaMap,
WorldMap,
VueSwiper,
},
data() {
return {
covNews: [],
covData: {},
};
},
created() {
api
.getCovInfo({
key: process.env.VUE_APP_TIANAPI_KEY,
})
.then((res) => {
let data = res.data.newslist[0].desc;
this.covNews = res.data.newslist[0].news;
this.covData = {
currentConfirmedCount: data.currentConfirmedCount,
currentConfirmedIncr: data.currentConfirmedIncr,
confirmedCount: data.confirmedCount,
confirmedIncr: data.confirmedIncr,
suspectedCount: data.suspectedCount,
suspectedIncr: data.suspectedIncr,
curedCount: data.curedCount,
curedIncr: data.curedIncr,
deadCount: data.deadCount,
deadIncr: data.deadIncr,
seriousCount: data.seriousCount,
seriousIncr: data.seriousIncr,
modifyTime: data.modifyTime,
};
});
},
};
</script>
+40
View File
@@ -0,0 +1,40 @@
<template>
<section>
<h2>{{ cityname }}界面</h2>
<section id="main" style="width: 7rem; height: 7.5rem"></section>
</section>
</template>
<script>
import api from "../../api/index";
export default {
name: "ChinaCities",
props: ["cityname"],
mounted() {
api.getCityData(this.cityname).then((res) => {
let arr = res.data.retdata.subList;
let newArr = [];
arr.forEach((ele) => {
let obj = {};
if (
ele.city.endsWith("区") ||
ele.city.endsWith("州") ||
ele.city.endsWith("盟") ||
ele.city.endsWith("旗")
) {
obj.name = ele.city;
} else {
obj.name = ele.city + "市";
}
obj.value = ele.confirm;
newArr.push(obj);
});
this.$myChart.cityMap("main", this.cityname, newArr);
});
},
};
</script>
<style>
</style>
+86
View File
@@ -0,0 +1,86 @@
<template>
<section class="info">
<section class="title">国内疫情地图</section>
<van-tabs v-model="active" animated @change="change">
<van-tab title="现存确诊">
<section id="nowMain" style="width: 7.5rem; height: 7rem"></section>
</van-tab>
<van-tab title="累计确诊">
<section id="main" style="width: 7.5rem; height: 7rem"></section>
</van-tab>
</van-tabs>
</section>
</template>
<script>
import api from "@/api/index";
export default {
name: "ChinaMap",
data() {
return {
active: 0,
arr: [],
};
},
mounted() {
api
.getChinaData({
appid: process.env.VUE_APP_WADATA_APPID,
sign: process.env.VUE_APP_WADATA_SIGN,
})
.then((res) => {
let cities = res.data.retdata;
if (!cities) {
this.$myChart.chinaMap("nowMain", []);
return;
}
let arr = [];
let nowArr = [];
for (let i = 0; i < cities.length; i++) {
let obj = {};
obj.name = cities[i].xArea;
obj.value = cities[i].confirm;
let now = {};
now.name = cities[i].xArea;
now.value = cities[i].curConfirm;
arr.push(obj);
nowArr.push(now);
}
this.arr = arr;
this.$nextTick(() => {
this.$myChart.chinaMap("nowMain", nowArr);
});
});
},
methods: {
change(title) {
if (title == 1) {
this.$nextTick(() => {
this.$myChart.chinaMap("main", this.arr);
});
}
},
},
};
</script>
<style lang="less" scoped>
.title {
margin: 0.2rem;
padding-top: 0.2rem;
border-top: 1px solid #eee;
}
.title::before {
content: "";
border-left: 0.04rem solid #002fa7;
padding-left: 0.1rem;
margin-bottom: 0.2rem;
font-size: 0.25rem;
}
#main,
#nowMain {
background: #f5f5f5;
margin: 0 auto;
}
</style>
+55
View File
@@ -0,0 +1,55 @@
<template>
<section>
<section class="title">世界疫情地图</section>
<section id="main" style="width: 7.5rem; height: 7rem"></section>
</section>
</template>
<script>
import api from "../../api/index";
export default {
name: "WorldMap",
mounted() {
api
.getWorldData({
appid: process.env.VUE_APP_WADATA_APPID,
sign: process.env.VUE_APP_WADATA_SIGN,
})
.then((res) => {
let worlds = res.data.retdata;
if (!worlds) {
this.$myChart.worldMap("main", []);
return;
}
let arr = [];
for (let i = 0; i < worlds.length; i++) {
let obj = {};
obj.name = worlds[i].xArea;
obj.value = worlds[i].confirm;
arr.push(obj);
}
this.$myChart.worldMap("main", arr);
});
},
};
</script>
<style lang="less" scoped>
.title {
margin: 0.2rem;
padding-top: 0.2rem;
border-top: 1px solid #eee;
}
.title::before {
content: "";
border-left: 0.04rem solid #002fa7;
padding-left: 0.1rem;
margin-bottom: 0.2rem;
font-size: 0.25rem;
}
#main {
background: #f5f5f5;
margin: 0 auto;
}
</style>
+14
View File
@@ -0,0 +1,14 @@
<template>
<section>
<h2>城市选择</h2>
</section>
</template>
<script>
export default {
name: "SelectCity",
};
</script>
<style>
</style>
+97
View File
@@ -0,0 +1,97 @@
<template>
<section>
<swiper ref="mySwiper" :options="swiperOptions">
<swiper-slide v-for="item in banner" :key="item.title">
<img :src="item.image" />
</swiper-slide>
<section class="swiper-pagination" slot="pagination"></section>
</swiper>
<ul class="list">
<li
v-for="(item, index) in banner"
:key="item.title"
:class="{ active: index == num }"
@click="changeSwiper(index)"
>
{{ item.title }}
</li>
</ul>
</section>
</template>
<script>
import api from "../../api/index";
export default {
name: "VueSwiper",
data() {
let that = this;
return {
num: 0,
arr: [1, 2, 3, 4, 5],
banner: [],
swiperOptions: {
pagination: {
el: ".swiper-pagination",
},
autoplay: {
delay: 3000,
stopOnLastSlide: false,
disableOnInteraction: false,
},
loop: true,
on: {
slideChangeTransitionStart: function () {
if (this.activeIndex == that.arr.length + 1) {
that.num = 0;
} else {
that.num = this.activeIndex - 1;
}
},
},
},
};
},
computed: {
swiper() {
return this.$refs.mySwiper.$swiper;
},
},
mounted() {
api.getSwiperBanner().then((res) => {
this.banner = res.data.result;
});
},
methods: {
changeSwiper(index) {
this.num = index;
this.swiper.slideTo(index + 1, 1000, false);
},
},
};
</script>
<style lang='less' scoped>
img {
width: 100%;
}
.list {
display: flex;
li {
flex: 1;
padding: 0.1rem;
font-size: 0.24rem;
line-height: 0.32rem;
margin: 0.1rem;
background: #eee;
color: #666;
text-align: center;
display: flex;
align-items: center;
}
.active {
background: #3343ff;
color: #fff;
}
}
</style>
+142
View File
@@ -0,0 +1,142 @@
<template>
<section>
<article class="title">疫情期间出行防疫政策</article>
<van-field
v-model="fromCity"
is-link
readonly
label="出发城市"
placeholder="请选择出发城市"
@click="show = true"
/>
<van-popup v-model="show" round position="bottom">
<van-cascader
v-model="cascaderValue"
title="请选择出发城市"
:options="options"
@close="show = false"
@finish="onFinish"
/>
</van-popup>
<van-field
v-model="toCity"
is-link
readonly
label="到达城市"
placeholder="请选择到达城市"
@click="show2 = true"
/>
<van-popup v-model="show2" round position="bottom">
<van-cascader
v-model="cascaderValue2"
title="请选择到达城市"
:options="options"
@close="show2 = false"
@finish="toFinish"
/>
</van-popup>
<section class="search">
<van-button type="primary" size="large" @click="search"
>查询疫情防疫</van-button
>
</section>
<section class="content">
<article>出发城市:</article>
<article>到达城市:</article>
</section>
</section>
</template>
<script>
import api from "../api/index";
export default {
name: "TravelAdvisory",
data() {
return {
show: false,
show2: false,
fromCity: "",
toCity: "",
from: "",
to: "",
cascaderValue: "",
cascaderValue2: "",
from_info: "",
to_info: "",
// 选项列表,children 代表子选项,支持多级嵌套
options: [
{
text: "浙江省",
value: "330000",
children: [{ text: "杭州市", value: "330100" }],
},
{
text: "江苏省",
value: "320000",
children: [{ text: "南京市", value: "320100" }],
},
],
};
},
methods: {
// 全部选项选择完毕后,会触发 finish 事件
onFinish({ value, selectedOptions }) {
this.from = value;
this.show = false;
this.fromCity = selectedOptions.map((option) => option.text).join("/");
},
toFinish({ value, selectedOptions }) {
this.to = value;
this.show2 = false;
this.toCity = selectedOptions.map((option) => option.text).join("/");
},
search() {
api
.getTravelData({
key: process.env.VUE_APP_JUHE,
from: this.from,
to: this.to,
})
.then((res) => {
this.from_info = res.data.from_info;
this.to_info = res.data.to_info;
});
},
},
created() {
api
.getTravel({
key: process.env.VUE_APP_JUHE,
})
.then((res) => {
let result = res.data.result;
let arr = [];
result.forEach((item) => {
let obj = {};
obj.text = item.province;
obj.value = item.province_id;
obj.children = [];
item.citys.forEach((ele) => {
let child = {};
child.text = ele.city;
child.value = ele.city_id;
obj.children.push(child);
});
arr.push(obj);
});
});
},
};
</script>
<style lang="less" scoped>
.title {
padding: 0.2rem;
}
.search {
margin: 0.2rem;
}
</style>