Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
714087f2
Commit
714087f2
authored
Jan 07, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c8e38a7e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
33 deletions
+24
-33
apps/__init__.py
+6
-6
apps/attract/__init__.py
+1
-1
apps/attract/view.py
+0
-0
apps/view_attract/view.py
+17
-26
No files found.
apps/__init__.py
View file @
714087f2
...
@@ -91,7 +91,7 @@ def creat_app(config_name):
...
@@ -91,7 +91,7 @@ def creat_app(config_name):
# from apps.user_pc import api_user
# from apps.user_pc import api_user
from
apps.atlas
import
api_atlas
from
apps.atlas
import
api_atlas
from
apps.radar
import
api_radar
from
apps.radar
import
api_radar
from
apps.attract
import
api_
att
from
apps.attract
import
api_
map
# from apps.view_360 import api_portraits
# from apps.view_360 import api_portraits
# from apps.view_choose_address import api_address
# from apps.view_choose_address import api_address
# from apps.manage import api_power
# from apps.manage import api_power
...
@@ -99,11 +99,11 @@ def creat_app(config_name):
...
@@ -99,11 +99,11 @@ def creat_app(config_name):
# from apps.view_mobile import api_mobile
# from apps.view_mobile import api_mobile
# app.register_blueprint(api_user, url_prefix='/api/user')
# app.register_blueprint(api_user, url_prefix='/api/user')
app
.
register_blueprint
(
api_radar
,
url_prefix
=
'/api/radar'
)
app
.
register_blueprint
(
api_radar
,
url_prefix
=
'/api/radar'
)
# 产业招商雷达
app
.
register_blueprint
(
api_atlas
,
url_prefix
=
'/api/atlas'
)
app
.
register_blueprint
(
api_atlas
,
url_prefix
=
'/api/atlas'
)
# 产业招商图谱
app
.
register_blueprint
(
api_
att
,
url_prefix
=
'/api/att'
)
app
.
register_blueprint
(
api_
map
,
url_prefix
=
'/api/map'
)
# 产业招商地图
#
app
.
register_blueprint
(
api_attract
,
url_prefix
=
'/api/attract/industry'
)
app
.
register_blueprint
(
api_attract
,
url_prefix
=
'/api/attract/industry'
)
# 招商驾驶舱
# app.register_blueprint(api_portraits, url_prefix="/api/portraits/industry")
# app.register_blueprint(api_portraits, url_prefix="/api/portraits/industry")
# app.register_blueprint(api_address, url_prefix="/api/address/industry")
# app.register_blueprint(api_address, url_prefix="/api/address/industry")
# app.register_blueprint(api_power, url_prefix="/api/power")
# app.register_blueprint(api_power, url_prefix="/api/power")
...
...
apps/attract/__init__.py
View file @
714087f2
from
flask
import
Blueprint
from
flask
import
Blueprint
# 创建蓝图对象
# 创建蓝图对象
api_
att
=
Blueprint
(
"api_att
"
,
__name__
)
api_
map
=
Blueprint
(
"api_map
"
,
__name__
)
from
.
import
view
from
.
import
view
...
...
apps/attract/view.py
View file @
714087f2
This diff is collapsed.
Click to expand it.
apps/view_attract/view.py
View file @
714087f2
...
@@ -186,15 +186,6 @@ def project():
...
@@ -186,15 +186,6 @@ def project():
"value"
:
project
.
money
})
"value"
:
project
.
money
})
industry_nums
.
append
({
"name"
:
project
.
type
,
industry_nums
.
append
({
"name"
:
project
.
type
,
"value"
:
project
.
number
})
"value"
:
project
.
number
})
# money_list = []
#
# types = project.type
# money = project.money
# if types in types_list:
# industry_dic[types].append(money)
# money_list.append(money)
# industry_dic.update({types:money_list})
# types_list.append(types)
# 点击区县后的联动数据
# 点击区县后的联动数据
else
:
else
:
...
@@ -639,20 +630,20 @@ def enterprise_detail():
...
@@ -639,20 +630,20 @@ def enterprise_detail():
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data
)
# 删除缓存
#
#
删除缓存
@api_attract.route
(
"/deleteX"
,
methods
=
[
"GET"
])
#
@api_attract.route("/deleteX", methods=["GET"])
def
deleteX
():
#
def deleteX():
redis_store
.
delete
(
"project-propol"
)
#
redis_store.delete("project-propol")
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"删除成功"
)
#
return jsonify(code=RET.OK, msg="删除成功")
#
#
# 删除缓存
#
#
删除缓存
@api_attract.route
(
"/vis"
,
methods
=
[
"GET"
])
#
@api_attract.route("/vis", methods=["GET"])
def
vis
():
#
def vis():
redis_store
.
delete
(
"project-propol"
)
#
redis_store.delete("project-propol")
return
jsonify
(
code
=
RET
.
OK
,
msg
=
{
"remote_addr"
:
request
.
remote_addr
,
#
return jsonify(code=RET.OK, msg={"remote_addr": request.remote_addr,
"X-Real-Ip"
:
request
.
headers
.
get
(
"X-Real-Ip"
),
#
"X-Real-Ip": request.headers.get("X-Real-Ip"),
"X-Forwarded-For"
:
request
.
headers
.
get
(
"X-Forwarded-For"
),
#
"X-Forwarded-For": request.headers.get("X-Forwarded-For"),
"HOST"
:
request
.
headers
.
get
(
"Host"
),
#
"HOST": request.headers.get("Host"),
"X-Forwarded-Proto"
:
request
.
headers
.
get
(
"X-Forwarded-Proto"
),
#
"X-Forwarded-Proto": request.headers.get("X-Forwarded-Proto"),
})
#
})
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