Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjntServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
zjntServer
Commits
c0df8aeb
Commit
c0df8aeb
authored
Dec 25, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e17adcb5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
getData.ts
src/biz/getData.ts
+30
-0
No files found.
src/biz/getData.ts
View file @
c0df8aeb
...
...
@@ -4,6 +4,7 @@
import
{
getGuangFu
}
from
"../data/interface/dataInterface"
;
import
{
getKeyValueOut
,
getOnceYBarChartOut
}
from
"../dataPackage/out"
;
import
{
get
}
from
"../util/request"
;
let
guangfuData
=
{
...
...
@@ -175,6 +176,35 @@ export async function getData(req, res) {
let
ret
:
any
=
{};
ret
[
'ztsj'
]
=
getKeyValueOut
(
'整体数据'
,
guangfuData
.
ztsj
);
//source=pc&weather_type=observe&province=上海&city=上海&county=浦东新区
let
query
=
{
source
:
"pc"
,
weather_type
:
"observe"
,
province
:
"上海"
,
city
:
"上海"
,
county
:
"浦东新区"
}
let
weatherData
:
any
=
await
get
(
"https://wis.qq.com/weather/common"
,
query
);
let
weather
=
{
"天气"
:
""
,
"温度"
:
""
,
"风向"
:
""
,
"风力等级"
:
""
,
"湿度"
:
""
,
"降水量"
:
""
}
if
(
weatherData
)
{
let
observe
=
weatherData
.
body
.
data
.
observe
;
weather
=
{
"天气"
:
observe
.
weather
,
"温度"
:
observe
.
degree
,
"风向"
:
observe
.
wind_direction_name
,
"风力等级"
:
observe
.
wind_power
,
"湿度"
:
observe
.
humidity
,
"降水量"
:
observe
.
precipitation
}
}
ret
[
'weather'
]
=
{
title
:
"天气"
,
dataList
:
weather
};
res
.
send
(
ret
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment