Commit 914bcae6 authored by xinzhedeai's avatar xinzhedeai

法律法规接口对接

parent 87422982
......@@ -47,7 +47,7 @@ var userInfo = {
}
}
var token ="Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI3MDVhZDI4NDE3MWE0MmQxOWU3OWNjMTJiMTUzZjMyYyIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.gsZIN6epIz5PpJRAA1X5IjM9DRBjmDpND9lR_o27cAbzEaRGL75JwXt8OBczwxDigisiiqeD4VpaMyCwIfXyNg";
var token ="Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI2OGEyZDUyNzI3ZDU0Y2YzYWZlNDE5MDI0OTFhNzE3NiIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.s0tU0zJdSvN5dBt2DHDmxs6sRGlkyuBoEsb3vUp8XZhcQco4ujyTNA3UPWAcgGd4dHwXJrqUkxZFG9aWaJ0Dvw";
localStorage.setItem('Authorization', token)
localStorage.setItem('appCounty', userInfo.user.county)
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>危险作业备案-详情</title>
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/pdf.js/2.0.193/pdf.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/pdf.js/2.0.193/pdf.worker.min.js"></script> -->
<!-- <script src="../js/pdfjs-4.2.67-dist/build/pdf.mjs"></script>
<script src="../js/pdfjs-4.2.67-dist/build/pdf.worker.mjs"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js"></script>
<script type="text/javascript" src="../js/includeHead.js"></script>
<style>
html, body{
background-color: #fff;
}
.pd-01rem{
padding-bottom: 0.1rem;
}
/* 表单相关 */
.formValue{
float: right;
}
.formSubmitBtnWrapper{
display: flex;
justify-content: center;
margin-top: 0.2rem;
margin-bottom:0.2rem;
}
.formSubmitBtnWrapper .van-button{
width: 4rem;
}
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
.van-radio-group--horizontal{float: right;}
</style>
</head>
<body>
<div id="app">
<div class="content" v-cloak v-html="lawChapter"></div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
var VUE = null
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
data() {
return {
lawChapter: '',
// 企业id
companyId: localStorage.getItem('companyId'),
disabled: false,
}
},
mounted() {
this.detail()
},
methods: {
detail() {
http.get('/api/thLaw/findLawDetails', {
lawId: gemhoUtil.getParameter('law_id')
}).then((res) => {
console.log('响应结果', res.content)
this.lawChapter = res.thLawChapterDtoList[0].lawChapter
})
},
},
});
});
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>法律法规-列表</title>
<script type="text/javascript" src="../js/includeHead.js"></script>
<style>
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
</style>
</head>
<body>
<div id="app">
<div class="content" v-cloak>
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList">
<van-cell v-for="(item, index) in list" :key="item">
<div class="list-item-wrapper" @click="detail(index)">
<p class="">
<van-tag type="primary" v-if="!item.currentUserRead">未读</van-tag>
<van-tag plain type="primary" v-else>已读</van-tag>
</p>
<p class="">
{{item.lawTitle}}
</p>
<div class="list-function-btn-wrapper pd-01rem" style="justify-content: space-between;">
<span>{{item.lawPublisher}}</span>
<span>{{item.lawDate}}</span>
</div>
</div>
</van-cell>
</van-list>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
var VUE = null
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
data() {
return {
companyName: '',
value: '',
list: [],
loading: false,
finished: false,
page: 0,
size: 999,
total: 0
}
},
mounted() {
this.getList()
},
methods: {
detail(index){
debugger
this.list[index].currentUserRead = true
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; // 下滑不在刷新数据
}
})
}
},
});
});
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>法律法规-列表</title>
<script type="text/javascript" src="../js/includeHead.js"></script>
<style>
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
.list-item-wrapper{background-color: #fffce9;}
</style>
</head>
<body>
<div id="app">
<div class="content" v-cloak>
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList">
<van-cell v-for="(item, index) in list" :key="item">
<div class="list-item-wrapper" @click="nav(item)" >
<p class="">
{{item.name}}
</p>
</div>
</van-cell>
</van-list>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
var VUE = null
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
data() {
return {
companyName: '',
value: '',
list: [],
loading: false,
finished: false,
page: 0,
size: 999,
total: 0
}
},
mounted() {
this.getList()
},
methods: {
nav(item){
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; // 下滑不在刷新数据
}
})
}
},
});
});
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>法律法规-列表</title>
<script type="text/javascript" src="../js/includeHead.js"></script>
<style>
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
.list-item-wrapper{background-color: #fffce9;}
</style>
</head>
<body>
<div id="app">
<div class="content" v-cloak>
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList">
<van-cell v-for="(item, index) in list" :key="item">
<div class="list-item-wrapper" @click=nav(item.id)>
<p class="">
{{item.name}}
</p>
</div>
</van-cell>
</van-list>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
var VUE = null
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
data() {
return {
companyName: '',
value: '',
list: [],
loading: false,
finished: false,
page: 0,
size: 999,
total: 0
}
},
mounted() {
this.getList()
},
methods: {
nav(category_id){
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.page*this.size >= this.total){
this.finished = true; // 下滑不在刷新数据
}
})
}
},
});
});
\ No newline at end of file
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