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
b9c7b42a
Commit
b9c7b42a
authored
Jul 16, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加载中进度条取消 列表页跳转返回位置定位处理
parent
096faad1
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
72 deletions
+63
-72
index.html
index.html
+2
-2
http.js
sdk/http.js
+2
-2
index.js
sdk/jssdk2/index.js
+5
-5
util.js
sdk/util.js
+9
-0
dw-list.js
src/dw-list.js
+6
-6
emergency.js
src/emergency.js
+7
-7
law-list.js
src/law-list.js
+6
-10
law-lv1.js
src/law-lv1.js
+6
-8
law-lv2.js
src/law-lv2.js
+6
-8
notice-list.js
src/notice-list.js
+8
-8
yh-list.js
src/yh-list.js
+6
-16
No files found.
index.html
View file @
b9c7b42a
...
...
@@ -36,10 +36,10 @@
<div
class=
"bgImg"
@
click=
"nav('dw-list')"
>
<img
src=
"image/dw-list.png"
alt=
""
srcset=
""
/>
</div>
<div
class=
"bgImg"
@
click=
"nav('
notice-list
')"
>
<div
class=
"bgImg"
@
click=
"nav('
law-lv1
')"
>
<img
src=
"image/law-list.png"
alt=
""
srcset=
""
/>
</div>
<div
class=
"bgImg"
@
click=
"nav('
law-lv1
')"
>
<div
class=
"bgImg"
@
click=
"nav('
notice-list
')"
>
<img
src=
"image/notice-list.png"
alt=
""
srcset=
""
/>
</div>
<div
class=
"bgImg"
@
click=
"nav('emergency')"
>
...
...
sdk/http.js
View file @
b9c7b42a
...
...
@@ -38,7 +38,7 @@ var http2 = {
// vaildInterfacefn("gqyjglptxiefn", params.serviceId, data, "1", "https://" + urldomaincreatesign, "https://" + urldomaingateway).then((value) => {
vaildInterfacefn
(
"
gqyjglptxiefn
"
,
params
.
serviceId
,
data
,
"
1
"
,
extraData
).
then
((
value
)
=>
{
console
.
log
(
'
vaildInterfacefn响应
'
,
value
)
//
console.log('vaildInterfacefn响应', value)
/**
* code: 200
data: "048b04671ad85e52e" // value 值就是接口返回的data值
...
...
@@ -59,7 +59,7 @@ var http2 = {
let
sm2_encrypt_result
=
value
// 后台返回待解密内容
let
sm2_decrypt_result
=
sm2_Decrypt
(
sm2_encrypt_result
,
params
.
interfacePrivateKey
)
//
console.log('vaildInterfacefn响应解密', sm2_decrypt_result)
console
.
log
(
'
vaildInterfacefn响应解密
'
,
sm2_decrypt_result
)
const
decryptRes
=
JSON
.
parse
(
sm2_decrypt_result
)
if
(
decryptRes
.
code
===
400
||
decryptRes
.
code
===
401
||
decryptRes
.
status
===
401
){
vant
.
Dialog
.
alert
({
...
...
sdk/jssdk2/index.js
View file @
b9c7b42a
const
appword
=
"
aKd20dbGdFvmuwrt
"
// 固定值
window
.
onload
=
function
()
{
vant
.
Toast
.
loading
({
message
:
'
加载中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
//
vant.Toast.loading({
//
message: '加载中...',
//
forbidClick: true,
//
loadingType: 'spinner',
//
});
// if(!localStorage.getItem('token')){
if
(
!
gemhoUtil
.
getCookie
(
'
token
'
)){
getUserInfo
()
...
...
sdk/util.js
View file @
b9c7b42a
...
...
@@ -203,6 +203,15 @@ gemhoUtil.navigatePage = function(path, title) {
}
else
{
url
+=
path
+
'
?rev=
'
+
(
+
new
Date
())
}
// 保存当前的滚动位置
var
scrollPosition
=
window
.
scrollY
;
// 利用 pushState 在浏览器历史记录中添加新状态
// history.pushState({ scrollPosition: scrollPosition }, '');
console
.
log
(
'
跳转页面
'
,
scrollPosition
)
gemhoUtil
.
setCookie
(
'
scrollPosition
'
,
scrollPosition
)
location
.
href
=
url
;
}
...
...
src/dw-list.js
View file @
b9c7b42a
...
...
@@ -13,7 +13,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
10
,
size
:
9999
,
total
:
0
}
},
...
...
@@ -34,10 +34,6 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./dw-list-detail.html?dwId=
'
+
item
.
id
+
'
&type=edit
'
)
},
getList
(){
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
dw-list
"
][
'
id
'
],
...
...
@@ -51,7 +47,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
...
...
@@ -63,6 +59,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/emergency.js
View file @
b9c7b42a
...
...
@@ -12,7 +12,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
10
,
size
:
9999
,
total
:
0
}
},
...
...
@@ -25,7 +25,7 @@ window.addEventListener("load", function() {
},
resetSearchForm
()
{
this
.
page
=
0
this
.
size
=
20
this
.
size
=
9999
this
.
total
=
0
this
.
list
=
[]
this
.
finished
=
false
;
...
...
@@ -40,10 +40,6 @@ window.addEventListener("load", function() {
this
.
getList
()
},
getList
()
{
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
emergency
"
][
'
id
'
],
...
...
@@ -61,7 +57,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
).
body
this
.
loading
=
false
;
// 加载状态结束
...
...
@@ -73,6 +69,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/law-list.js
View file @
b9c7b42a
...
...
@@ -13,7 +13,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
10
,
size
:
9999
,
total
:
0
}
},
...
...
@@ -22,18 +22,10 @@ window.addEventListener("load", function() {
},
methods
:
{
detail
(
index
)
{
// this.list[index].currentUserRead = true
// location.href = './law-list-detail.html?law_id='+this.list[index].lawId
gemhoUtil
.
navigatePage
(
'
./law-list-detail.html?law_id=
'
+
this
.
list
[
index
].
lawId
)
},
getList
()
{
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-list
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-list
"
][
"
publicKey
"
],
...
...
@@ -47,7 +39,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
list
.
push
(...
result
.
content
);
...
...
@@ -58,6 +50,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/law-lv1.js
View file @
b9c7b42a
...
...
@@ -13,7 +13,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
20
,
size
:
9999
,
total
:
0
}
},
...
...
@@ -26,13 +26,7 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./law-lv2.html?pid=
'
+
item
.
id
)
},
getList
()
{
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
publicKey
"
],
...
...
@@ -45,7 +39,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
...
...
@@ -57,6 +51,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/law-lv2.js
View file @
b9c7b42a
...
...
@@ -11,7 +11,7 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
20
,
size
:
9999
,
total
:
0
}
},
...
...
@@ -25,13 +25,7 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./law-list.html?category_id=
'
+
category_id
)
},
getList
()
{
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
publicKey
"
],
...
...
@@ -45,7 +39,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
...
...
@@ -60,6 +54,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/notice-list.js
View file @
b9c7b42a
...
...
@@ -11,12 +11,14 @@ window.addEventListener("load", function() {
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
10
,
size
:
9999
,
total
:
0
}
},
mounted
()
{
this
.
getList
()
},
methods
:
{
detail
(
index
)
{
...
...
@@ -25,13 +27,7 @@ window.addEventListener("load", function() {
.
noticeId
)
},
getList
()
{
// if(this.loading){
// return
// }
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
publicKey
"
],
...
...
@@ -44,7 +40,7 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
...
...
@@ -56,6 +52,10 @@ window.addEventListener("load", function() {
}
}
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
}
...
...
src/yh-list.js
View file @
b9c7b42a
...
...
@@ -13,21 +13,13 @@ window.addEventListener("load", function() {
// loadFlag: false,
finished
:
false
,
page
:
0
,
size
:
10
,
size
:
9999
,
total
:
0
}
},
mounted
()
{
this
.
getList
()
},
watch
:
{
loadFlag
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
'
loadFlag111变化了
'
,
oldValue
,
newValue
);
},
immediate
:
true
// 立即执行监听器
}
},
methods
:
{
detail
(
item
)
{
gemhoUtil
.
navigatePage
(
'
./yh-list-detail.html?hdId=
'
+
item
.
hdId
+
'
&type=detail
'
)
...
...
@@ -36,12 +28,6 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./yh-list-detail.html?hdId=
'
+
item
.
hdId
+
'
&type=edit
'
)
},
getList
()
{
console
.
log
(
'
this.loadFlag
'
,
this
.
loadFlag
)
// if (this.loadFlag) {
// return
// }
// this.loadFlag = true
setTimeout
(()
=>
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
yh-list
"
][
'
id
'
],
...
...
@@ -63,7 +49,11 @@ window.addEventListener("load", function() {
}
}
this
.
loadFlag
=
false
console
.
log
(
'
响应结束
'
,
this
.
total
,
this
.
list
.
length
)
// console.log('响应结束',this.total, this.list.length)
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
));
})
})
},
0
)
...
...
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