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
a516951d
Commit
a516951d
authored
Jun 21, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
法律法规1v1lv2list detail
parent
b97ded09
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
46 deletions
+153
-46
law-list-detail.js
src/law-list-detail.js
+22
-5
law-list.js
src/law-list.js
+43
-14
law-lv1.js
src/law-lv1.js
+43
-12
law-lv2.js
src/law-lv2.js
+45
-15
No files found.
src/law-list-detail.js
View file @
a516951d
...
...
@@ -19,12 +19,29 @@ window.addEventListener("load", function() {
methods
:
{
detail
()
{
http
.
get
(
'
/api/thLaw/findLawDetails
'
,
{
lawId
:
gemhoUtil
.
getParameter
(
'
law_id
'
)
}).
then
((
res
)
=>
{
console
.
log
(
'
响应结果
'
,
res
.
content
)
this
.
lawChapter
=
res
.
thLawChapterDtoList
[
0
].
lawChapter
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-list-detail
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-list-detail
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
law-list-detail
"
][
"
privateKey
"
],
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
lawId
:
gemhoUtil
.
getParameter
(
'
law_id
'
)
}
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
lawChapter
=
result
.
lawChapter
}
})
// http.get('/api/thLaw/findLawDetails', {
// lawId: gemhoUtil.getParameter('law_id')
// }).then((res) => {
// console.log('响应结果', res.content)
// this.lawChapter = res.thLawChapterDtoList[0].lawChapter
// })
},
},
...
...
src/law-list.js
View file @
a516951d
...
...
@@ -27,22 +27,51 @@ window.addEventListener("load", function() {
location
.
href
=
'
./law-list-detail.html?law_id=
'
+
this
.
list
[
index
].
lawId
},
getList
(){
http
.
get
(
'
/api/thLaw
'
,{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
county
:
localStorage
.
getItem
(
'
appCounty
'
),
category_id
:
gemhoUtil
.
getParameter
(
'
category_id
'
),
sort
:
'
lawId,desc
'
,
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
res
.
content
);
this
.
total
=
res
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
if
(
this
.
loading
){
return
}
this
.
loading
=
true
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-list
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-list
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
law-list
"
][
"
privateKey
"
],
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
category_id
:
gemhoUtil
.
getParameter
(
'
category_id
'
),
sort
:
'
lawId,desc
'
,
}
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/thLaw',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// category_id: gemhoUtil.getParameter('category_id'),
// sort: 'lawId,desc',
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(this.page*this.size >= this.total){
// this.finished = true; // 下滑不在刷新数据
// }
// })
}
},
...
...
src/law-lv1.js
View file @
a516951d
...
...
@@ -25,20 +25,51 @@ window.addEventListener("load", function() {
location
.
href
=
'
./law-lv2.html?pid=
'
+
item
.
id
},
getList
(){
http
.
get
(
'
/api/lawCategory
'
,{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
county
:
localStorage
.
getItem
(
'
appCounty
'
),
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
res
.
content
);
this
.
total
=
res
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
if
(
this
.
loading
){
return
}
this
.
loading
=
true
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
privateKey
"
],
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
// sort: 'createTime,desc',
}
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/lawCategory',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(this.page*this.size >= this.total){
// this.finished = true; // 下滑不在刷新数据
// }
// })
}
},
...
...
src/law-lv2.js
View file @
a516951d
...
...
@@ -26,24 +26,54 @@ window.addEventListener("load", function() {
location
.
href
=
'
./law-list.html?category_id=
'
+
category_id
},
getList
(){
http
.
get
(
'
/api/lawCategory
'
,{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
county
:
localStorage
.
getItem
(
'
appCounty
'
),
pid
:
gemhoUtil
.
getParameter
(
'
pid
'
),
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
res
.
content
);
this
.
total
=
res
.
totalElements
if
(
!
this
.
list
.
length
){
this
.
nav
(
gemhoUtil
.
getParameter
(
'
pid
'
))
if
(
this
.
loading
){
return
}
this
.
loading
=
true
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-lv
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
law-lv
"
][
"
privateKey
"
],
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
pid
:
gemhoUtil
.
getParameter
(
'
pid
'
),
// sort: 'createTime,desc',
}
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/lawCategory',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// pid: gemhoUtil.getParameter('pid'),
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(!this.list.length){
// this.nav(gemhoUtil.getParameter('pid'))
// }
// if(this.page*this.size >= this.total){
// 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