From bb775239b7cba79b7121b887914612c5f1c7db33 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Wed, 28 Feb 2024 10:21:16 +0800 Subject: [PATCH] =?UTF-8?q?CN-1563=20feat:=20=E8=BD=A8=E8=BF=B9=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx_server.conf | 50 ++++++++++++ package.json | 1 + src/mock/location.js | 34 ++++++++ src/utils/api.js | 3 +- src/views/location/Index.vue | 148 ++++++++++++++++++++++++----------- 5 files changed, 191 insertions(+), 45 deletions(-) create mode 100644 nginx_server.conf diff --git a/nginx_server.conf b/nginx_server.conf new file mode 100644 index 00000000..d69e4dff --- /dev/null +++ b/nginx_server.conf @@ -0,0 +1,50 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + client_max_body_size 3072m; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /api { + proxy_pass http://127.0.0.1:8090/; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/package.json b/package.json index 9161ae87..b4d469c4 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "dexie": "~3.2.0", "echarts": "^5.1.1", "element-plus": "~1.0.2-beta.71", + "h3-js": "~3.7.2", "lib-flexible": "^0.3.2", "lodash": "^4.17.21", "maplibre-gl": "3.6.2", diff --git a/src/mock/location.js b/src/mock/location.js index a1d87556..c3b9ae0c 100644 --- a/src/mock/location.js +++ b/src/mock/location.js @@ -300,4 +300,38 @@ if (openMock) { } } }) + Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'v1/locationIntelligence/baseStation.*'), 'get', function (requestObj) { + return { + msg: 'success', + code: 200, + data: { + list: [ + { + longitude: 116.38, + latitude: 39.9 + }, + { + longitude: 116.39, + latitude: 39.9 + }, + { + longitude: 116.383, + latitude: 39.886 + }, + { + longitude: 116.378, + latitude: 39.902 + }, + { + longitude: 116.369, + latitude: 39.91 + }, + { + longitude: 116.38, + latitude: 39.91 + } + ] + } + } + }) } diff --git a/src/utils/api.js b/src/utils/api.js index 56073af9..44352144 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -356,7 +356,8 @@ export const api = { map: apiVersion + '/locationIntelligence/map', density: apiVersion + '/locationIntelligence/population/density', trend: apiVersion + '/locationIntelligence/active/trend', - count: apiVersion + '/locationIntelligence/active/count' + count: apiVersion + '/locationIntelligence/active/count', + baseStation: apiVersion + '/locationIntelligence/baseStation' } } diff --git a/src/views/location/Index.vue b/src/views/location/Index.vue index 71a51ab0..f2cab5d2 100644 --- a/src/views/location/Index.vue +++ b/src/views/location/Index.vue @@ -106,19 +106,19 @@