Commit a516951d authored by xinzhedeai's avatar xinzhedeai

法律法规1v1lv2list detail

parent b97ded09
...@@ -19,12 +19,29 @@ window.addEventListener("load", function() { ...@@ -19,12 +19,29 @@ window.addEventListener("load", function() {
methods: { methods: {
detail() { detail() {
http.get('/api/thLaw/findLawDetails', { http2.post({
lawId: gemhoUtil.getParameter('law_id') serviceId: API_KEY_MAP["law-list-detail"]['id'],
}).then((res) => { interfacePublicKey: API_KEY_MAP["law-list-detail"]["publicKey"],
console.log('响应结果', res.content) interfacePrivateKey: API_KEY_MAP["law-list-detail"]["privateKey"],
this.lawChapter = res.thLawChapterDtoList[0].lawChapter 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
// })
}, },
}, },
......
...@@ -27,22 +27,51 @@ window.addEventListener("load", function() { ...@@ -27,22 +27,51 @@ window.addEventListener("load", function() {
location.href = './law-list-detail.html?law_id='+this.list[index].lawId location.href = './law-list-detail.html?law_id='+this.list[index].lawId
}, },
getList(){ getList(){
http.get('/api/thLaw',{ if(this.loading){
page: this.page++,// 每次请求增加下一页 return
size: this.size, }
county: localStorage.getItem('appCounty'), this.loading = true
category_id: gemhoUtil.getParameter('category_id'), http2.post({
sort: 'lawId,desc', serviceId: API_KEY_MAP["law-list"]['id'],
}).then((res)=>{ interfacePublicKey: API_KEY_MAP["law-list"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["law-list"]["privateKey"],
this.loading = false; // 加载状态结束 reqParams: {
this.list.push(...res.content); page: this.page++,// 每次请求增加下一页
this.total = res.totalElements size: this.size,
category_id: gemhoUtil.getParameter('category_id'),
if(this.page*this.size >= this.total){ sort: 'lawId,desc',
this.finished = true; // 下滑不在刷新数据 }
}, (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; // 下滑不在刷新数据
// }
// })
} }
}, },
......
...@@ -25,20 +25,51 @@ window.addEventListener("load", function() { ...@@ -25,20 +25,51 @@ window.addEventListener("load", function() {
location.href='./law-lv2.html?pid=' + item.id location.href='./law-lv2.html?pid=' + item.id
}, },
getList(){ getList(){
http.get('/api/lawCategory',{ if(this.loading){
page: this.page++,// 每次请求增加下一页 return
size: this.size, }
county: localStorage.getItem('appCounty'), this.loading = true
}).then((res)=>{ http2.post({
serviceId: API_KEY_MAP["law-lv"]['id'],
this.loading = false; // 加载状态结束 interfacePublicKey: API_KEY_MAP["law-lv"]["publicKey"],
this.list.push(...res.content); interfacePrivateKey: API_KEY_MAP["law-lv"]["privateKey"],
this.total = res.totalElements reqParams: {
page: this.page++,// 每次请求增加下一页
if(this.page*this.size >= this.total){ size: this.size,
this.finished = true; // 下滑不在刷新数据 // 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; // 下滑不在刷新数据
// }
// })
} }
}, },
......
...@@ -26,24 +26,54 @@ window.addEventListener("load", function() { ...@@ -26,24 +26,54 @@ window.addEventListener("load", function() {
location.href = './law-list.html?category_id=' + category_id location.href = './law-list.html?category_id=' + category_id
}, },
getList(){ getList(){
http.get('/api/lawCategory',{ if(this.loading){
page: this.page++,// 每次请求增加下一页 return
size: this.size, }
county: localStorage.getItem('appCounty'), this.loading = true
pid: gemhoUtil.getParameter('pid'), http2.post({
}).then((res)=>{ serviceId: API_KEY_MAP["law-lv"]['id'],
interfacePublicKey: API_KEY_MAP["law-lv"]["publicKey"],
this.loading = false; // 加载状态结束 interfacePrivateKey: API_KEY_MAP["law-lv"]["privateKey"],
this.list.push(...res.content); reqParams: {
this.total = res.totalElements page: this.page++,// 每次请求增加下一页
if(!this.list.length){ size: this.size,
this.nav(gemhoUtil.getParameter('pid')) pid: gemhoUtil.getParameter('pid'),
// sort: 'createTime,desc',
} }
}, (res) => {
if(this.page*this.size >= this.total){
this.finished = true; // 下滑不在刷新数据 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; // 下滑不在刷新数据
// }
// })
} }
}, },
......
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