update:增加首页yicket

This commit is contained in:
2021-10-18 14:33:31 +08:00
parent bace5b529b
commit ccd1183caa
3 changed files with 71 additions and 48 deletions

View File

@@ -205,6 +205,7 @@ export default {
return {
mode: false,
data: {
// 522121123456789102223
idCard: "522121123456789102223",
userName: "加载中...",
policiesRegulationsLists: {
@@ -300,57 +301,64 @@ export default {
},
methods: {
// 获取数据
onInit() {
mgop({
api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.query.ticket
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
console.log("首页数据", data);
window.sessionStorage.setItem("homeData", JSON.stringify(data));
if (data.data.success) {
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) {
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);
if (!this.$route.query.ticket) {
window.location.replace(
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
);
} else {
mgop({
api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.query.ticket
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
console.log("首页数据", data);
window.sessionStorage.setItem("homeData", JSON.stringify(data));
if (data.data.success) {
this.data = data.data.data;
// 埋点
this.setZwUserAplus(this.data.idCard, this.data.userName);
} else {
this.$message({
message: "请求出错",
duration: 3000,
type: "error",
center: true
});
var errorCodes = [6001, 6501];
// 跳转到政务系统;
if (errorCodes.indexOf(data.data.bizCode) > -1) {
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 => {
this.$notify({
title: "错误",
message: "请求失败",
duration: 3000,
type: "error"
});
}
},
onFail: err => {
this.$notify({
title: "错误",
message: "请求失败",
duration: 3000,
type: "error"
});
}
});
});
}
},
toOlderMode() {
if (sessionStorage.getItem("mode") == "older") {
@@ -545,6 +553,9 @@ export default {
span:nth-child(2) {
white-space: nowrap;
}
:nth-child(3) {
padding-top: 1px;
}
}
.gridBg {
display: flex;
@@ -669,6 +680,7 @@ export default {
}
> :last-child {
color: #363a44;
padding-top: 1px;
// width: 55%;
}
.blue {
@@ -815,12 +827,14 @@ export default {
.baseInfo {
align-items: flex-start;
font-size: 22px;
line-height: 30px;
img {
height: 30px;
padding-left: 15px;
}
> div:nth-child(3) {
word-break: break-all;
padding-top: 2px;
}
}
.gridBg {
@@ -859,6 +873,8 @@ export default {
> span {
font-size: 20px;
border-radius: 0px 13px 13px 0px;
// height: unset;
// line-height: unset;
}
}
}

View File

@@ -186,6 +186,9 @@ export default {
> :nth-child(2) {
> div:nth-child(2) {
margin-top: 10px;
span:nth-child(2) {
padding-top: 1px;
}
}
}
.proCenterImg {
@@ -297,6 +300,8 @@ export default {
}
span:nth-child(2) {
word-break: break-all;
line-height: 36px;
margin-top: -4px;
}
}
}

View File

@@ -245,9 +245,10 @@ export default {
align-items: flex-start;
line-height: 20px;
color: #b3b5b9;
img {
> img {
margin-right: 6px;
width: 20px;
margin-top: -1px;
}
> span:nth-child(2) {
margin-right: 16px;
@@ -294,6 +295,7 @@ export default {
background-color: #e3ebfd;
img {
margin-right: 4px;
width: 20px;
}
span {
padding-right: 10px;