update:优化请求,减少页面请求次数
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<div
|
||||
class="container"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
>
|
||||
<div class="container">
|
||||
<div :class="this.type == 'pg' ? 'proTopBoxpg' : 'proTopBoxxy'">
|
||||
<div class="proCenterBox">
|
||||
<div class="proCenterInfo">
|
||||
@@ -74,11 +69,9 @@
|
||||
<script>
|
||||
import "./project.css";
|
||||
import $ from "jquery";
|
||||
import { mgop } from "@aligov/jssdk-mgop";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
type: "",
|
||||
data: new Object(),
|
||||
finished: true,
|
||||
@@ -123,25 +116,10 @@ export default {
|
||||
if (this.$route.params.type) {
|
||||
window.sessionStorage.setItem("type", this.$route.params.type);
|
||||
}
|
||||
mgop({
|
||||
api: "mgop.kykj.houseexpropriat.getprjlist",
|
||||
host: "https://mapi.zjzwfw.gov.cn/",
|
||||
dataType: "JSON",
|
||||
type: "POST",
|
||||
data: {
|
||||
ticket: window.sessionStorage.getItem("ticket")
|
||||
},
|
||||
appKey: "es4b8zmz+2001833218+dehllx",
|
||||
onSuccess: data => {
|
||||
if (data.data.success == true) {
|
||||
this.loading = false;
|
||||
this.info = data.data.data;
|
||||
}
|
||||
},
|
||||
onFail: err => {
|
||||
console.log("用户无数据,不展示");
|
||||
}
|
||||
});
|
||||
let result = JSON.parse(window.sessionStorage.getItem("homeData"));
|
||||
if (result.data.success == true) {
|
||||
this.info = result.data.data;
|
||||
}
|
||||
},
|
||||
setIdCard(id) {
|
||||
return id == "无数据"
|
||||
|
||||
Reference in New Issue
Block a user