update:优化请求,减少页面请求次数
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import pdf from "vue-pdf";
|
||||
import $ from "jquery";
|
||||
import { mgop } from "@aligov/jssdk-mgop";
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
@@ -40,44 +37,16 @@ export default {
|
||||
created() {
|
||||
this.onInit();
|
||||
},
|
||||
mounted() {
|
||||
if (
|
||||
650 >=
|
||||
$(".container")
|
||||
.css("height")
|
||||
.substr(0, 5)
|
||||
) {
|
||||
$(".bottomContent").addClass("absolute");
|
||||
} else {
|
||||
$(".absolute").removeClass("absolute");
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
onInit() {
|
||||
mgop({
|
||||
api: "mgop.kykj.houseexpropriat.getHouseEstimateInfoJzlr",
|
||||
host: "https://mapi.zjzwfw.gov.cn/",
|
||||
dataType: "JSON",
|
||||
type: "POST",
|
||||
data: {
|
||||
ticket: window.sessionStorage.getItem("ticket"),
|
||||
id: window.sessionStorage.getItem("fhpgId"),
|
||||
type: window.sessionStorage.getItem("fhpgType")
|
||||
},
|
||||
appKey: "es4b8zmz+2001833218+dehllx",
|
||||
onSuccess: data => {
|
||||
const result = data;
|
||||
if (result.data && result.data.success == true) {
|
||||
this.apidata = result.data.data;
|
||||
this.pic_width = "100%";
|
||||
this.pic_height = "100%";
|
||||
this.isloading = false;
|
||||
}
|
||||
},
|
||||
onFail: err => {
|
||||
console.log("请求失败", err);
|
||||
}
|
||||
});
|
||||
let result = JSON.parse(window.sessionStorage.getItem("evaluateData"));
|
||||
if (result.data && result.data.success == true) {
|
||||
this.apidata = result.data.data;
|
||||
this.pic_width = "100%";
|
||||
this.pic_height = "100%";
|
||||
this.isloading = false;
|
||||
}
|
||||
},
|
||||
saveImages() {
|
||||
ZWJSBridge.onReady(() => {
|
||||
@@ -141,6 +110,7 @@ export default {
|
||||
bottom: 0px;
|
||||
}
|
||||
.bottomContent {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user