update:更新政策详情代码

This commit is contained in:
2021-09-16 16:44:55 +08:00
parent db93fdafea
commit fab7947fb0
6 changed files with 135 additions and 93 deletions

View File

@@ -1,41 +1,61 @@
<template>
<div class="container">
<div class="title">{{ info.title }}</div>
<div class="date">{{ info.date }}</div>
<div class="date">{{ info.publicTime }}</div>
<hr />
<p class="content">{{ info.content }}</p>
<p class="content">{{ info.content }}</p>
<div class="content"></div>
</div>
</template>
<script>
import { mgop } from "@aligov/jssdk-mgop";
export default {
data() {
return {
info: {
title: "国有土地征收详情与政策",
date: "2021-9-5",
content: `第一条 为了规范国有土地上房屋征收与补偿活动,维护公共利益,保障被征收房屋所有权人的合法权益,制定本条例<br/>
第二条 市、县级人民政府有关部门应当依照本条例的规定和本级人民政府规定的职责分工,互相配合,保障房屋征收与补偿工作的顺利进行`
}
info: {}
};
},
created() {
this.getData();
},
methods: {
// 获取数据
getData() {
mgop({
api: "mgop.kykj.houseexpropriat.getpoliciesinfo",
host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.query.ticket,
id: this.$route.query.id
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
const { data: res } = data;
this.info = res.data;
let content = document.querySelector(".content");
content.innerHTML = res.data.contents;
},
onFail: function(err) {
console.log("错误信息", err);
}
});
}
}
};
</script>
<style lang="less" scoped>
.container {
padding: 20px;
font-size: 14px;
.title {
text-align: center;
font-weight: bolder;
font-size: 14px;
}
.date {
text-align: center;
margin: 10px 0;
}
.content {
text-indent: 2em;
line-height: 2.5;
font-size: 14px;
}
}
</style>