|
|
@@ -8,10 +8,11 @@ Page({
|
|
8
|
8
|
selectedWords: [],
|
|
9
|
9
|
difficulty: 0,
|
|
10
|
10
|
difficulties: constant1.arrHardLevel,
|
|
|
11
|
+ articleStyles: constant1.arrArticleStyle,
|
|
|
12
|
+ articleStyle: '',
|
|
11
|
13
|
generatedArticle: '',
|
|
12
|
14
|
articleTranslation: '',
|
|
13
|
15
|
generating: false,
|
|
14
|
|
- generatingImage: false,
|
|
15
|
16
|
Content:"",
|
|
16
|
17
|
},
|
|
17
|
18
|
|
|
|
@@ -40,21 +41,43 @@ Page({
|
|
40
|
41
|
});
|
|
41
|
42
|
},
|
|
42
|
43
|
|
|
|
44
|
+ onArticleStyleChange: function(e) {
|
|
|
45
|
+ this.setData({
|
|
|
46
|
+ articleStyle: e.detail.value
|
|
|
47
|
+ });
|
|
|
48
|
+ console.log('选择的文章类型:', e.detail.value);
|
|
|
49
|
+ },
|
|
|
50
|
+
|
|
43
|
51
|
generateArticle: async function() {
|
|
44
|
52
|
let that=this;
|
|
45
|
|
- this.setData({ generating: true });
|
|
|
53
|
+
|
|
|
54
|
+ if (!this.data.articleStyle) {
|
|
|
55
|
+ wx.showToast({
|
|
|
56
|
+ title: '请选择文章类型',
|
|
|
57
|
+ icon: 'none'
|
|
|
58
|
+ });
|
|
|
59
|
+ return;
|
|
|
60
|
+ }
|
|
|
61
|
+
|
|
|
62
|
+ this.setData({
|
|
|
63
|
+ generating: true,
|
|
|
64
|
+ Content:""
|
|
|
65
|
+ });
|
|
46
|
66
|
|
|
47
|
67
|
try {
|
|
48
|
68
|
let url = common.Encrypt("GenerateArticle");
|
|
49
|
|
- url="https://www.kylx365.com/apiData/"+url;
|
|
|
69
|
+ //url="https://www.kylx365.com/apiData/"+url;
|
|
|
70
|
+ url="http://localhost:3020/api/GenerateArticle";
|
|
50
|
71
|
let words=that.data.wordList;
|
|
|
72
|
+ debugger;
|
|
51
|
73
|
const cloudRes = await new Promise((resolve, reject) => {
|
|
52
|
74
|
wx.request({
|
|
53
|
75
|
url: url,
|
|
54
|
76
|
method: "POST",
|
|
55
|
77
|
data: {
|
|
56
|
78
|
Words:JSON.stringify(words),
|
|
57
|
|
- Level:that.data.difficulty
|
|
|
79
|
+ Level:that.data.difficulty,
|
|
|
80
|
+ Style:that.data.articleStyle
|
|
58
|
81
|
},
|
|
59
|
82
|
success: resolve,
|
|
60
|
83
|
fail: reject,
|
|
|
@@ -102,317 +125,112 @@ Page({
|
|
102
|
125
|
})
|
|
103
|
126
|
},
|
|
104
|
127
|
|
|
105
|
|
- generateImage: async function() {
|
|
106
|
|
- const that = this;
|
|
107
|
|
- this.setData({ generatingImage: true });
|
|
|
128
|
+ generateTestArticle:function(e){
|
|
|
129
|
+ this.setData({
|
|
|
130
|
+ Content:{
|
|
|
131
|
+ Title: "Sample Reading Article",
|
|
|
132
|
+ ArticleEnglishStr:"This is a <span>sample</span> article for testing the PDF generation functionality.It contains multiple paragraphs and some <span>bold text</span> to test formatting.The PDF should be generated with proper layout and styling.",
|
|
|
133
|
+ ArticleEnglish: [
|
|
|
134
|
+ "This is a <span>sample</span> article for testing the PDF generation functionality.",
|
|
|
135
|
+ "It contains multiple paragraphs and some <span>bold text</span> to test formatting.",
|
|
|
136
|
+ "The PDF should be generated with proper layout and styling."
|
|
|
137
|
+ ],
|
|
|
138
|
+ Question: [
|
|
|
139
|
+ {
|
|
|
140
|
+ QuestionEnglish: "What is the purpose of this article?",
|
|
|
141
|
+ OptionsEnglish: [
|
|
|
142
|
+ "A. To test PDF generation",
|
|
|
143
|
+ "B. To teach English",
|
|
|
144
|
+ "C. To demonstrate formatting",
|
|
|
145
|
+ "D. All of the above"
|
|
|
146
|
+ ]
|
|
|
147
|
+ },
|
|
|
148
|
+ {
|
|
|
149
|
+ QuestionEnglish: "What special formatting is used in this article?",
|
|
|
150
|
+ OptionsEnglish: [
|
|
|
151
|
+ "A. Italics",
|
|
|
152
|
+ "B. Bold text",
|
|
|
153
|
+ "C. Underline",
|
|
|
154
|
+ "D. Strikethrough"
|
|
|
155
|
+ ]
|
|
|
156
|
+ }
|
|
|
157
|
+ ]
|
|
|
158
|
+ },
|
|
|
159
|
+ })
|
|
|
160
|
+ },
|
|
|
161
|
+
|
|
|
162
|
+ //生成PDF文件
|
|
|
163
|
+ //访问服务器的GeneratePDF接口,提交this.data.Content数据,获得一个生成好的pdf文件,服务端的代码已经生成好
|
|
|
164
|
+ generatePDF: function(e) {
|
|
|
165
|
+ let that = this;
|
|
|
166
|
+ this.setData({
|
|
|
167
|
+ generatingPDF: true,
|
|
|
168
|
+ });
|
|
108
|
169
|
|
|
109
|
|
- try {
|
|
110
|
|
- const query = wx.createSelectorQuery();
|
|
111
|
|
- query.select('#articleCanvas')
|
|
112
|
|
- .fields({ node: true, size: true })
|
|
113
|
|
- .exec((res) => {
|
|
114
|
|
- const canvas = res[0].node;
|
|
115
|
|
- const ctx = canvas.getContext('2d');
|
|
116
|
|
-
|
|
117
|
|
- // 基本设置
|
|
118
|
|
- canvas.width = 595;
|
|
119
|
|
- canvas.height = 842;
|
|
120
|
|
- const margin = 40;
|
|
121
|
|
- const lineHeight = 24;
|
|
122
|
|
- const articleWidth = canvas.width - 2 * margin;
|
|
123
|
|
-
|
|
124
|
|
- // 计算内容高度的函数
|
|
125
|
|
- const calculateHeight = () => {
|
|
126
|
|
- let yPos = 40;
|
|
127
|
|
-
|
|
128
|
|
- // 标题高度
|
|
129
|
|
- yPos += 40;
|
|
130
|
|
-
|
|
131
|
|
- // 文章高度
|
|
132
|
|
- ctx.font = '16px Arial';
|
|
133
|
|
- let articleText = that.data.Content.ArticleEnglish.join(" ");
|
|
134
|
|
- articleText = articleText.replace(/<span[^>]*>(.*?)<\/span>/g, '###BOLD###$1###BOLD###');
|
|
135
|
|
- const words = articleText.split(/\s+/);
|
|
136
|
|
-
|
|
137
|
|
- let lineWidth = 0;
|
|
138
|
|
- words.forEach(word => {
|
|
139
|
|
- if (!word) return;
|
|
140
|
|
-
|
|
141
|
|
- let wordToDraw = word.includes('###BOLD###') ?
|
|
142
|
|
- word.replace(/###BOLD###/g, '') : word;
|
|
143
|
|
-
|
|
144
|
|
- if (/[.,!?;:]$/.test(wordToDraw)) {
|
|
145
|
|
- wordToDraw = wordToDraw.slice(0, -1);
|
|
146
|
|
- }
|
|
147
|
|
-
|
|
148
|
|
- const spaceWidth = ctx.measureText(' ').width;
|
|
149
|
|
- const wordWidth = ctx.measureText(wordToDraw).width;
|
|
150
|
|
- const puncWidth = /[.,!?;:]$/.test(word) ?
|
|
151
|
|
- ctx.measureText(word.slice(-1)).width : 0;
|
|
152
|
|
-
|
|
153
|
|
- if (lineWidth + wordWidth + puncWidth + (lineWidth > 0 ? spaceWidth : 0) > articleWidth) {
|
|
154
|
|
- yPos += lineHeight;
|
|
155
|
|
- lineWidth = 0;
|
|
156
|
|
- }
|
|
157
|
|
-
|
|
158
|
|
- lineWidth += wordWidth + puncWidth + (lineWidth > 0 ? spaceWidth : 0);
|
|
159
|
|
- });
|
|
160
|
|
-
|
|
161
|
|
- yPos += lineHeight * 2;
|
|
162
|
|
-
|
|
163
|
|
- // 分隔线和问题标题高度
|
|
164
|
|
- yPos += lineHeight * 2.5;
|
|
165
|
|
-
|
|
166
|
|
- // 问题高度
|
|
167
|
|
- const questions = that.data.Content.Question;
|
|
168
|
|
- questions.forEach(question => {
|
|
169
|
|
- //debugger;
|
|
170
|
|
- // 问题文本高度
|
|
171
|
|
- const questionText = question.QuestionEnglish || '';
|
|
172
|
|
- let textWidth = 0;
|
|
173
|
|
- const words = questionText.split(' ');
|
|
174
|
|
- words.forEach(word => {
|
|
175
|
|
- const wordWidth = ctx.measureText(word + ' ').width;
|
|
176
|
|
- if (textWidth + wordWidth > articleWidth) {
|
|
177
|
|
- yPos += lineHeight;
|
|
178
|
|
- textWidth = wordWidth;
|
|
179
|
|
- } else {
|
|
180
|
|
- textWidth += wordWidth;
|
|
181
|
|
- }
|
|
182
|
|
- });
|
|
183
|
|
- yPos += lineHeight;
|
|
184
|
|
-
|
|
185
|
|
- // 选项高度
|
|
186
|
|
- if (question.OptionsEnglish && Array.isArray(question.OptionsEnglish)) {
|
|
187
|
|
- question.OptionsEnglish.forEach(option => {
|
|
188
|
|
- if (!option) return;
|
|
189
|
|
- textWidth = 20; // 选项缩进
|
|
190
|
|
- const words = option.split(' ');
|
|
191
|
|
- words.forEach(word => {
|
|
192
|
|
- const wordWidth = ctx.measureText(word + ' ').width;
|
|
193
|
|
- if (textWidth + wordWidth > articleWidth) {
|
|
194
|
|
- yPos += lineHeight;
|
|
195
|
|
- textWidth = 20 + wordWidth;
|
|
196
|
|
- } else {
|
|
197
|
|
- textWidth += wordWidth;
|
|
198
|
|
- }
|
|
199
|
|
- });
|
|
200
|
|
- yPos += lineHeight;
|
|
201
|
|
- });
|
|
202
|
|
- }
|
|
203
|
|
-
|
|
204
|
|
- yPos += lineHeight / 2;
|
|
205
|
|
- });
|
|
206
|
|
-
|
|
207
|
|
- return yPos + margin;
|
|
208
|
|
- };
|
|
209
|
|
-
|
|
210
|
|
- // 计算所需高度
|
|
211
|
|
- const requiredHeight = calculateHeight();
|
|
212
|
|
- canvas.height = Math.max(842, requiredHeight);
|
|
213
|
|
-
|
|
214
|
|
- // 绘制背景
|
|
215
|
|
- ctx.fillStyle = '#ffffff';
|
|
216
|
|
- ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
217
|
|
- ctx.fillStyle = '#000000';
|
|
218
|
|
- ctx.textBaseline = 'top';
|
|
219
|
|
-
|
|
220
|
|
- // 绘制标题
|
|
221
|
|
- let yPos = 40;
|
|
222
|
|
- ctx.font = 'bold 20px Arial';
|
|
223
|
|
- const title = that.data.Content.Title || "English Reading Practice";
|
|
224
|
|
- const titleWidth = ctx.measureText(title).width;
|
|
225
|
|
- ctx.fillText(title, (canvas.width - titleWidth) / 2, yPos);
|
|
226
|
|
- yPos += 40;
|
|
227
|
|
-
|
|
228
|
|
- // 绘制文章
|
|
229
|
|
- ctx.font = '16px Arial';
|
|
230
|
|
- let articleText = that.data.Content.ArticleEnglish.join(" ");
|
|
231
|
|
- articleText = articleText.replace(/<span[^>]*>(.*?)<\/span>/g, '###BOLD###$1###BOLD###');
|
|
232
|
|
- const words = articleText.split(/\s+/);
|
|
233
|
|
-
|
|
234
|
|
- let xPos = margin;
|
|
235
|
|
- let lineWidth = 0;
|
|
236
|
|
-
|
|
237
|
|
- words.forEach(word => {
|
|
238
|
|
- if (!word) return;
|
|
239
|
|
-
|
|
240
|
|
- // 处理加粗和标点
|
|
241
|
|
- let isBold = word.includes('###BOLD###');
|
|
242
|
|
- let wordToDraw = isBold ? word.replace(/###BOLD###/g, '') : word;
|
|
243
|
|
- let punctuation = '';
|
|
244
|
|
-
|
|
245
|
|
- if (/[.,!?;:]$/.test(wordToDraw)) {
|
|
246
|
|
- punctuation = wordToDraw.slice(-1);
|
|
247
|
|
- wordToDraw = wordToDraw.slice(0, -1);
|
|
248
|
|
- }
|
|
249
|
|
-
|
|
250
|
|
- // 设置字体
|
|
251
|
|
- ctx.font = isBold ? 'bold 16px Arial' : '16px Arial';
|
|
252
|
|
-
|
|
253
|
|
- // 计算宽度
|
|
254
|
|
- const spaceWidth = ctx.measureText(' ').width;
|
|
255
|
|
- const wordWidth = ctx.measureText(wordToDraw).width;
|
|
256
|
|
- const puncWidth = punctuation ? ctx.measureText(punctuation).width : 0;
|
|
257
|
|
- const totalWidth = wordWidth + puncWidth;
|
|
258
|
|
-
|
|
259
|
|
- // 检查换行
|
|
260
|
|
- if (lineWidth + totalWidth + (lineWidth > 0 ? spaceWidth : 0) > articleWidth) {
|
|
261
|
|
- xPos = margin;
|
|
262
|
|
- yPos += lineHeight;
|
|
263
|
|
- lineWidth = 0;
|
|
264
|
|
- }
|
|
265
|
|
-
|
|
266
|
|
- // 添加空格
|
|
267
|
|
- if (lineWidth > 0) {
|
|
268
|
|
- xPos += spaceWidth;
|
|
269
|
|
- lineWidth += spaceWidth;
|
|
270
|
|
- }
|
|
271
|
|
-
|
|
272
|
|
- // 绘制单词
|
|
273
|
|
- ctx.fillText(wordToDraw, xPos, yPos);
|
|
274
|
|
-
|
|
275
|
|
- // 绘制标点
|
|
276
|
|
- if (punctuation) {
|
|
277
|
|
- ctx.font = '16px Arial';
|
|
278
|
|
- ctx.fillText(punctuation, xPos + wordWidth, yPos);
|
|
279
|
|
- }
|
|
280
|
|
-
|
|
281
|
|
- xPos += totalWidth;
|
|
282
|
|
- lineWidth += totalWidth;
|
|
283
|
|
- });
|
|
284
|
|
-
|
|
285
|
|
- // 添加分隔线
|
|
286
|
|
- yPos += lineHeight * 2;
|
|
287
|
|
- ctx.beginPath();
|
|
288
|
|
- ctx.moveTo(margin, yPos);
|
|
289
|
|
- ctx.lineTo(canvas.width - margin, yPos);
|
|
290
|
|
- ctx.stroke();
|
|
291
|
|
- yPos += lineHeight;
|
|
292
|
|
-
|
|
293
|
|
- // 绘制问题标题
|
|
294
|
|
- ctx.font = 'bold 16px Arial';
|
|
295
|
|
- ctx.fillText("Reading Comprehension Questions:", margin, yPos);
|
|
296
|
|
- yPos += lineHeight * 1.5;
|
|
297
|
|
-
|
|
298
|
|
- // 绘制问题
|
|
299
|
|
- const questions = that.data.Content.Question;
|
|
300
|
|
- questions.forEach((question, index) => {
|
|
301
|
|
- // 绘制问题
|
|
302
|
|
- ctx.font = 'bold 16px Arial';
|
|
303
|
|
- const questionText = `${index + 1}. ${question.QuestionEnglish || ''}`;
|
|
304
|
|
- const words = questionText.split(' ');
|
|
305
|
|
- let line = '';
|
|
306
|
|
- let testLine = '';
|
|
307
|
|
-
|
|
308
|
|
- words.forEach(word => {
|
|
309
|
|
- testLine = line + (line ? ' ' : '') + word;
|
|
310
|
|
- if (ctx.measureText(testLine).width > articleWidth) {
|
|
311
|
|
- ctx.fillText(line, margin, yPos);
|
|
312
|
|
- yPos += lineHeight;
|
|
313
|
|
- line = word;
|
|
314
|
|
- } else {
|
|
315
|
|
- line = testLine;
|
|
316
|
|
- }
|
|
317
|
|
- });
|
|
318
|
|
- if (line) {
|
|
319
|
|
- ctx.fillText(line, margin, yPos);
|
|
320
|
|
- yPos += lineHeight;
|
|
321
|
|
- }
|
|
322
|
|
-
|
|
323
|
|
- // 绘制选项
|
|
324
|
|
- ctx.font = '16px Arial';
|
|
325
|
|
- if (question.OptionsEnglish && Array.isArray(question.OptionsEnglish)) {
|
|
326
|
|
- question.OptionsEnglish.forEach((option, optIndex) => {
|
|
327
|
|
- if (!option) return;
|
|
328
|
|
-
|
|
329
|
|
- const optionText = `${option}`;
|
|
330
|
|
- const optionWords = optionText.split(' ');
|
|
331
|
|
- line = '';
|
|
332
|
|
- testLine = '';
|
|
333
|
|
-
|
|
334
|
|
- optionWords.forEach(word => {
|
|
335
|
|
- testLine = line + (line ? ' ' : '') + word;
|
|
336
|
|
- if (ctx.measureText(testLine).width > articleWidth - 20) {
|
|
337
|
|
- ctx.fillText(line, margin + 20, yPos);
|
|
338
|
|
- yPos += lineHeight;
|
|
339
|
|
- line = word;
|
|
340
|
|
- } else {
|
|
341
|
|
- line = testLine;
|
|
342
|
|
- }
|
|
343
|
|
- });
|
|
344
|
|
- if (line) {
|
|
345
|
|
- ctx.fillText(line, margin + 20, yPos);
|
|
346
|
|
- yPos += lineHeight;
|
|
347
|
|
- }
|
|
348
|
|
- });
|
|
349
|
|
- }
|
|
350
|
|
-
|
|
351
|
|
- yPos += lineHeight / 2;
|
|
352
|
|
- });
|
|
|
170
|
+ let url = common.Encrypt("GeneratePDF");
|
|
|
171
|
+ url = "https://www.kylx365.com/apiData/" + url;
|
|
|
172
|
+ //url="http://localhost:3020/api/GeneratePDF";
|
|
|
173
|
+ wx.request({
|
|
|
174
|
+ url: url,
|
|
|
175
|
+ method: "POST",
|
|
|
176
|
+ data: {
|
|
|
177
|
+ Content: that.data.Content
|
|
|
178
|
+ },
|
|
|
179
|
+ responseType: 'arraybuffer', // 确保响应类型为arraybuffer
|
|
|
180
|
+ success: function(res) {
|
|
|
181
|
+ // 将arraybuffer转为临时文件
|
|
|
182
|
+ const fsm = wx.getFileSystemManager();
|
|
|
183
|
+ const tempFilePath = `${wx.env.USER_DATA_PATH}/temp_${Date.now()}.pdf`;
|
|
|
184
|
+
|
|
|
185
|
+ try {
|
|
|
186
|
+ fsm.writeFileSync(
|
|
|
187
|
+ tempFilePath,
|
|
|
188
|
+ res.data,
|
|
|
189
|
+ 'binary'
|
|
|
190
|
+ );
|
|
|
191
|
+
|
|
|
192
|
+ // 直接使用临时文件路径,不再尝试永久保存
|
|
|
193
|
+ console.log('文件已生成:', tempFilePath);
|
|
353
|
194
|
|
|
354
|
|
- // 保存图片
|
|
355
|
|
- wx.canvasToTempFilePath({
|
|
356
|
|
- canvas: canvas,
|
|
357
|
|
- width: canvas.width,
|
|
358
|
|
- height: canvas.height,
|
|
359
|
|
- destWidth: canvas.width * 2,
|
|
360
|
|
- destHeight: canvas.height * 2,
|
|
361
|
|
- fileType: 'jpg',
|
|
362
|
|
- quality: 0.9,
|
|
363
|
|
- success(res) {
|
|
364
|
|
- wx.saveImageToPhotosAlbum({
|
|
365
|
|
- filePath: res.tempFilePath,
|
|
366
|
|
- success() {
|
|
367
|
|
- wx.showToast({
|
|
368
|
|
- title: '图片已保存到相册',
|
|
369
|
|
- icon: 'success',
|
|
370
|
|
- duration: 2000
|
|
371
|
|
- });
|
|
372
|
|
- that.setData({ generatingImage: false });
|
|
373
|
|
- },
|
|
374
|
|
- fail(err) {
|
|
375
|
|
- console.error('保存图片失败:', err);
|
|
376
|
|
- if (err.errMsg.indexOf('auth deny') >= 0 || err.errMsg.indexOf('authorize') >= 0) {
|
|
377
|
|
- wx.showModal({
|
|
378
|
|
- title: '提示',
|
|
379
|
|
- content: '需要您授权保存图片到相册',
|
|
380
|
|
- showCancel: false,
|
|
381
|
|
- success() {
|
|
382
|
|
- wx.openSetting({
|
|
383
|
|
- success(res) {
|
|
384
|
|
- console.log('设置结果', res);
|
|
385
|
|
- }
|
|
386
|
|
- });
|
|
387
|
|
- }
|
|
388
|
|
- });
|
|
389
|
|
- } else {
|
|
390
|
|
- wx.showToast({
|
|
391
|
|
- title: '保存图片失败',
|
|
392
|
|
- icon: 'none'
|
|
393
|
|
- });
|
|
394
|
|
- }
|
|
395
|
|
- that.setData({ generatingImage: false });
|
|
396
|
|
- }
|
|
|
195
|
+ // 打开PDF文件预览
|
|
|
196
|
+ wx.openDocument({
|
|
|
197
|
+ filePath: tempFilePath,
|
|
|
198
|
+ fileType: 'pdf',
|
|
|
199
|
+ showMenu: true, // 显示右上角菜单,可以分享
|
|
|
200
|
+ success: function() {
|
|
|
201
|
+ console.log('打开文档成功');
|
|
|
202
|
+ wx.showToast({
|
|
|
203
|
+ title: 'PDF生成成功',
|
|
|
204
|
+ icon: 'success'
|
|
397
|
205
|
});
|
|
398
|
206
|
},
|
|
399
|
|
- fail(err) {
|
|
400
|
|
- console.error('生成图片失败:', err);
|
|
|
207
|
+ fail: function(error) {
|
|
|
208
|
+ console.error('打开文档失败:', error);
|
|
401
|
209
|
wx.showToast({
|
|
402
|
|
- title: '生成图片失败',
|
|
|
210
|
+ title: '打开文件失败',
|
|
403
|
211
|
icon: 'none'
|
|
404
|
212
|
});
|
|
405
|
|
- that.setData({ generatingImage: false });
|
|
406
|
213
|
}
|
|
407
|
214
|
});
|
|
|
215
|
+ } catch (error) {
|
|
|
216
|
+ console.error('写入文件失败:', error);
|
|
|
217
|
+ wx.showToast({
|
|
|
218
|
+ title: '写入文件失败',
|
|
|
219
|
+ icon: 'none'
|
|
|
220
|
+ });
|
|
|
221
|
+ }
|
|
|
222
|
+ },
|
|
|
223
|
+ fail: function(err) {
|
|
|
224
|
+ console.error('请求GeneratePDF接口失败:', err);
|
|
|
225
|
+ wx.showToast({
|
|
|
226
|
+ title: '网络错误,请稍候重试',
|
|
|
227
|
+ icon: 'none'
|
|
408
|
228
|
});
|
|
409
|
|
- } catch (error) {
|
|
410
|
|
- console.error('生成图片过程出错:', error);
|
|
411
|
|
- wx.showToast({
|
|
412
|
|
- title: '生成图片失败',
|
|
413
|
|
- icon: 'none'
|
|
414
|
|
- });
|
|
415
|
|
- this.setData({ generatingImage: false });
|
|
416
|
|
- }
|
|
417
|
|
- }
|
|
|
229
|
+ },
|
|
|
230
|
+ complete: function() {
|
|
|
231
|
+ that.setData({ generatingPDF: false });
|
|
|
232
|
+ }
|
|
|
233
|
+ });
|
|
|
234
|
+ },
|
|
|
235
|
+
|
|
418
|
236
|
});
|