Compare commits

...

2 Commits

Author SHA1 Message Date
路 范
62bc534323 Merge branch 'master' of http://118.178.224.202:3000/ewide/zsxt_nbzs_h5 2021-09-22 10:33:06 +08:00
路 范
06153f732c pdf预览细节调整 2021-09-22 10:32:55 +08:00

View File

@@ -7,7 +7,7 @@
:loading="isloading" :loading="isloading"
>下载到手机</el-button >下载到手机</el-button
> >
<div v-for="(item, index) in apidata.pics" :key="index"> <div v-for="(item, index) in apidata.pics" :key="index" class="divbaseImg">
<van-image <van-image
:width="pic_width" :width="pic_width"
:height="pic_height" :height="pic_height"
@@ -27,8 +27,8 @@ export default {
return { return {
url: "", url: "",
apidata: {}, apidata: {},
pic_width: "auto", pic_width: "100%",
pic_height: "auto", pic_height: "100%",
isloading: true, isloading: true,
}; };
}, },
@@ -50,19 +50,19 @@ export default {
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C", id: "C655515B-FD91-48F2-BD79-EAABAFB7077C",
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: result => { onSuccess: (result) => {
console.log("pdf.vue页面请求pdf文件:", result); console.log("pdf.vue页面请求pdf文件:", result);
if (result.data && result.data.success == true) { if (result.data && result.data.success == true) {
console.log("result.data.data:", result.data.data); console.log("result.data.data:", result.data.data);
this.apidata = result.data.data; this.apidata = result.data.data;
this.pic_width = "94%"; this.pic_width = "100%";
this.pic_height = "100%"; this.pic_height = "100%";
this.isloading = false; this.isloading = false;
} }
}, },
onFail: err => { onFail: (err) => {
console.log("用户无数据,不展示"); console.log("用户无数据,不展示");
} },
}); });
}, },
saveImages() { saveImages() {
@@ -71,10 +71,10 @@ export default {
ZWJSBridge.saveImage({ ZWJSBridge.saveImage({
url: this.apidata.pdf, url: this.apidata.pdf,
}) })
.then(result => { .then((result) => {
console.log("saveImage()成功:" + JSON.stringify(result)); console.log("saveImage()成功:" + JSON.stringify(result));
}) })
.catch(error => { .catch((error) => {
console.log("saveImage()失败:" + JSON.stringify(result)); console.log("saveImage()失败:" + JSON.stringify(result));
console.log(error); console.log(error);
}); });
@@ -89,12 +89,12 @@ export default {
.then((result) => { .then((result) => {
console.log("测试新开窗口():" + result); console.log("测试新开窗口():" + result);
}) })
.catch(error => { .catch((error) => {
console.log(error); console.log(error);
}); });
}); });
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@@ -109,8 +109,13 @@ export default {
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.baseImg { .divbaseImg {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
.baseImg {
display: block;
margin: 0 auto;
padding: 0;
}
</style> </style>