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
9f9b5168
Commit
9f9b5168
authored
Jul 25, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中台偶发加载问题处理
parent
226d247d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
7 deletions
+78
-7
dw-list.js
src/dw-list.js
+12
-2
emergency.js
src/emergency.js
+11
-1
law-list.js
src/law-list.js
+11
-1
law-lv1.js
src/law-lv1.js
+11
-1
law-lv2.js
src/law-lv2.js
+11
-1
notice-list.js
src/notice-list.js
+11
-1
yh-list.js
src/yh-list.js
+11
-0
No files found.
src/dw-list.js
View file @
9f9b5168
...
...
@@ -13,7 +13,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
99
99
,
size
:
99
,
total
:
0
}
},
...
...
@@ -34,6 +34,11 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./dw-list-detail.html?dwId=
'
+
item
.
id
+
'
&type=edit
'
)
},
getList
(){
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
dw-list
"
][
'
id
'
],
...
...
@@ -45,7 +50,11 @@ window.addEventListener("load", function() {
sort
:
'
id,desc
'
,
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
){
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -59,6 +68,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/emergency.js
View file @
9f9b5168
...
...
@@ -40,6 +40,11 @@ window.addEventListener("load", function() {
this
.
getList
()
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
emergency
"
][
'
id
'
],
...
...
@@ -55,7 +60,11 @@ window.addEventListener("load", function() {
planName
:
this
.
planName
,
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -69,6 +78,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-list.js
View file @
9f9b5168
...
...
@@ -25,6 +25,11 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./law-list-detail.html?law_id=
'
+
this
.
list
[
index
].
lawId
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-list
"
][
'
id
'
],
...
...
@@ -37,7 +42,11 @@ window.addEventListener("load", function() {
sort
:
'
lawId,desc
'
,
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -50,6 +59,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-lv1.js
View file @
9f9b5168
...
...
@@ -26,6 +26,11 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./law-lv2.html?pid=
'
+
item
.
id
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
...
...
@@ -37,7 +42,11 @@ window.addEventListener("load", function() {
// sort: 'createTime,desc',
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -51,6 +60,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-lv2.js
View file @
9f9b5168
...
...
@@ -25,6 +25,11 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./law-list.html?category_id=
'
+
category_id
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
...
...
@@ -37,7 +42,11 @@ window.addEventListener("load", function() {
// sort: 'createTime,desc',
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -54,6 +63,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/notice-list.js
View file @
9f9b5168
...
...
@@ -27,6 +27,11 @@ window.addEventListener("load", function() {
.
noticeId
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list
"
][
'
id
'
],
...
...
@@ -38,7 +43,11 @@ window.addEventListener("load", function() {
// sort: 'noticeId,desc',
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
...
...
@@ -52,6 +61,7 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/yh-list.js
View file @
9f9b5168
...
...
@@ -28,6 +28,11 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./yh-list-detail.html?hdId=
'
+
item
.
hdId
+
'
&type=edit
'
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
yh-list
"
][
'
id
'
],
...
...
@@ -39,6 +44,11 @@ window.addEventListener("load", function() {
sort
:
'
hdId,desc
'
,
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
this
.
list
.
push
(...
result
.
content
);
...
...
@@ -49,6 +59,7 @@ window.addEventListener("load", function() {
}
}
this
.
loadFlag
=
false
vant
.
Toast
.
clear
()
// console.log('响应结束',this.total, this.list.length)
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
...
...
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