Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
GaoQuYingJiH5-ASD
Commits
d88c92d1
Commit
d88c92d1
authored
Apr 17, 2025
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:打印请求接口的参数和返回值
parent
19024816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
26 deletions
+12
-26
http.js
sdk/http.js
+1
-2
_shanghu_home.js
src/_shanghu_home.js
+11
-24
No files found.
sdk/http.js
View file @
d88c92d1
...
@@ -60,7 +60,6 @@ var http2 = {
...
@@ -60,7 +60,6 @@ var http2 = {
'
1
'
,
'
1
'
,
extraData
extraData
).
then
((
value
)
=>
{
).
then
((
value
)
=>
{
console
.
log
(
'
vaildInterfacefn响应value
'
,
value
)
/**
/**
* code: 200
* code: 200
data: "048b04671ad85e52e" // value 值就是接口返回的data值
data: "048b04671ad85e52e" // value 值就是接口返回的data值
...
@@ -97,7 +96,7 @@ var http2 = {
...
@@ -97,7 +96,7 @@ var http2 = {
}
}
const
decryptRes
=
JSON
.
parse
(
sm2_decrypt_result
)
const
decryptRes
=
JSON
.
parse
(
sm2_decrypt_result
)
console
.
log
(
'
vaildInterfacefn响应解密
'
,
decryptRes
);
console
.
log
(
'
当前请求参数
'
,
params
.
reqParams
,
'
当前请求返回值
'
,
decryptRes
)
if
(
if
(
decryptRes
.
code
===
400
||
decryptRes
.
code
===
400
||
...
...
src/_shanghu_home.js
View file @
d88c92d1
...
@@ -11,23 +11,7 @@ window.addEventListener("load", function () {
...
@@ -11,23 +11,7 @@ window.addEventListener("load", function () {
return
{
return
{
// 新增子Tab数据
// 新增子Tab数据
subActiveTab
:
0
,
subActiveTab
:
0
,
hazardList
:
[{
hazardList
:
[
// 更多示例数据...
id
:
1
,
description
:
'
消防通道被货物堵塞,存在严重安全隐患
'
,
status
:
'
待审核
'
,
date
:
'
2024-03-15
'
,
shop
:
'
XX餐饮店
'
,
type
:
2
},
{
id
:
2
,
description
:
'
消防通道被货物堵塞,存在严重安全隐患
'
,
status
:
'
待整改
'
,
date
:
'
2024-03-15
'
,
shop
:
'
XX餐饮店
'
,
type
:
2
},
// 更多示例数据...
],
],
activeTab
:
0
,
activeTab
:
0
,
showTimePicker
:
false
,
showTimePicker
:
false
,
...
@@ -70,7 +54,8 @@ window.addEventListener("load", function () {
...
@@ -70,7 +54,8 @@ window.addEventListener("load", function () {
this
.
getShopInfo
()
// 获取商户信息
this
.
getShopInfo
()
// 获取商户信息
this
.
getShopDate
()
// 获取商户统计信息
this
.
getShopDate
()
// 获取商户统计信息
this
.
getYhList
()
// 获取隐患记录
this
.
getYhList
()
// 获取隐患记录
this
.
getJcList
()
// 获取检查列表
// this.getJcList() // 获取检查列表
this
.
getUserPermission
()
//获取用户是否具有安全检查资格
},
},
computed
:
{
computed
:
{
filteredHazards
()
{
filteredHazards
()
{
...
@@ -98,6 +83,7 @@ window.addEventListener("load", function () {
...
@@ -98,6 +83,7 @@ window.addEventListener("load", function () {
if
(
this
.
activeTab
>
0
)
{
if
(
this
.
activeTab
>
0
)
{
this
.
getJcList
()
// 获取检查列表
this
.
getJcList
()
// 获取检查列表
}
}
},
},
// 新增选择确认方法
// 新增选择确认方法
onConfirmType
(
value
)
{
onConfirmType
(
value
)
{
...
@@ -231,7 +217,7 @@ window.addEventListener("load", function () {
...
@@ -231,7 +217,7 @@ window.addEventListener("load", function () {
reqParams
:
{
reqParams
:
{
sign
:
3
,
sign
:
3
,
merId
:
this
.
merId
,
merId
:
this
.
merId
,
status
:
this
.
activeTab
,
status
:
''
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
sort
:
'
lawId,desc
'
,
...
@@ -256,7 +242,7 @@ window.addEventListener("load", function () {
...
@@ -256,7 +242,7 @@ window.addEventListener("load", function () {
)
)
},
0
)
},
0
)
},
},
//获取
隐患记录获取
检查列表
//获取检查列表
getJcList
()
{
getJcList
()
{
// 更多示例数据...
// 更多示例数据...
vant
.
Toast
.
loading
({
vant
.
Toast
.
loading
({
...
@@ -318,9 +304,9 @@ window.addEventListener("load", function () {
...
@@ -318,9 +304,9 @@ window.addEventListener("load", function () {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
http2
.
post
(
http2
.
post
(
{
{
serviceId
:
API_KEY_MAP
[
'
page
'
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
'
no-
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-
page
'
][
'
privateKey
'
],
reqParams
:
{
reqParams
:
{
sign
:
13
,
sign
:
13
,
merId
:
this
.
merId
,
merId
:
this
.
merId
,
...
@@ -344,7 +330,8 @@ window.addEventListener("load", function () {
...
@@ -344,7 +330,8 @@ window.addEventListener("load", function () {
if
(
result
.
code
!==
200
&&
result
.
data
==
null
)
{
if
(
result
.
code
!==
200
&&
result
.
data
==
null
)
{
return
return
}
}
this
.
UserPermission
=
result
.
rows
.
length
>
0
?
true
:
false
console
.
log
(
result
.
data
,
result
,
'
获取用户是否具有安全检查资格
'
);
this
.
UserPermission
=
result
.
data
.
length
>
0
?
true
:
false
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
// 下滑不在刷新数据
this
.
finished
=
true
// 下滑不在刷新数据
}
}
...
...
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