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
015d6e33
Commit
015d6e33
authored
Dec 08, 2022
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20221208
parent
735c45a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
apps/view_atlas/view.py
+7
-7
apps/view_user/view.py
+1
-1
No files found.
apps/view_atlas/view.py
View file @
015d6e33
...
@@ -380,7 +380,7 @@ def industry_policy():
...
@@ -380,7 +380,7 @@ def industry_policy():
if
industry_level
==
1
:
if
industry_level
==
1
:
if
policy_level
==
1
:
# 国家级
if
policy_level
==
1
:
# 国家级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -391,7 +391,7 @@ def industry_policy():
...
@@ -391,7 +391,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
2
:
# 省级
elif
policy_level
==
2
:
# 省级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -401,7 +401,7 @@ def industry_policy():
...
@@ -401,7 +401,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
3
:
# 市级
elif
policy_level
==
3
:
# 市级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -411,7 +411,7 @@ def industry_policy():
...
@@ -411,7 +411,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
4
:
# 区县
elif
policy_level
==
4
:
# 区县
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -421,7 +421,7 @@ def industry_policy():
...
@@ -421,7 +421,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
5
:
# 开发区
elif
policy_level
==
5
:
# 开发区
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -431,7 +431,7 @@ def industry_policy():
...
@@ -431,7 +431,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
else
:
else
:
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
# InduPolicy.level == "国家级",
# InduPolicy.level == "国家级",
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -494,7 +494,7 @@ def industry_policy():
...
@@ -494,7 +494,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
else
:
else
:
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
or
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
# InduPolicy.level == "国家级",
# InduPolicy.level == "国家级",
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
==
'国务院'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
...
apps/view_user/view.py
View file @
015d6e33
...
@@ -33,7 +33,7 @@ def send_phone_code():
...
@@ -33,7 +33,7 @@ def send_phone_code():
# 获取请求参数,转化字典
# 获取请求参数,转化字典
req_dict
=
request
.
get_json
()
req_dict
=
request
.
get_json
()
mobile
=
req_dict
.
get
(
'mobile'
)
# 手机号
mobile
=
req_dict
.
get
(
'mobile'
)
# 手机号
sms_type
=
req_dict
.
get
(
'sms_type'
)
# 验证码类型
1是登录验证码,2是绑定手机号
验证码
sms_type
=
req_dict
.
get
(
'sms_type'
)
# 验证码类型
验1证码登录,2手机号码绑定,3密码重置
验证码
# 校验参数完整性
# 校验参数完整性
if
not
all
([
mobile
]):
if
not
all
([
mobile
]):
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数不完整"
)
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数不完整"
)
...
...
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