askbot-dragon 1.1.14 → 1.1.16
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
|
@@ -133,38 +133,41 @@ export default {
|
|
|
133
133
|
methods: {
|
|
134
134
|
//预览图片
|
|
135
135
|
lookAttach(url, item) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} else {
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
136
|
+
window.top.postMessage({
|
|
137
|
+
data: "bot_preview",
|
|
138
|
+
item: JSON.stringify(item),
|
|
139
|
+
url: url
|
|
140
|
+
},"*");
|
|
141
|
+
// let index = url.lastIndexOf('?')
|
|
142
|
+
// let type = ''
|
|
143
|
+
// let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
|
|
144
|
+
// if (index !== -1) {
|
|
145
|
+
// url = url.substring(0, index)
|
|
146
|
+
// type = this.fileType(url)
|
|
147
|
+
// } else {
|
|
148
|
+
// type = this.fileType(url)
|
|
149
|
+
// }
|
|
150
|
+
// if (type === '' || type === 'OTHER') {
|
|
151
|
+
// httpUrl = httpUrl += '?needEncrypt=true'
|
|
152
|
+
// } else {
|
|
153
|
+
// httpUrl = httpUrl += '?needEncrypt=false'
|
|
154
|
+
// }
|
|
155
|
+
// this.$http.post(httpUrl, {
|
|
156
|
+
// "fileInOssPath":url
|
|
157
|
+
// }).then(res =>{
|
|
158
|
+
// if(res.data.code == '0') {
|
|
159
|
+
// this.previewHref = res.data.data
|
|
160
|
+
// this.$refs.previewPdf.previewShowPopup = true;
|
|
161
|
+
// this.$refs.previewPdf.fileType = type
|
|
162
|
+
// this.$nextTick(() =>{
|
|
163
|
+
// if(item.source == 'CREATED_BY_ONESELF') {
|
|
164
|
+
// this.$refs.previewPdf.getBolb(item)
|
|
165
|
+
// } else {
|
|
166
|
+
// this.$refs.previewPdf.loadIframe(item)
|
|
167
|
+
// }
|
|
168
|
+
// })
|
|
169
|
+
// }
|
|
170
|
+
// })
|
|
168
171
|
},
|
|
169
172
|
fileType (url) {
|
|
170
173
|
const fileType = url.substring(url.lastIndexOf('.'));
|