update:更新政策详情代码
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
|
||||
<title>房屋征收</title>
|
||||
<script type="text/javascript" src="https://d.alicdn.com/alilog/mlog/aplus.js?id=202951085"></script>
|
||||
</head>
|
||||
@@ -13,6 +12,7 @@
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
<script>
|
||||
// console.log("初始页面");
|
||||
(function(w, d, s, q, i) {
|
||||
w[q] = w[q] || [];
|
||||
var f = d.getElementsByTagName(s)[0];
|
||||
@@ -43,15 +43,12 @@
|
||||
// 单页应用路由切换后 或 在异步获取到 pv 日志所需的参数后再执行 sendPV:
|
||||
aplus_queue.push({
|
||||
action: "aplus.sendPV",
|
||||
arguments: [
|
||||
{
|
||||
arguments: [{
|
||||
is_auto: false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
miniAppId: "2001833218", //'应用开发管理平台-应用 ID
|
||||
miniAppName: "房屋征收"
|
||||
}
|
||||
]
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
// 接口文档地址
|
||||
// https://docs.qq.com/doc/DZkdyS3hNT2V4Q3VJ
|
||||
const url_prefix='http://183.136.157.9:7099/api'
|
||||
const url_prefix = "http://183.136.157.9:7099/api";
|
||||
const url = {
|
||||
// 登录
|
||||
login: '/webapi/account.ashx?action=login',
|
||||
login: "/webapi/account.ashx?action=login",
|
||||
|
||||
// 个人信息
|
||||
account: '/webapi/account.ashx?action=userinfo',
|
||||
account: "/webapi/account.ashx?action=userinfo",
|
||||
|
||||
// 项目数统计信息
|
||||
projectStatistics: '/webapi/project.ashx?action=getStatistics',
|
||||
|
||||
getprjdata: '/project/list',
|
||||
get_policies_info: '/policies/info',
|
||||
projectStatistics: "/webapi/project.ashx?action=getStatistics",
|
||||
|
||||
getprjdata: "/project/list",
|
||||
get_policies_info: "/policies/info"
|
||||
};
|
||||
|
||||
export default url;
|
||||
@@ -1,27 +1,32 @@
|
||||
import axios from "axios"
|
||||
import axios from "axios";
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL: "https://some-domain.com/api/",
|
||||
timeout: 5000,
|
||||
|
||||
})
|
||||
baseURL: "http://183.136.157.9:7099/api",
|
||||
timeout: 5000
|
||||
});
|
||||
|
||||
// 添加请求拦截器
|
||||
axios.interceptors.request.use(function(config) {
|
||||
axios.interceptors.request.use(
|
||||
function(config) {
|
||||
// 在发送请求之前做些什么
|
||||
return config;
|
||||
}, function(error) {
|
||||
},
|
||||
function(error) {
|
||||
// 对请求错误做些什么
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
// 添加响应拦截器
|
||||
axios.interceptors.response.use(function(response) {
|
||||
axios.interceptors.response.use(
|
||||
function(response) {
|
||||
// 对响应数据做点什么
|
||||
return response;
|
||||
}, function(error) {
|
||||
},
|
||||
function(error) {
|
||||
// 对响应错误做点什么
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
export default instance
|
||||
export default instance;
|
||||
20
FrontCode2/sunshine_levy/src/common/util/request.js
Normal file
20
FrontCode2/sunshine_levy/src/common/util/request.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from "./index";
|
||||
|
||||
export function PolicyInfo(data) {
|
||||
return request({
|
||||
url: "/policies/info",
|
||||
params: data
|
||||
});
|
||||
}
|
||||
|
||||
export function Login() {
|
||||
return request({
|
||||
url: "/webapi/account.ashx?action=login"
|
||||
});
|
||||
}
|
||||
|
||||
export function Account() {
|
||||
return request({
|
||||
url: "/webapi/account.ashx?action=userinfo"
|
||||
});
|
||||
}
|
||||
@@ -69,6 +69,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="projectCenter centerMagin">
|
||||
<!-- 曙光一村内容 -->
|
||||
<div class="projectCenterBox">
|
||||
<div class="projectCenterInfo">
|
||||
<div class="projectCenterInfo">
|
||||
@@ -114,6 +115,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="centerMagin">
|
||||
<!-- 分户评估结果部分 -->
|
||||
<div class="assess">
|
||||
<div>
|
||||
<van-image
|
||||
@@ -154,6 +156,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<!-- 补偿协议部分 -->
|
||||
<div class="assess">
|
||||
<div>
|
||||
<van-image
|
||||
@@ -202,32 +205,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<!-- 征收政策背景图 -->
|
||||
<div class="centerMagin">
|
||||
<van-image
|
||||
:src="require('@/assets/img/expropriationPolicy.png')"
|
||||
class="bigImg"
|
||||
/>
|
||||
</div>
|
||||
<!-- 征收政策部分 -->
|
||||
<div class="centerMagin">
|
||||
<span class="projectTitle" style="color: #202020">征收政策</span>
|
||||
<div class="assessBox" style="padding-left: 5px; padding-right: 5px">
|
||||
<span class="font11" style="color: #2c2b2b"
|
||||
>共{{ data.policiesRegulationsLists.totalCount }}条</span
|
||||
>
|
||||
<!-- <div>
|
||||
<span class="font11">查看全部</span>
|
||||
<van-icon color="#1989fa" name="arrow" />
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="centerMagin" style="padding-bottom: 20px">
|
||||
<div @click="pageJump()" class="protocolBox">
|
||||
<div class="protocolBox">
|
||||
<van-list>
|
||||
<div
|
||||
:key="item.id"
|
||||
class="protocolList"
|
||||
v-for="(item, i) in data.policiesRegulationsLists.list"
|
||||
@click="pageJump(item.id)"
|
||||
>
|
||||
<!-- 非最后一行 -->
|
||||
<div
|
||||
class="protocolLine"
|
||||
v-if="i != data.policiesRegulationsLists.list.length - 1"
|
||||
@@ -247,6 +250,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 最后一行 -->
|
||||
<div style="padding-bottom: 10px" v-else>
|
||||
<div class="font14 protocolTitle">{{ item.title }}</div>
|
||||
<div
|
||||
@@ -274,48 +278,46 @@
|
||||
<script>
|
||||
import "./home.css";
|
||||
import { apis } from "@/common/apis";
|
||||
import { token } from "@/common/token";
|
||||
import request from "@/common/util";
|
||||
import { mgop } from "@aligov/jssdk-mgop";
|
||||
|
||||
export default {
|
||||
name: "home",
|
||||
data() {
|
||||
return {
|
||||
data: {
|
||||
idCard:'加载中...',
|
||||
userName:'加载中...',
|
||||
idCard: "加载中...",
|
||||
userName: "加载中...",
|
||||
policiesRegulationsLists: {
|
||||
totalCount: 0,
|
||||
},
|
||||
},
|
||||
// userInfoData: {} // 用户个人信息
|
||||
totalCount: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
async created() {
|
||||
this.onInit();
|
||||
console.log("this", this);
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
onLoad() {},
|
||||
// 获取数据
|
||||
onInit() {
|
||||
mgop({
|
||||
api: "mgop.kykj.houseexpropriat.getprjlist", // 必须
|
||||
api: "mgop.kykj.houseexpropriat.getprjlist",
|
||||
host: "https://mapi.zjzwfw.gov.cn/",
|
||||
dataType: "JSON",
|
||||
type: "POST",
|
||||
data: {
|
||||
ticket: this.$route.query.ticket,
|
||||
// ticket: this.$route.query.ticket
|
||||
ticket: "8a118a427bda7bed017bed084ec10622-ticket"
|
||||
},
|
||||
appKey: "es4b8zmz+2001833218+dehllx", // 必须
|
||||
onSuccess: (data) => {
|
||||
console.log("data", data);
|
||||
appKey: "es4b8zmz+2001833218+dehllx",
|
||||
onSuccess: data => {
|
||||
console.log("首页数据", data);
|
||||
if (data.data && data.data.success == true) {
|
||||
this.data = data.data.data;
|
||||
// 埋点
|
||||
this.setZwUserAplus(this.data.idCard, this.data.userName);
|
||||
} else {
|
||||
var errorCodes = [6001, 6501];
|
||||
// 跳转到政务系统
|
||||
if (errorCodes.indexOf(data.data.bizCode) > -1) {
|
||||
window.location.replace(
|
||||
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
|
||||
@@ -323,22 +325,16 @@ export default {
|
||||
} else console.log("用户无数据,不展示");
|
||||
}
|
||||
},
|
||||
onFail: (err) => {
|
||||
onFail: err => {
|
||||
console.log("用户无数据,不展示");
|
||||
},
|
||||
}
|
||||
});
|
||||
//获取当前数据
|
||||
// apis.getprjdata({ ticket: this.$route.query.ticket }).then((prjdata) => {
|
||||
// debugger;
|
||||
// console.log(prjdata);
|
||||
// this.user.name = prjdata.data.UserName;
|
||||
// this.user.identityId = prjdata.data.IdCard;
|
||||
// });
|
||||
},
|
||||
// 跳转项目详情
|
||||
gotoProject(type) {
|
||||
this.$router.push({
|
||||
name: "projectSelect",
|
||||
params: { type: type, ticket: this.$route.query.ticket },
|
||||
params: { type: type, ticket: this.$route.query.ticket }
|
||||
});
|
||||
},
|
||||
onLoadStatistic() {
|
||||
@@ -346,32 +342,37 @@ export default {
|
||||
this.statistics = result;
|
||||
});
|
||||
},
|
||||
// 页面跳转
|
||||
pageJump(type) {
|
||||
this.$router.push({
|
||||
name: "policyInfo",
|
||||
params: { type: type, ticket: this.$route.query.ticket },
|
||||
});
|
||||
// 政策信息页面跳转
|
||||
pageJump(id) {
|
||||
// this.$router.push({
|
||||
// name: "policyInfo",
|
||||
// params: { type: type, ticket: this.$route.query.ticket }
|
||||
// });
|
||||
window.location.replace(
|
||||
"http://localhost:8080/#/policyInfo?id=" +
|
||||
id +
|
||||
"&ticket=8a118a427bda7bed017bed084ec10622-ticket"
|
||||
);
|
||||
},
|
||||
setZwUserAplus(Userid, userName) {
|
||||
// 设置用户信息埋点
|
||||
aplus_queue.push({
|
||||
action: "aplus.setMetaInfo",
|
||||
arguments: ["_hold", "BLOCK"],
|
||||
arguments: ["_hold", "BLOCK"]
|
||||
});
|
||||
aplus_queue.push({
|
||||
action: "aplus.setMetaInfo",
|
||||
arguments: ["_user_nick", userName], // this.userInfoData.username],
|
||||
arguments: ["_user_nick", userName] // this.userInfoData.username],
|
||||
});
|
||||
aplus_queue.push({
|
||||
action: "aplus.setMetaInfo",
|
||||
arguments: ["_user_id", Userid],
|
||||
arguments: ["_user_id", Userid]
|
||||
});
|
||||
aplus_queue.push({
|
||||
action: "aplus.setMetaInfo",
|
||||
arguments: ["_hold", "START"],
|
||||
arguments: ["_hold", "START"]
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user