update:增加ticket过期提示,请求提示,下拉刷新

This commit is contained in:
2021-10-08 09:20:10 +08:00
parent ab1972183c
commit 69c5b7a4f0
12 changed files with 343 additions and 282 deletions

View File

@@ -60,19 +60,19 @@
<!-- 项目内容 -->
<div class="projectCenterBox">
<div>
<van-image :src="require('@/assets/img/project_area.png')" />
<img src="@/assets/img/project_area.png" />
<span>项目所在区域{{ item.area }}</span>
</div>
<div>
<van-image :src="require('@/assets/img/project_dep.png')" />
<img src="@/assets/img/project_dep.png" />
<span>征收部门{{ item.zsbm }}</span>
</div>
<div>
<van-image :src="require('@/assets/img/project_year.png')" />
<img src="@/assets/img/project_year.png" />
<span>所属年份{{ item.year }}</span>
</div>
<div>
<van-image :src="require('@/assets/img/project_no.png')" />
<img src="@/assets/img/project_no.png" />
<span>征收决定号</span>
<span style="color: #3883f1">
{{ item.zsjdh }}
@@ -96,7 +96,7 @@
</div>
<div>
<span>被征收房屋地址</span>
<span class=" protocolTitle">
<span>
{{ assess.houseAddress }}
</span>
</div>
@@ -124,7 +124,7 @@
</div>
<div>
<span>被征收房屋地址</span>
<span class=" protocolTitle">
<span>
{{ protocol.houseAddress }}
</span>
</div>
@@ -187,6 +187,7 @@
import { apis } from "@/common/apis";
import { mgop } from "@aligov/jssdk-mgop";
import { SetTicket } from "@/common/util//tools";
import $ from "jquery";
export default {
name: "home",
data() {
@@ -207,21 +208,21 @@ export default {
{
name: "请求出错暂时没有可用数据",
currentState: "无数据",
area: "无数据",
area: "宁波市房屋建设和建筑管理局办公室",
zsbm: "无数据",
year: "无数据",
zsjdh: "无数据",
fhpgList: [
{
assessmentNo: "无数据",
houseAddress: "无数据",
assessmentNo: "宁波市房屋建设和建筑管理局办公室",
houseAddress: "宁波市房屋建设和建筑管理局办公室",
countValue: "无数据"
}
],
bcxyList: [
{
xyNo: "无数据",
houseAddress: "无数据",
houseAddress: "宁波市房屋建设和建筑管理局办公室",
switchProductionWay: "无数据",
summationShouldCompensateMoney: "无数据"
}
@@ -259,7 +260,10 @@ export default {
console.log("this", this);
this.setLocationAplus();
SetTicket(this.$route.query.ticket);
$(".bottomContent").addClass("display");
$("#app").addClass("padding");
},
methods: {
// 获取数据
onInit() {
@@ -278,7 +282,7 @@ export default {
onSuccess: data => {
console.log("首页数据", data);
window.sessionStorage.setItem("homeData", JSON.stringify(data));
if (data.data && data.data.success == true) {
if (data.data.success) {
this.loading = false;
this.data = data.data.data;
// 埋点
@@ -287,10 +291,25 @@ export default {
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"
);
} else console.log("用户无数据,不展示");
this.$message({
message: "登录超时,请重新登录",
duration: 3000,
type: "info",
center: true
});
setTimeout(() => {
window.location.replace(
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
);
}, 3000);
} else {
this.$message({
message: "请求出错",
duration: 3000,
type: "error",
center: true
});
}
}
},
onFail: err => {
@@ -305,6 +324,9 @@ export default {
},
// 跳转项目详情
gotoProject(type) {
$(".bottomContent").removeClass("display");
$("#app").removeClass("padding");
this.$router.push({
name: "projectSelect",
params: {
@@ -314,6 +336,8 @@ export default {
},
// 直接跳转分户评估结果页面
toEvaluate(id, type) {
$(".bottomContent").removeClass("display");
$("#app").removeClass("padding");
this.$router.push({
name: "evaluatePage",
params: {
@@ -324,6 +348,8 @@ export default {
},
// 直接跳转协议结果pdf
toAgreement(id) {
$(".bottomContent").removeClass("display");
$("#app").removeClass("padding");
this.$router.push({
name: "showPdf",
params: {
@@ -339,6 +365,8 @@ export default {
},
// 政策信息页面跳转
pageJump(id) {
$(".bottomContent").removeClass("display");
$("#app").removeClass("padding");
this.$router.push({
name: "policyInfo",
params: { id }
@@ -513,12 +541,7 @@ export default {
border-radius: 5px 0 0;
background: #3284cd;
}
.projectTitle {
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 16px;
font-weight: 600;
color: #fff;
}
span {
white-space: nowrap;
overflow: hidden;
@@ -547,6 +570,12 @@ export default {
}
}
}
.projectTitle {
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 16px;
font-weight: 600;
color: #fff;
}
.projectCenter {
padding-bottom: 25px;
background: #fff;
@@ -557,8 +586,7 @@ export default {
align-items: center;
padding-top: 15px;
width: 100%;
overflow: hidden;
.van-image {
img {
width: 15px;
height: 15px;
padding: 0 10px;
@@ -568,6 +596,9 @@ export default {
font-size: 14px;
font-weight: 400;
color: #2c2b2b;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
@@ -598,9 +629,13 @@ export default {
align-items: center;
justify-content: space-between;
padding-left: 12px;
> span:nth-child(1) {
span {
white-space: nowrap;
}
> span:nth-child(2) {
overflow: hidden;
text-overflow: ellipsis;
}
}
> div:nth-child(2) {
margin: 15px 0;
@@ -615,9 +650,13 @@ export default {
align-items: center;
justify-content: space-between;
padding-left: 12px;
> span:nth-child(1) {
span {
white-space: nowrap;
}
> span:nth-child(2) {
overflow: hidden;
text-overflow: ellipsis;
}
}
> div:nth-child(n + 2) {
margin: 15px 0;
@@ -625,11 +664,6 @@ export default {
}
}
.protocolTitle {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// 征收政策部分
.zszc {
span {