Commit a516951d authored by xinzhedeai's avatar xinzhedeai

法律法规1v1lv2list detail

parent b97ded09
......@@ -19,12 +19,29 @@ window.addEventListener("load", function() {
methods: {
detail() {
http.get('/api/thLaw/findLawDetails', {
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')
}).then((res) => {
console.log('响应结果', res.content)
this.lawChapter = res.thLawChapterDtoList[0].lawChapter
}
}, (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
// })
},
},
......
......@@ -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',{
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,
county: localStorage.getItem('appCounty'),
category_id: gemhoUtil.getParameter('category_id'),
sort: 'lawId,desc',
}).then((res)=>{
}
}, (res) => {
if(res){
console.log('接口回调数据', JSON.parse(res))
this.loading = false; // 加载状态结束
this.list.push(...res.content);
this.total = res.totalElements
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; // 下滑不在刷新数据
// }
// })
}
},
......
......@@ -25,20 +25,51 @@ window.addEventListener("load", function() {
location.href='./law-lv2.html?pid=' + item.id
},
getList(){
http.get('/api/lawCategory',{
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,
county: localStorage.getItem('appCounty'),
}).then((res)=>{
// sort: 'createTime,desc',
}
}, (res) => {
if(res){
console.log('接口回调数据', JSON.parse(res))
var result = JSON.parse(res)
this.loading = false; // 加载状态结束
this.list.push(...res.content);
this.total = res.totalElements
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; // 下滑不在刷新数据
// }
// })
}
},
......
......@@ -26,24 +26,54 @@ window.addEventListener("load", function() {
location.href = './law-list.html?category_id=' + category_id
},
getList(){
http.get('/api/lawCategory',{
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,
county: localStorage.getItem('appCounty'),
pid: gemhoUtil.getParameter('pid'),
}).then((res)=>{
// sort: 'createTime,desc',
}
}, (res) => {
if(res){
console.log('接口回调数据', JSON.parse(res))
var result = JSON.parse(res)
this.loading = false; // 加载状态结束
this.list.push(...res.content);
this.total = res.totalElements
if(!this.list.length){
this.nav(gemhoUtil.getParameter('pid'))
}
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; // 下滑不在刷新数据
// }
// })
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment