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

View File

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

View File

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