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
28d84269
Commit
28d84269
authored
Mar 02, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230302
parent
b5a22cbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
8 deletions
+20
-8
apps/models.py
+0
-0
apps/view_atlas/view.py
+19
-7
apps/view_index/view.py
+1
-1
apps/view_xiaocx/view.py
+0
-0
No files found.
apps/models.py
View file @
28d84269
This diff is collapsed.
Click to expand it.
apps/view_atlas/view.py
View file @
28d84269
...
@@ -628,7 +628,10 @@ def industry_policy():
...
@@ -628,7 +628,10 @@ def industry_policy():
policy_type
=
req_dict
.
get
(
"policy_type"
)
# 政策类型,全国、国务院
policy_type
=
req_dict
.
get
(
"policy_type"
)
# 政策类型,全国、国务院
policy_year
=
req_dict
.
get
(
"policy_year"
)
# 政策年份
policy_year
=
req_dict
.
get
(
"policy_year"
)
# 政策年份
policy_name
=
req_dict
.
get
(
"policy_name"
)
# 政策名称
policy_name
=
req_dict
.
get
(
"policy_name"
)
# 政策名称
token
=
request
.
headers
[
"token"
]
user_obj
=
verify_token
(
token
)
if
not
user_obj
:
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
'用户未登录。'
)
# 校验参数完整性
# 校验参数完整性
if
not
all
([
page
,
perpage
]):
if
not
all
([
page
,
perpage
]):
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数不完整"
)
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数不完整"
)
...
@@ -771,17 +774,25 @@ def industry_policy():
...
@@ -771,17 +774,25 @@ def industry_policy():
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库查询错误"
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库查询错误"
)
# 封装政策数据
# 封装政策数据
policy_data
=
{
policy_data
=
[]
"policy_data"
:
[{
data
=
{}
for
i
in
indu_policy
:
if
i
in
user_obj
.
industry_policy
:
is_collect
=
'True'
else
:
is_collect
=
'False'
policy_data
.
append
({
"id"
:
i
.
id
,
"id"
:
i
.
id
,
"name"
:
i
.
name
,
"name"
:
i
.
name
,
"org"
:
i
.
org
,
"org"
:
i
.
org
,
"file"
:
i
.
file
,
"file"
:
i
.
file
,
"is_collect"
:
is_collect
,
"pubdate"
:
(
i
.
pubdate
)
.
strftime
(
"
%
Y-
%
m-
%
d"
),
"pubdate"
:
(
i
.
pubdate
)
.
strftime
(
"
%
Y-
%
m-
%
d"
),
}
for
i
in
indu_policy
],
}
)
"size"
:
size
data
.
update
({
"size"
:
size
})
}
data
.
update
({
"policy_data"
:
policy_data
})
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"政策数据查询成功"
,
data
=
policy_
data
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"政策数据查询成功"
,
data
=
data
)
# 产业政策详情信息-复用招商驾驶舱政策详情接口
# 产业政策详情信息-复用招商驾驶舱政策详情接口
...
@@ -921,6 +932,7 @@ def get_zaiti_detail_data():
...
@@ -921,6 +932,7 @@ def get_zaiti_detail_data():
else
:
else
:
pass
pass
data
=
{
data
=
{
"id"
:
induzone
.
id
,
"district"
:
induzone
.
district
,
"district"
:
induzone
.
district
,
"cate"
:
induzone
.
cate
,
"cate"
:
induzone
.
cate
,
"area"
:
induzone
.
area
,
"area"
:
induzone
.
area
,
...
...
apps/view_index/view.py
View file @
28d84269
...
@@ -523,7 +523,6 @@ def attract_video():
...
@@ -523,7 +523,6 @@ def attract_video():
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查询成功"
,
data
=
{
"video_url"
:
video_url
,
"image_url"
:
image_url
})
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查询成功"
,
data
=
{
"video_url"
:
video_url
,
"image_url"
:
image_url
})
else
:
else
:
return
jsonify
(
code
=
RET
.
DATAERR
,
msg
=
"区县名称有误,没有相关视频"
)
return
jsonify
(
code
=
RET
.
DATAERR
,
msg
=
"区县名称有误,没有相关视频"
)
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"暂无视频"
,
data
=
{
"url"
:
""
})
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"暂无视频"
,
data
=
{
"url"
:
""
})
...
@@ -538,6 +537,7 @@ def keyproject():
...
@@ -538,6 +537,7 @@ def keyproject():
try
:
try
:
project
=
Project
.
query
.
get
(
id
)
project
=
Project
.
query
.
get
(
id
)
data
=
{
data
=
{
"id"
:
project
.
id
,
# 工程名
"name"
:
project
.
name
,
# 工程名
"name"
:
project
.
name
,
# 工程名
"district"
:
project
.
district
,
# 区县名称
"district"
:
project
.
district
,
# 区县名称
"type"
:
project
.
type
,
# 工程类型
"type"
:
project
.
type
,
# 工程类型
...
...
apps/view_xiaocx/view.py
View file @
28d84269
This diff is collapsed.
Click to expand it.
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