askbot-dragon 1.6.70 → 1.6.71

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.6.70",
3
+ "version": "1.6.71",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -68,8 +68,8 @@ export default {
68
68
  drawer.style.overflowX = 'hidden';
69
69
  }
70
70
  this.$nextTick(() => {
71
- this.setColor();
72
71
  setTimeout(() => {
72
+ this.setColor();
73
73
  if (this.textWatermarkStr){
74
74
  newInitWaterMark('docHtml',this.textWatermarkStr)
75
75
  }
@@ -84,11 +84,13 @@ export default {
84
84
 
85
85
  },
86
86
  setColor(){
87
+ console.debug('split_paragraphs 87',this.fileSuffix,this.split_paragraphs)
87
88
  this.split_paragraphs.forEach((item,index) => {
88
89
  const colorIndex = index % this.colors.length;
89
90
  if (item.original_paragraph){
90
91
  item.original_paragraph.forEach(items => {
91
92
  let dom = document.getElementById(items.paragraph_id);
93
+ console.debug('dom 93',dom,this.fileSuffix)
92
94
  if (this.fileSuffix === 'TXT' || this.fileSuffix === 'MD'){
93
95
  const paragraphs = this.$el.querySelectorAll(`[paragraph-id="${items.paragraph_id}"]`);
94
96
  paragraphs.forEach(paragraph => {
@@ -141,8 +143,8 @@ export default {
141
143
  drawer.style.overflowX = 'hidden';
142
144
  }
143
145
  this.$nextTick(() => {
144
- this.setColor();
145
146
  setTimeout(() => {
147
+ this.setColor();
146
148
  if (this.textWatermarkStr){
147
149
  newInitWaterMark('docHtml',this.textWatermarkStr)
148
150
  }
@@ -172,8 +174,8 @@ export default {
172
174
  drawer.style.overflowX = 'hidden';
173
175
  }
174
176
  this.$nextTick(() => {
175
- this.setColor();
176
177
  setTimeout(() => {
178
+ this.setColor();
177
179
  if (this.textWatermarkStr){
178
180
  newInitWaterMark('docHtml',this.textWatermarkStr)
179
181
  }
@@ -193,8 +195,8 @@ export default {
193
195
  drawer.style.overflowX = 'hidden';
194
196
  }
195
197
  this.$nextTick(() => {
196
- this.setColor();
197
198
  setTimeout(() => {
199
+ this.setColor();
198
200
  if (this.textWatermarkStr){
199
201
  newInitWaterMark('docHtml',this.textWatermarkStr)
200
202
  }
@@ -196,6 +196,7 @@ export default {
196
196
  }
197
197
 
198
198
  }
199
+ console.debug('scrollToParagraph',dom,paragraphs,type)
199
200
  if (dom){
200
201
  dom.scrollIntoView({ behavior: 'smooth' });
201
202
  }
@@ -232,6 +232,14 @@ export default {
232
232
  isLining:{
233
233
  type: Boolean,
234
234
  default: false
235
+ },
236
+ processEnvUrl:{
237
+ type: String,
238
+ default: ''
239
+ },
240
+ isProduction:{
241
+ type: Boolean,
242
+ default: false
235
243
  }
236
244
  },
237
245
  components: {
@@ -284,11 +292,19 @@ export default {
284
292
  }
285
293
  },
286
294
  previewUrl () {
287
- console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
288
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
295
+ let url = ""
296
+ if (this.isProduction){
297
+ url = "https://kkfileview.askbot.cn/onlinePreview?url="
298
+ } else {
299
+ url = "https://test.open.askbot.cn/kkfileview/onlinePreview?url="
300
+ }
301
+ if (this.processEnvUrl){
302
+ url = this.processEnvUrl
303
+ }
289
304
  if(process.env.VUE_APP_SOURCE == 'lining_test') {
290
305
  url = 'https://wxgw.lining.com/askbot/kkfileview/onlinePreview?url='
291
306
  }
307
+ console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV,process.env.VUE_APP_SOURCE,url)
292
308
  // if(this.url != '') {
293
309
  // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
294
310
  // url += btoa(encodeURIComponent(this.url))