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
ec64a0a8
Commit
ec64a0a8
authored
Jul 26, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
请求报错 重新请求进度条显示处理
parent
411ff42a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
96 additions
and
28 deletions
+96
-28
dw-list-detail.js
src/dw-list-detail.js
+14
-4
dw-list.js
src/dw-list.js
+7
-2
emergency-detail.js
src/emergency-detail.js
+12
-4
emergency.js
src/emergency.js
+7
-2
law-list-detail.js
src/law-list-detail.js
+7
-2
law-list.js
src/law-list.js
+7
-2
law-lv1.js
src/law-lv1.js
+7
-2
law-lv2.js
src/law-lv2.js
+7
-2
notice-list-detail.js
src/notice-list-detail.js
+7
-2
notice-list.js
src/notice-list.js
+7
-2
yh-list-detail.js
src/yh-list-detail.js
+7
-2
yh-list.js
src/yh-list.js
+7
-2
No files found.
src/dw-list-detail.js
View file @
ec64a0a8
...
...
@@ -129,6 +129,7 @@ window.addEventListener("load", function() {
let
sm2_encrypt_result
=
value
// 后台返回待解密内容
let
sm2_decrypt_result
=
sm2_Decrypt
(
sm2_encrypt_result
,
API_KEY_MAP
[
"
upload
"
][
"
privateKey
"
],)
if
(
!
sm2_decrypt_result
){
// 如果解密后的值为空字符串则重新上传图片
vant
.
Toast
.
clear
()
this
.
afterRead
(
file
)
return
}
...
...
@@ -143,7 +144,9 @@ window.addEventListener("load", function() {
}
this
.
filePathList
=
decryptRes
.
body
?
[
decryptRes
.
body
]
:
[]
// 可根据后端返回的数据做进一步处理,如显示上传成功信息等
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
}
else
{
this
.
afterRead
(
file
)
}
...
...
@@ -209,12 +212,16 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
detail
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
var
result
=
JSON
.
parse
(
res
)
// this.noticeContent = result.noticeContent
this
.
form
=
result
.
content
[
0
]
...
...
@@ -261,7 +268,10 @@ window.addEventListener("load", function() {
},
(
res
,
type
)
=>
{
if
(
!
res
&&
!
type
){
// 如果是中台接口返回为undefined,则重新发起请求
vant
.
Toast
.
clear
()
this
.
submit
()
setTimeout
(()
=>
{
this
.
submit
()
},
0
);
return
}
if
(
res
)
{
...
...
src/dw-list.js
View file @
ec64a0a8
...
...
@@ -51,8 +51,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
){
...
...
@@ -68,7 +71,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/emergency-detail.js
View file @
ec64a0a8
...
...
@@ -183,7 +183,9 @@ window.addEventListener("load", function() {
let
sm2_decrypt_result
=
sm2_Decrypt
(
sm2_encrypt_result
,
API_KEY_MAP
[
"
upload
"
][
"
privateKey
"
],)
if
(
!
sm2_decrypt_result
){
// 如果解密后的值为空字符串则重新上传图片
vant
.
Toast
.
clear
()
this
.
afterRead
(
file
)
setTimeout
(()
=>
{
this
.
afterRead
(
file
)
},
0
);
return
}
console
.
log
(
'
upload响应解密
'
,
sm2_decrypt_result
)
...
...
@@ -196,7 +198,9 @@ window.addEventListener("load", function() {
return
}
this
.
filePathList
=
decryptRes
.
body
?
[
decryptRes
.
body
]
:
[]
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
}
})
.
catch
(
error
=>
{
...
...
@@ -231,7 +235,9 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
detail
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
){
...
...
@@ -249,7 +255,9 @@ window.addEventListener("load", function() {
this
.
disabled
=
false
}
this
.
filePathList
=
this
.
form
.
drillPhotoList
||
[];
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
}
})
},
...
...
src/emergency.js
View file @
ec64a0a8
...
...
@@ -61,8 +61,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -78,7 +81,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-list-detail.js
View file @
ec64a0a8
...
...
@@ -33,7 +33,10 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
detail
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
){
...
...
@@ -41,7 +44,9 @@ window.addEventListener("load", function() {
var
result
=
JSON
.
parse
(
res
)
this
.
lawChapter
=
result
.
lawChapter
}
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
})
},
},
...
...
src/law-list.js
View file @
ec64a0a8
...
...
@@ -43,8 +43,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -59,7 +62,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-lv1.js
View file @
ec64a0a8
...
...
@@ -43,8 +43,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -60,7 +63,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/law-lv2.js
View file @
ec64a0a8
...
...
@@ -43,8 +43,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -63,7 +66,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/notice-list-detail.js
View file @
ec64a0a8
...
...
@@ -31,7 +31,10 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
this
.
detail
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
){
...
...
@@ -40,7 +43,9 @@ window.addEventListener("load", function() {
var
result
=
JSON
.
parse
(
res
)
this
.
noticeContent
=
result
.
noticeContent
}
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
})
},
...
...
src/notice-list.js
View file @
ec64a0a8
...
...
@@ -44,8 +44,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -61,7 +64,9 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
...
...
src/yh-list-detail.js
View file @
ec64a0a8
...
...
@@ -91,7 +91,9 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
detail
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
){
...
...
@@ -113,7 +115,10 @@ window.addEventListener("load", function() {
// 隐患状态 成功和待验证 则不允许编辑
this
.
disabled
=
this
.
form
.
hdStatus
===
1
||
this
.
form
.
hdStatus
===
3
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
}
})
},
...
...
src/yh-list.js
View file @
ec64a0a8
...
...
@@ -45,8 +45,11 @@ window.addEventListener("load", function() {
}
},
(
res
)
=>
{
if
(
!
res
){
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
this
.
getList
()
setTimeout
(()
=>
{
this
.
getList
()
},
0
);
return
}
if
(
res
)
{
...
...
@@ -59,7 +62,9 @@ window.addEventListener("load", function() {
}
}
this
.
loadFlag
=
false
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
},
0
);
// 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