askbot-dragon 1.3.64 → 1.3.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -165,11 +165,14 @@ export default {
|
|
|
165
165
|
url: url
|
|
166
166
|
},"*");
|
|
167
167
|
} else {
|
|
168
|
-
if (isMobile()) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
// if (isMobile()) {
|
|
169
|
+
// this.$refs.previewPdf.drawer = true;
|
|
170
|
+
// this.$refs.previewPdf.previewShowPopup = false;
|
|
171
|
+
// } else {
|
|
172
|
+
// this.$refs.previewPdf.drawer = false;
|
|
173
|
+
// }
|
|
174
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
175
|
+
this.$refs.previewPdf.drawer = false;
|
|
173
176
|
let index = url.lastIndexOf('?')
|
|
174
177
|
let type = ''
|
|
175
178
|
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
|
|
@@ -190,8 +193,10 @@ export default {
|
|
|
190
193
|
if(res.data.code == '0') {
|
|
191
194
|
this.previewHref = res.data.data;
|
|
192
195
|
if (isMobile()){
|
|
196
|
+
this.$refs.previewPdf.drawer = true;
|
|
193
197
|
this.$refs.previewPdf.previewShowPopup = true;
|
|
194
198
|
} else {
|
|
199
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
195
200
|
this.$refs.previewPdf.drawer = true;
|
|
196
201
|
}
|
|
197
202
|
this.$refs.previewPdf.fileType = type
|
|
@@ -210,7 +215,6 @@ export default {
|
|
|
210
215
|
}
|
|
211
216
|
})
|
|
212
217
|
}
|
|
213
|
-
|
|
214
218
|
},
|
|
215
219
|
fileType (url) {
|
|
216
220
|
const fileType = url.substring(url.lastIndexOf('.'));
|
|
@@ -61,7 +61,15 @@ export default {
|
|
|
61
61
|
currentPage: 0,
|
|
62
62
|
changetoolbar: false,
|
|
63
63
|
allTr:[],
|
|
64
|
-
preViewType: 'pdf'
|
|
64
|
+
preViewType: 'pdf',
|
|
65
|
+
displacement:{
|
|
66
|
+
pageX:0,
|
|
67
|
+
pageY:0,
|
|
68
|
+
moveable:false,
|
|
69
|
+
pageX2:0,
|
|
70
|
+
pageY2:0,
|
|
71
|
+
originScale:1,
|
|
72
|
+
}
|
|
65
73
|
}
|
|
66
74
|
},
|
|
67
75
|
// methods:{
|
|
@@ -827,14 +835,14 @@ export default {
|
|
|
827
835
|
that.displacement.pageY2 = events2.pageY;
|
|
828
836
|
}
|
|
829
837
|
|
|
830
|
-
that.displacement.originScale =
|
|
838
|
+
that.displacement.originScale = this.scale || 1;
|
|
831
839
|
// console.log(that.displacement);
|
|
832
840
|
});
|
|
833
841
|
document.addEventListener("touchmove", function (event) {
|
|
834
842
|
if (!that.displacement.moveable) {
|
|
835
843
|
return;
|
|
836
844
|
}
|
|
837
|
-
event.preventDefault();
|
|
845
|
+
// event.preventDefault();
|
|
838
846
|
let touches = event.touches;
|
|
839
847
|
let events = touches[0];
|
|
840
848
|
let events2 = touches[1];
|
|
@@ -885,7 +893,11 @@ export default {
|
|
|
885
893
|
}
|
|
886
894
|
});
|
|
887
895
|
});
|
|
888
|
-
}
|
|
896
|
+
},
|
|
897
|
+
getDistance(start, stop) {
|
|
898
|
+
// Math.hypot()计算参数的平方根
|
|
899
|
+
return Math.hypot(stop.x - start.x, stop.y - start.y);
|
|
900
|
+
},
|
|
889
901
|
},
|
|
890
902
|
computed:{
|
|
891
903
|
perviewUrl() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
|
|
2
|
+
<!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
|
|
3
3
|
<div class="footer">
|
|
4
4
|
<span>查看详情</span>
|
|
5
5
|
<section @click="close">
|
|
@@ -32,14 +32,17 @@
|
|
|
32
32
|
<div class="loading_img" v-show="loading">
|
|
33
33
|
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
|
|
34
34
|
</div>
|
|
35
|
-
</van-popup>
|
|
35
|
+
</van-popup> -->
|
|
36
36
|
<el-drawer
|
|
37
37
|
title="我是标题"
|
|
38
38
|
:visible.sync="drawer"
|
|
39
|
-
v-else-if="drawer"
|
|
40
39
|
:with-header="false"
|
|
41
|
-
|
|
40
|
+
:append-to-body="true"
|
|
41
|
+
:destroy-on-close="true"
|
|
42
|
+
:direction="previewShowPopup ? 'btt' : 'ltr'"
|
|
43
|
+
:size="previewShowPopup ? '90%' : '65%'"
|
|
42
44
|
>
|
|
45
|
+
<!-- v-else-if="drawer" -->
|
|
43
46
|
<div class="drawer-footer">
|
|
44
47
|
<span>查看详情</span>
|
|
45
48
|
<section @click="close">
|