chengjie 2 mēneši atpakaļ
vecāks
revīzija
300a6df3ad

+ 1 - 1
app.js

@@ -1,6 +1,6 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "1.1.6",
3
+    Version: "1.1.8",
4 4
     //IsProduction: true,
5 5
     ShareTitle: "阅读理解+答题",
6 6
     SharePath: "pages/index/index",

+ 14 - 0
app.json

@@ -29,6 +29,14 @@
29 29
         "main/product",
30 30
         "main/feedbackinfo"
31 31
       ]
32
+    },
33
+    {
34
+      "root": "packageReader",
35
+      "pages": [
36
+        "main/index",
37
+        "main/list",
38
+        "main/article"
39
+      ]
32 40
     }
33 41
   ],
34 42
   "preloadRule": {
@@ -37,6 +45,12 @@
37 45
       "packages": [
38 46
         "packageProduct"
39 47
       ]
48
+    },
49
+    "packageReader/main/index": {
50
+      "network": "all",
51
+      "packages": [
52
+        "packageReader"
53
+      ]
40 54
     }
41 55
   },
42 56
   "sitemapLocation": "sitemap.json",

+ 31 - 6
packageProduct/main/feedbackinfo.js

@@ -74,7 +74,7 @@ Page({
74 74
         if (success) {
75 75
           wx.hideLoading();         
76 76
           var param={};
77
-          param.ProgramID=186;
77
+          param.ProgramID=app.globalData.ProgramID;
78 78
           param.UserID=app.globalData.userInfo.UserID;
79 79
           param.Content=that.data.InputValue;
80 80
           param.ContactTa=that.data.InputValue2;
@@ -247,11 +247,7 @@ Page({
247 247
   },
248 248
   onSelect:function(event){
249 249
     var that=this;
250
-    main.onSelect(that,event,function(obj,e,result){
251
-      if (e.currentTarget.dataset.object=="Feedback"){
252
-        
253
-      }
254
-    });   
250
+    onSelect(that,event,function(obj,e,result){});   
255 251
   },
256 252
   onShareTimeline: function () {
257 253
     return this.onShareAppMessage();
@@ -264,3 +260,32 @@ Page({
264 260
     }
265 261
   },
266 262
 })
263
+
264
+
265
+function onSelect(obj,event,callback){
266
+  var result=false;
267
+  var str=event.currentTarget.dataset.object;
268
+  var index=event.currentTarget.dataset.index;
269
+  var clickType=event.currentTarget.dataset.clicktype;
270
+
271
+  if (clickType=="checkbox"){
272
+    if (obj.data[str][index].CSS)
273
+      obj.data[str][index].CSS="";
274
+    else{
275
+      obj.data[str][index].CSS="Selected";
276
+      result=true;
277
+    }
278
+  }
279
+  else{
280
+    for(var i=0;i<obj.data[str].length;i++){
281
+      if (i==index){
282
+        obj.data[str][i].CSS="Selected";
283
+      }
284
+      else{
285
+        obj.data[str][i].CSS="";
286
+      }
287
+    }
288
+  }
289
+  obj.setData(obj.data);
290
+  callback(obj,event,result);
291
+}

BIN
packageReader/.DS_Store


BIN
packageReader/images/sysIcon_a09.png


BIN
packageReader/images/sysIcon_a35.png


BIN
packageReader/images/sysIcon_a36.png


BIN
packageReader/images/sysIcon_a45.png


+ 523 - 0
packageReader/main/article.js

@@ -0,0 +1,523 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import animation from '../../utils/animation';
4
+import commonBehavior from '../../pages/behaviors/commonBehavior';
5
+
6
+const Theme = [{
7
+  "Name": "DarkColor",
8
+  "backgroundColor": "#004433",
9
+  "color": "#C1E1C1",
10
+  "frontColor": '#ffffff',
11
+}, {
12
+  "Name": "LightColor",
13
+  "backgroundColor": "#D0ECD3",
14
+  "color": "#151815",
15
+  "frontColor": '#000000',
16
+}];
17
+const app = getApp();
18
+var timeout1 = []; //用于判断是否是双击
19
+var canSaveSchedule=1;//存进度
20
+
21
+Page({
22
+  behaviors: [commonBehavior],
23
+  data: {
24
+    Words: "",
25
+    IsShowLightColor: true,
26
+    IsShowTranslate: false,
27
+    IsShowWordTranslate: false,
28
+    IsShowWordDetail: false, //显示单词细节
29
+    TranslateHeight: 100, //翻译单词框的高度
30
+    lastTapTime: 0, // 记录上一次点击的时间,用于检测双击
31
+    Percentage:0,
32
+  },
33
+  onLoad: function (options) {
34
+    let that = this;
35
+
36
+    let IsShowLightColor = wx.getStorageSync('IsShowLightColor');
37
+    if (!IsShowLightColor) {
38
+      IsShowLightColor = false;
39
+    }
40
+
41
+    that.setData({
42
+      Containnerheight: main.getWindowHeight(),
43
+      IsShowLightColor: IsShowLightColor,
44
+      Title:options.Title,
45
+      Chapter:options.Chapter,
46
+    });
47
+    wx.setNavigationBarTitle({
48
+      title: options.Chapter,
49
+    });
50
+    that.init(options);
51
+    that.setTheme();
52
+
53
+    setTimeout(function(){
54
+      wx.createSelectorQuery().select(".panel1").boundingClientRect(function (rect) {
55
+        //console.log("rect.height:"+rect.height);
56
+        that.setData({
57
+          ArticleHeight: rect.height,
58
+        });
59
+      }).exec();
60
+    },1000);
61
+    
62
+    this.audioCtx = wx.createAudioContext('myAudio');
63
+  },
64
+  init: function (options) {
65
+    let that = this;
66
+    let chapter = options.Chapter.replace("Chapter ", "");
67
+    main.getData('GetReaderBooksChapterContent?UserID=' + app.globalData.userInfo.UserID + '&Title=' + options.Title + '&Chapter=' + chapter, function (data) {
68
+      if (data) {
69
+        data = that.updateData(data);
70
+        let arr=[];
71
+        for(let i=0;i<data.length;i++){
72
+          let section={};
73
+          section.List=[];
74
+          for(let j=0;j<data[i].length;j++){
75
+            let sentence={};
76
+            sentence.CSS="";
77
+            sentence.List=[];
78
+            if (data[i][j]){
79
+              for(let k=0;k<data[i][j].length;k++){
80
+                let word={};
81
+                word.CSS="";
82
+                word.Word=data[i][j][k];
83
+                sentence.List.push(word);
84
+              }
85
+            }
86
+            section.List.push(sentence);
87
+          }
88
+          arr.push(section);
89
+        }
90
+        that.setData({
91
+          List: arr,
92
+        });
93
+        setTimeout(function(){
94
+          that.enterSchedule();
95
+        },1000);
96
+      }
97
+    });
98
+  },
99
+  enterSchedule:function(){
100
+    let that=this;
101
+    let schedule=wx.getStorageSync('Schedule_'+this.data.Title);
102
+    if (schedule){
103
+      if (!schedule.ScrollTop){
104
+        schedule.ScrollTop=0;
105
+      }
106
+      
107
+      // let num=Math.ceil(100*(schedule.ScrollTop)/that.data.ArticleHeight);
108
+      // if (num>100)
109
+      //   num=100;
110
+      // // 更新scrollTop数据
111
+      // that.setData({
112
+      //   Percentage: num,
113
+      //   ScrollTop:schedule.ScrollTop,
114
+      // });
115
+      wx.pageScrollTo({
116
+        scrollTop: schedule.ScrollTop,
117
+        duration: 300,
118
+      });
119
+      that.onPageScroll({scrollTop:schedule.ScrollTop});
120
+    }
121
+  },
122
+  updateData: function (content) {
123
+    let that = this;
124
+    let arr1 = [],
125
+      arr2 = [];
126
+    for (let j = 0; j < content.length; j++) {
127
+      arr2 = [];
128
+      for (let i = 0; i < content[j].length; i++) {
129
+        // 确保每个句子末尾有空格,避免和下一句紧挨着
130
+        let sentence = content[j][i];
131
+        if (sentence != "\"") {
132
+          // 替换所有单引号为双引号,包括对话中的单引号和句尾的单引号
133
+          sentence = sentence.replace(/(^|[,.;:!?\s])'([^']+)'([,.;:!?]|\s|$)/g, '$1"$2"$3');
134
+
135
+          // 处理常见的带点缩写,将其中的点替换为特殊标记,以防止被分割
136
+          // 1. 称谓缩写
137
+          sentence = sentence.replace(/\b(Dr|Mr|Mrs|Ms|Prof)\./g, '$1@DOT@');
138
+          // 2. 时间缩写
139
+          sentence = sentence.replace(/\b([ap])\.m\./gi, '$1@DOT@m@DOT@');
140
+          // 3. 学位缩写
141
+          sentence = sentence.replace(/\b(B|M|Ph)\.([A-Z])\./gi, '$1@DOT@$2@DOT@');
142
+          // 4. 公司名称缩写
143
+          sentence = sentence.replace(/\b(Inc|Ltd|Co|Corp)\./g, '$1@DOT@');
144
+          // 5. 拉丁缩写
145
+          sentence = sentence.replace(/\b(e\.g|i\.e|etc|et al|vs)\./g, '$1@DOT@');
146
+          // 6. 军衔缩写
147
+          sentence = sentence.replace(/\b(Lt|Col|Gen|Sgt|Capt)\./g, '$1@DOT@');
148
+          // 7. 地理缩写
149
+          sentence = sentence.replace(/\b(St|Ave|Rd|Blvd)\./g, '$1@DOT@');
150
+          // 8. 其他常见缩写
151
+          sentence = sentence.replace(/\b(U\.S|U\.K|U\.N)\./g, '$1@DOT@');
152
+
153
+          // 先处理破折号,在破折号前后添加空格,使其成为独立元素
154
+          sentence = sentence.replace(/([^\s])([—\-–—])([^\s])/g, '$1 $2 $3');
155
+
156
+          // 将句子按空格分割成单词数组
157
+          let words = sentence.trim().split(/\s+/);
158
+
159
+          // 将单词数组添加到ArticleEnglishArr
160
+          arr2.push(words);
161
+        } else
162
+          arr2.push(sentence);
163
+      }
164
+      arr1.push(arr2);
165
+    }
166
+    content=arr1;
167
+
168
+    // 在设置数据前,确保所有@DOT@都被替换回.
169
+    that.replaceAllDOTMarkers(content);
170
+
171
+    return content;
172
+  },
173
+  // 替换Content对象中所有的@DOT@标记为.
174
+  replaceAllDOTMarkers: function (obj) {
175
+    if (!obj) return;
176
+
177
+    // 如果是字符串,直接替换
178
+    if (typeof obj === 'string') {
179
+      return obj.replace(/@DOT@/g, '.');
180
+    }
181
+
182
+    // 如果是数组,递归处理每个元素
183
+    if (Array.isArray(obj)) {
184
+      for (let i = 0; i < obj.length; i++) {
185
+        if (typeof obj[i] === 'string') {
186
+          obj[i] = obj[i].replace(/@DOT@/g, '.');
187
+        } else if (typeof obj[i] === 'object' && obj[i] !== null) {
188
+          this.replaceAllDOTMarkers(obj[i]);
189
+        }
190
+      }
191
+      return;
192
+    }
193
+
194
+    // 如果是对象,递归处理每个属性
195
+    if (typeof obj === 'object') {
196
+      for (let key in obj) {
197
+        if (obj.hasOwnProperty(key)) {
198
+          if (typeof obj[key] === 'string') {
199
+            obj[key] = obj[key].replace(/@DOT@/g, '.');
200
+          } else if (typeof obj[key] === 'object' && obj[key] !== null) {
201
+            this.replaceAllDOTMarkers(obj[key]);
202
+          }
203
+        }
204
+      }
205
+    }
206
+  },
207
+  setTheme: function () {
208
+    let that = this;
209
+    const css = Theme[that.data.IsShowLightColor ? 1 : 0];
210
+    wx.setNavigationBarColor({
211
+      frontColor: css.frontColor,
212
+      backgroundColor: css.backgroundColor,
213
+    });
214
+    wx.setBackgroundColor({
215
+      backgroundColor: css.backgroundColor,
216
+      backgroundColorTop: css.backgroundColor,
217
+      backgroundColorBottom: css.backgroundColor,
218
+    });
219
+    that.setData({
220
+      ThemeCSS: css.Name,
221
+    });
222
+    wx.setStorageSync('IsShowLightColor', that.data.IsShowLightColor);
223
+  },
224
+  getSentenceTraslate: function (e) {
225
+    let that = this;
226
+    let index = e.currentTarget.dataset.index;
227
+    let index2 = e.currentTarget.dataset.index2;
228
+
229
+    that.setSelectedObject(e,true);
230
+
231
+    let engSentence="", chnSentence;
232
+    for(let i=0;i<that.data.List[index].List[index2].List.length;i++)
233
+      engSentence+=that.data.List[index].List[index2].List[i].Word+" ";
234
+    let param = {};
235
+    param.Sentence = engSentence;
236
+    main.postData('GetSentenceTranslate?UserID=' + app.globalData.userInfo.UserID, param, function (data) {
237
+      if (data) {
238
+        chnSentence = data;
239
+        that.setData({
240
+          EnglishSentence: engSentence,
241
+          ChineseSentence: chnSentence,
242
+          IsShowWordTranslate: true,
243
+          TranslateHeight: 240,
244
+        });
245
+      }
246
+    });
247
+  },
248
+  selectWord: function (e) {
249
+    let that = this;
250
+    //以下为双击判断
251
+    const currentTime = new Date().getTime();
252
+    const lastTapTime = this.data.lastTapTime;
253
+    const timeDiff = currentTime - lastTapTime;
254
+    const param = e;
255
+    //以下为单击
256
+    const timeout11 = setTimeout(function () {
257
+      that.onClickHandler(param);
258
+      that.setSelectedObject(param);
259
+    }, 300);
260
+    timeout1.push(timeout11);
261
+    //console.log("timeout1:"+timeout1);
262
+    // 如果两次点击的时间间隔小于300毫秒,则认为是双击
263
+    if (timeDiff < 300 && timeDiff > 0) {
264
+      console.log('双击事件触发');
265
+      for (let i = 0; i < timeout1.length; i++)
266
+        clearTimeout(timeout1[i]);
267
+      // 在这里添加双击事件的处理逻辑
268
+      that.getSentenceTraslate(param);
269
+    }
270
+    // 更新上一次点击的时间
271
+    this.setData({
272
+      lastTapTime: currentTime
273
+    });
274
+  },
275
+  onClickHandler: function (e) {
276
+    let that = this;
277
+    let css = e.currentTarget.dataset.css;
278
+    let word = e.currentTarget.dataset.word;
279
+    let originalWord = e.currentTarget.dataset.originalWord || word;
280
+    originalWord = originalWord.replace(/[^\w'-]/g, '');
281
+
282
+    console.log("点击的单词:", originalWord);
283
+    that.playAudio(originalWord);
284
+
285
+    let b = false;
286
+    if (css) {
287
+      let list = that.data.Content.FormsOfWords;
288
+      for (let i = 0; i < list.length; i++) {
289
+        if (list[i].toLowerCase() == originalWord.toLowerCase() && that.data.Content.FormsOfWordsChinese && that.data.Content.FormsOfWordsChinese[i]) {
290
+          let wordChinese = that.data.Content.FormsOfWordsChinese[i];
291
+          // 直接更新翻译内容,不改变IsShowWordTranslate状态(如果已经是true)
292
+          let updateData = {
293
+            EnglishSentence: originalWord,
294
+            ChineseSentence: wordChinese,
295
+          };
296
+          //debugger;
297
+          // 只有当当前不显示翻译时,才设置IsShowWordTranslate为true
298
+          if (!that.data.IsShowWordTranslate) {
299
+            updateData.IsShowWordTranslate = true;
300
+          }
301
+          updateData.TranslateHeight = 100;
302
+          that.setData(updateData);
303
+          b = true;
304
+          break;
305
+        }
306
+      }
307
+    }
308
+    if (!b) {
309
+      that.getWordChinese(originalWord, function (wordTarget) {
310
+        // 准备更新数据
311
+        let updateData = {};
312
+        updateData.TranslateHeight = 100;
313
+        if (wordTarget) {
314
+          updateData.EnglishSentence = wordTarget.Word;
315
+          updateData.ChineseSentence = wordTarget.Translate;
316
+        } else {
317
+          updateData.EnglishSentence = originalWord;
318
+          updateData.ChineseSentence = "";
319
+        }
320
+        // 只有当当前不显示翻译时,才设置IsShowWordTranslate为true
321
+        if (!that.data.IsShowWordTranslate) {
322
+          updateData.IsShowWordTranslate = true;
323
+        }
324
+        that.setData(updateData);
325
+      });
326
+    }
327
+    that.setData({
328
+      IsCollect: false,
329
+    });
330
+    app.globalData.UserCollect.filter(function (item) {
331
+      if (item.Word == originalWord) {
332
+        that.setData({
333
+          IsCollect: true,
334
+        });
335
+      }
336
+    });
337
+  },
338
+  onLongPressApi: function (e) {
339
+    let that = this;
340
+    that.setSelectedObject(e);
341
+
342
+    let originalWord = e.currentTarget.dataset.originalWord || word;
343
+    originalWord = originalWord.replace(/[^\w'-]/g, '');
344
+    that.playAudio(originalWord);
345
+    that.getWordDetail(originalWord, function (result) {
346
+      if (result) {
347
+        if (result.ENG.Book) {
348
+          for (let i = 0; i < result.ENG.Book.length; i++) {
349
+            result.ENG.Book[i] = result.ENG.Book[i].substring(result.ENG.Book[i].indexOf(" "));
350
+            result.ENG.Book[i] = result.ENG.Book[i].substring(1, result.ENG.Book[i].indexOf("单元词汇") - 2);
351
+            result.ENG.Book[i] = result.ENG.Book[i].replace("英语 ", "英语 人教版PEP ")
352
+          }
353
+        }
354
+        if (result.ENG.ExamplesSentences) {
355
+          for (let j = 0; j < 3; j++) {
356
+            for (let i = 0; i < result.ENG.ExamplesSentences.length; i++) {
357
+              result.ENG.ExamplesSentences[i][0] = result.ENG.ExamplesSentences[i][0].replace("[线]", "");
358
+              result.ENG.ExamplesSentences[i][0] = result.ENG.ExamplesSentences[i][0].replace("[/线]", "");
359
+            }
360
+          }
361
+        }
362
+        that.setData({
363
+          IsShowWordDetail: true,
364
+          IsShowWordTranslate: false,
365
+          WordJSON: result.ENG,
366
+        });
367
+
368
+        that.setData({
369
+          IsCollect: false,
370
+        });
371
+        app.globalData.UserCollect.filter(function (item) {
372
+          if (item.Word == originalWord) {
373
+            that.setData({
374
+              IsCollect: true,
375
+            });
376
+          }
377
+        });
378
+      }
379
+      //console.log(result);
380
+    });
381
+  },
382
+  setSelectedObject:function(e,isSentence){
383
+    let that=this;
384
+    let index=e.currentTarget.dataset.index;
385
+    let index2=e.currentTarget.dataset.index2;
386
+    let index3=e.currentTarget.dataset.index3;
387
+    let list=that.data.List;
388
+    for(let i=0;i<list.length;i++){
389
+      for(let j=0;j<list[i].List.length;j++){
390
+        list[i].List[j].CSS="";
391
+        if (i==index && j==index2 && isSentence)
392
+          list[i].List[j].CSS="sentence-def-highlight";
393
+        for(let k=0;k<list[i].List[j].List.length;k++){
394
+          if (i==index && j==index2 && k==index3 && !isSentence)
395
+            list[i].List[j].List[k].CSS="highlight";
396
+          else
397
+            list[i].List[j].List[k].CSS="";
398
+        }
399
+      }
400
+    }
401
+    that.setData({
402
+      List:list,
403
+    });
404
+  },
405
+  getWordChinese: function (word, callback) {
406
+    let that = this;
407
+    main.getData('GetWordChinese?UserID=' + app.globalData.userInfo.UserID + '&Word=' + word, function (data) {
408
+      if (data) {
409
+        callback(data);
410
+      } else
411
+        callback();
412
+    });
413
+  },
414
+  getWordDetail: function (word, callback) {
415
+    let that = this;
416
+    main.getData('GetWordDetail?UserID=' + app.globalData.userInfo.UserID + '&Word=' + word, function (data) {
417
+      if (data) {
418
+        callback(data);
419
+      } else
420
+        callback();
421
+    });
422
+  },
423
+  saveUserCollect: function (e) {
424
+    let that = this;
425
+    let word = e.currentTarget.dataset.word;
426
+    main.getData('AddOrDeleteYJBDCUserCollect?UserID=' + app.globalData.userInfo.UserID + '&Word=' + word, function (data) {
427
+      that.setData({
428
+        IsCollect: !that.data.IsCollect,
429
+      });
430
+      app.globalData.UserCollect = data;
431
+    });
432
+  },
433
+  playAudio: function (word) {
434
+    let url = app.globalData.audioUrlBaidu;
435
+    if (word.currentTarget)
436
+      url = word.currentTarget.dataset.url;
437
+    else {
438
+      url = url.replace("[token]", app.globalData.BaiduToken);
439
+      url = url.replace("[word]", word);
440
+    }
441
+    this.audioCtx.setSrc(url);
442
+    this.audioCtx.play();
443
+  },
444
+  hideWordTranslate: function () {
445
+    console.log("IsShowWordTranslate:false");
446
+    // 点击空白处时隐藏单词翻译
447
+    this.setData({
448
+      IsShowWordTranslate: false
449
+    });
450
+  },
451
+  // 替换Content对象中所有的@DOT@标记为.
452
+  replaceAllDOTMarkers: function (obj) {
453
+    if (!obj) return;
454
+
455
+    // 如果是字符串,直接替换
456
+    if (typeof obj === 'string') {
457
+      return obj.replace(/@DOT@/g, '.');
458
+    }
459
+
460
+    // 如果是数组,递归处理每个元素
461
+    if (Array.isArray(obj)) {
462
+      for (let i = 0; i < obj.length; i++) {
463
+        if (typeof obj[i] === 'string') {
464
+          obj[i] = obj[i].replace(/@DOT@/g, '.');
465
+        } else if (typeof obj[i] === 'object' && obj[i] !== null) {
466
+          this.replaceAllDOTMarkers(obj[i]);
467
+        }
468
+      }
469
+      return;
470
+    }
471
+
472
+    // 如果是对象,递归处理每个属性
473
+    if (typeof obj === 'object') {
474
+      for (let key in obj) {
475
+        if (obj.hasOwnProperty(key)) {
476
+          if (typeof obj[key] === 'string') {
477
+            obj[key] = obj[key].replace(/@DOT@/g, '.');
478
+          } else if (typeof obj[key] === 'object' && obj[key] !== null) {
479
+            this.replaceAllDOTMarkers(obj[key]);
480
+          }
481
+        }
482
+      }
483
+    }
484
+  },
485
+  onPageScroll: function(e) {
486
+    // 获取当前的scrollTop
487
+    const scrollTop = e.scrollTop;
488
+    
489
+    let num=Math.ceil(100*(scrollTop)/this.data.ArticleHeight);
490
+    if (num>100)
491
+      num=100;
492
+    // 更新scrollTop数据
493
+    this.setData({
494
+      Percentage: num,
495
+      ScrollTop:scrollTop,
496
+    });
497
+    this.saveSchedule();
498
+  },
499
+  saveSchedule:function(){
500
+    if (canSaveSchedule){
501
+      let obj={};
502
+      obj.Chapter=this.data.Chapter;
503
+      obj.ScrollTop=this.data.ScrollTop;
504
+      if (!obj.ScrollTop)
505
+        obj.ScrollTop=0;
506
+      wx.setStorageSync('Schedule_'+this.data.Title, obj);
507
+      canSaveSchedule=0;
508
+      setTimeout(function(){
509
+        canSaveSchedule=1;
510
+      },10000);
511
+    }
512
+  },
513
+  onUnload:function(){
514
+    this.saveSchedule();
515
+  },
516
+  catchTouchMove: main.catchTouchMove,
517
+  onShareAppMessage: function () {
518
+    return {
519
+      title: app.globalData.ShareTitle,
520
+      path: app.globalData.SharePath + '?goto=article&ID=' + this.data.ID + '&UserID=' + app.globalData.userInfo.UserID,
521
+    }
522
+  },
523
+})

+ 4 - 0
packageReader/main/article.json

@@ -0,0 +1,4 @@
1
+{
2
+  "navigationBarTitleText":"正文",
3
+  "usingComponents": {}
4
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 111 - 0
packageReader/main/article.wxml


+ 854 - 0
packageReader/main/article.wxss

@@ -0,0 +1,854 @@
1
+pages .DarkColor{
2
+  background-color: #004433;
3
+  color:#C1E1C1;
4
+}
5
+pages .LightColor{
6
+  background-color: #D0ECD3;
7
+  color:#151815;
8
+}
9
+
10
+.DarkColor{
11
+  background-color: #004433;
12
+  color:#C1E1C1;
13
+}
14
+.LightColor{
15
+  background-color: #D0ECD3;
16
+  color:#151815;
17
+}
18
+
19
+/* 导航栏吸顶样式 */
20
+.fixed-nav {
21
+  position: fixed !important;
22
+  top: 0;
23
+  left: 0;
24
+  right: 0;
25
+  z-index: 1000;
26
+  /* box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1); 添加阴影效果 */
27
+}
28
+
29
+/* 设置不同主题下的返回箭头颜色 */
30
+.DarkColor.fixed-nav .weui-navigation-bar__btn_goback {
31
+  background-color: #C1E1C1 !important; /* 使用与DarkColor主题文字相同的颜色 */
32
+}
33
+
34
+.LightColor.fixed-nav .weui-navigation-bar__btn_goback {
35
+  background-color: #151815 !important; /* 使用与LightColor主题文字相同的颜色 */
36
+}
37
+
38
+.panel1{
39
+  width:670rpx;
40
+  margin: 40rpx 0 250rpx 0; /* 增加上边距,确保内容不会被导航栏遮挡 */
41
+  justify-content: flex-start;
42
+  align-items: flex-start;
43
+}
44
+
45
+.textArticle{
46
+  width:670rpx;
47
+  font-size: 48rpx;
48
+  line-height: 90rpx;
49
+  font-weight: 400;
50
+  margin-bottom: 50rpx;
51
+}
52
+.textArticle2{
53
+  width:670rpx;
54
+}
55
+
56
+.textArticleTranslate{
57
+  font-weight: 400;
58
+  font-size: 28rpx;
59
+  width:100%;
60
+  margin: 30rpx 0 40rpx 0;
61
+  line-height:40rpx;
62
+}
63
+
64
+.DarkColor .textArticleTranslate{
65
+  color: #A6FCA6;
66
+}
67
+.LightColor .textArticleTranslate{
68
+  color: #5A7D5A;
69
+}
70
+
71
+.panelLine{
72
+  width:100%;
73
+  height:8rpx;
74
+  margin: 20rpx 0;
75
+}
76
+.DarkColor .panelLine{
77
+  background: rgba(0,0,0,0.20);
78
+}
79
+.LightColor .panelLine{
80
+  background: rgba(255,255,255,0.60);
81
+}
82
+.DarkColor .highlight{
83
+  color: #FFDD88; 
84
+  font-weight: bold;
85
+}
86
+.DarkColor .sentence-def-highlight {
87
+  color: #52C41A; 
88
+}
89
+
90
+.LightColor .highlight{
91
+  color:#009933;
92
+  font-weight: bold;
93
+}
94
+.LightColor .sentence-def-highlight {
95
+  color: #1890FF; 
96
+}
97
+
98
+.DarkColor .panelFooter{
99
+  width: 100%;
100
+  height:180rpx;
101
+  background-image: linear-gradient(180deg, #004433 0%, #002C21 100%);
102
+  position: fixed;
103
+  bottom: 0rpx;
104
+  align-items: flex-start;
105
+  z-index: 10;
106
+}
107
+
108
+.LightColor .panelFooter{
109
+  width: 100%;
110
+  height:180rpx;
111
+  background-color: #D0ECD3;
112
+  position: fixed;
113
+  bottom: 0rpx;
114
+  align-items: flex-start;
115
+  z-index: 10;
116
+}
117
+
118
+.panelFooter1{
119
+  width:730rpx;
120
+  height:140rpx;
121
+  color:#F2F2F2;
122
+  background: #1E1E1E;
123
+  box-shadow: 0 30rpx 0 0 #0C0C0C;
124
+  border-radius: 10rpx 10rpx 60rpx 60rpx;
125
+}
126
+.panelFooter10{
127
+  background-color: #303030;
128
+  font-size:24rpx;
129
+}
130
+.panelFooter11{
131
+  width:160rpx;
132
+  height:120rpx;
133
+  border-radius: 5rpx 10rpx 10rpx 50rpx;
134
+}
135
+.panelFooter12{
136
+  width:370rpx;
137
+  height:120rpx;
138
+  border-radius: 10rpx 10rpx 10rpx 10rpx;
139
+  margin: 0 10rpx;
140
+  font-size:36rpx;
141
+}
142
+.panelFooter13{
143
+  width:160rpx;
144
+  height:120rpx;
145
+  border-radius: 10rpx 5rpx 50rpx 10rpx;
146
+}
147
+.text02{
148
+  font-size:24rpx;
149
+  margin-top: 17rpx;
150
+}
151
+
152
+.sysIcon_a03{
153
+  width:20rpx;
154
+  height:20rpx;
155
+}
156
+
157
+.sysIcon_a15{
158
+  width:28rpx;
159
+  height:20rpx;
160
+}
161
+
162
+.panelHelp{
163
+  background-color: rgba(0,0,0,0.00);
164
+  z-index: 20;
165
+  position: fixed;
166
+  top:0;
167
+}
168
+
169
+.panelHelp1{
170
+  width: 100%;
171
+  position: fixed;
172
+  bottom:942rpx;
173
+}
174
+
175
+.sysIcon_b07{
176
+  width:100%;
177
+  height: 697rpx;
178
+  position: absolute;
179
+}
180
+
181
+.panelHelp2{
182
+  position: absolute;
183
+  left:0;
184
+  right:0;
185
+  top:180rpx;
186
+}
187
+
188
+.text07{
189
+  font-size: 36rpx;
190
+  color: #2E2E2E;
191
+  text-align: center;
192
+  width:620rpx;
193
+}
194
+.btn3{
195
+  width:310rpx;
196
+  height:90rpx;
197
+  background: #303030;
198
+  border-radius: 20rpx;
199
+  color:#F2F2F2;
200
+  margin-top: 50rpx;
201
+}
202
+
203
+
204
+.panelError{
205
+  margin-top: 420rpx;
206
+  font-size: 28rpx;
207
+}
208
+
209
+.DarkColor .panelError{
210
+  color: #C1E1C1;
211
+}
212
+
213
+.LightColor .panelError{
214
+  color: #5A7D5A;
215
+}
216
+
217
+.sysIcon_b14{
218
+  width:102rpx;
219
+  height:52rpx;
220
+  margin-bottom: 50rpx;
221
+}
222
+.textError2{
223
+  width: 500rpx;
224
+  font-weight: 400;
225
+  font-size: 24rpx;
226
+  margin-top: 10rpx;
227
+}
228
+
229
+.panelAnswer{
230
+  width:100%;
231
+  position: fixed;
232
+  bottom:0;
233
+  z-index: 10;
234
+  border-radius: 60rpx 60rpx 0 0;
235
+  justify-content: flex-start;
236
+}
237
+
238
+.DarkColor .panelAnswer{
239
+  background: #1E1E1E;
240
+  color: #C1E1C1;
241
+}
242
+
243
+.LightColor .panelAnswer{
244
+  background: #FFFFFF;
245
+  color: #2E2E2E;
246
+}
247
+
248
+.text03{
249
+  font-size: 28rpx;
250
+  align-self: start;
251
+  margin: 50rpx 0 0 40rpx;
252
+}
253
+
254
+.DarkColor .text03{
255
+  background: #1E1E1E;
256
+  color: #f2f2f2;
257
+}
258
+
259
+.LightColor .text03{
260
+  background: #FFFFFF;
261
+  color: #2E2E2E;
262
+}
263
+
264
+.btnClose{
265
+  width: 88rpx;
266
+  line-height:60rpx;
267
+  border-radius: 20rpx;
268
+  font-size:24rpx;
269
+  text-align: center;
270
+  position: absolute;
271
+  top:40rpx;
272
+  right:40rpx;
273
+}
274
+
275
+.DarkColor .btnClose{
276
+  background: #303030;
277
+  color:#F2F2F2;
278
+}
279
+
280
+.LightColor .btnClose{
281
+  background: #F0F0F0;
282
+  color:#2E2E2E;
283
+}
284
+
285
+.btnClose2{
286
+  width: 60rpx;
287
+  height:60rpx;
288
+  border-radius: 50%;
289
+  top:40rpx;
290
+  right:40rpx;
291
+}
292
+
293
+
294
+.panelAnswer1{
295
+  width: 100%;
296
+  height:630rpx;
297
+}
298
+
299
+.DarkColor .panelAnswer1{
300
+  background-color: #1e1e1e;
301
+ }
302
+.LightColor .panelAnswer1{
303
+  background-color: #FFFFFF;
304
+}
305
+.panelAnswer1Item{
306
+  margin-top: 20rpx;
307
+  width: 750rpx;
308
+}
309
+.panelAnswer1Item1{
310
+  width: 750rpx;
311
+  height:580rpx;
312
+}
313
+.DarkColor .panelAnswer1Item1{
314
+  background-color: #1e1e1e;
315
+}
316
+.LightColor .panelAnswer1Item1{
317
+  background-color: #fff;
318
+}
319
+.panelAnswer2{
320
+  width:100%;
321
+  margin: 30rpx 0 0 0;
322
+  align-items: flex-start;
323
+}
324
+.sysIcon_c01{
325
+  width: 40rpx;
326
+  height:40rpx;
327
+  margin: 10rpx 30rpx 0 0;
328
+}
329
+
330
+.text04{
331
+  width: 600rpx;
332
+  word-wrap: break-word;
333
+  white-space: normal;
334
+}
335
+.text041{
336
+  width:100%;
337
+  font-size: 48rpx;
338
+  word-wrap: break-word;
339
+  white-space: normal;
340
+}
341
+.text042{
342
+  width:100%;
343
+  font-weight: 400;
344
+  font-size: 28rpx;
345
+  margin:10rpx 0 0 0;
346
+}
347
+
348
+.panelAnswer3{
349
+  width:100%;
350
+  margin-top: 40rpx;
351
+  margin-bottom: 60rpx;
352
+}
353
+.panelAnswer31{
354
+  width:100%;
355
+  justify-content: flex-start;
356
+}
357
+
358
+.DarkColor .panelAnswer31{
359
+  background: #1e1e1e;
360
+}
361
+.LightColor .panelAnswer31{
362
+  background: #fff;
363
+  color: #2E2E2E;
364
+}
365
+
366
+.DarkColor .panelAnswer310{
367
+  background: #C1E1C1;
368
+  color: #004433;
369
+}
370
+.LightColor .panelAnswer310{
371
+  background: #009933;
372
+  color: #FFFFFF;
373
+}
374
+
375
+.panelAnswer311{
376
+  border-radius: 50%;
377
+  width:40rpx;
378
+  height:40rpx;
379
+  margin: 0 30rpx 0 40rpx;
380
+}
381
+
382
+
383
+.DarkColor .panelAnswer311{
384
+  background: #303030;
385
+  border: 3rpx solid #4D4D4D;
386
+}
387
+.LightColor .panelAnswer311{
388
+  background: #F8F8F8;
389
+  border: 3rpx solid #D2D2D2;
390
+}
391
+
392
+.DarkColor .panelAnswer3110{
393
+  background: #C1E1C1;
394
+  border: 3rpx solid #C1E1C1;
395
+}
396
+.LightColor .panelAnswer3110{
397
+  background: #009933;
398
+  border: 3rpx solid #009933;
399
+}
400
+
401
+.sysIcon_a10{
402
+  width:20rpx;
403
+  height:16rpx;
404
+}
405
+
406
+.text05{
407
+  width: 600rpx;
408
+  margin: 20rpx 0;
409
+}
410
+.text051{
411
+  width:100%;
412
+  font-weight: 400;
413
+  font-size: 36rpx;
414
+}
415
+.text052{
416
+  width:100%;
417
+  font-weight: 400;
418
+  font-size: 28rpx;
419
+  margin:10rpx 0 0 0;
420
+}
421
+
422
+.DarkColor .panelLine2{
423
+  width:100%;
424
+  height:10rpx;
425
+  background-image: linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.30) 100%);
426
+}
427
+.LightColor .panelLine2{
428
+  width:100%;
429
+  height:10rpx;
430
+  background-image: linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.10) 100%);
431
+}
432
+
433
+.panelAnswer4{
434
+  width:100%;
435
+}
436
+
437
+.btn1{
438
+  border-radius: 20rpx;
439
+  width:310rpx;
440
+  height:90rpx;
441
+  margin:60rpx 15rpx;
442
+  font-size: 36rpx;
443
+}
444
+
445
+
446
+.DarkColor .btn1{
447
+  background: #303030;
448
+}
449
+.LightColor .btn1{
450
+  background: #F0F0F0;
451
+}
452
+
453
+.btn10{
454
+  color: #1E1E1E;
455
+}
456
+
457
+.text06{
458
+  font-size: 28rpx;
459
+  color: #F2F2F2;
460
+}
461
+
462
+.btn2{
463
+  width:670rpx;
464
+  height:90rpx;
465
+  border-radius: 20rpx;
466
+  margin: 70rpx 0 40rpx 0;
467
+}
468
+
469
+.DarkColor .btn2{
470
+  background: #303030;
471
+  color:#F2F2F2;
472
+}
473
+
474
+.LightColor .btn2{
475
+  background: #F0F0F0;
476
+  color:#2E2E2E;
477
+}
478
+
479
+.panelAnswer5{
480
+  width:100%;
481
+}
482
+.panelAnswer51{
483
+  width:100%;
484
+  justify-content: space-between;
485
+  margin: 40rpx 0;
486
+}
487
+.text12{
488
+  margin-left: 40rpx;
489
+  font-size: 28rpx;
490
+}
491
+
492
+.DarkColor .text12{
493
+  color:#F2F2F2;
494
+}
495
+
496
+.LightColor .text12{
497
+  color:#2E2E2E;
498
+}
499
+
500
+.text13{
501
+  width: 670rpx;
502
+  font-size: 24rpx;
503
+  font-weight: 400;
504
+  margin-bottom: 30rpx;
505
+}
506
+
507
+.DarkColor .text13{
508
+  color: #E3E3E3;
509
+}
510
+
511
+.LightColor .text13{
512
+  color:#787878;
513
+}
514
+.panelLine3{
515
+  width:670rpx;
516
+  height:1rpx;
517
+  background-color: #131313;
518
+}
519
+.panelAnswer510{
520
+  margin-bottom: 100rpx;
521
+}
522
+.switchClass{
523
+  margin-right: 40rpx;
524
+}
525
+
526
+/* 自定义switch样式 */
527
+/* 修改switch关闭时的背景颜色 */
528
+.DarkColor .wx-switch-input {
529
+  background-color: #D2D2D2 !important; /* 深色主题下关闭时的颜色 */
530
+}
531
+
532
+.LightColor .wx-switch-input {
533
+  background-color: #D2D2D2 !important; /* 浅色主题下关闭时的颜色 */
534
+}
535
+
536
+/* 修改switch选中时的颜色 */
537
+.wx-switch-input.wx-switch-input-checked {
538
+  border-color: #4aa010 !important;
539
+  background-color: #4aa010 !important;
540
+}
541
+
542
+
543
+.wx-swiper-dot {
544
+  width: 14rpx !important;
545
+  height: 14rpx !important;
546
+  margin-left: 5rpx !important;
547
+  margin-right: 5rpx !important;
548
+}
549
+
550
+
551
+.DarkColor .wx-swiper-dot {
552
+  background-color: #4d4d4d !important;
553
+}
554
+
555
+.LightColor .wx-swiper-dot {
556
+  background-color: #D2D2D2 !important;
557
+}
558
+
559
+.DarkColor .wx-swiper-dot-active {
560
+  background-color: #C1E1C1 !important;
561
+}
562
+.LightColor .wx-swiper-dot-active {
563
+  background-color: #787878 !important;
564
+}
565
+
566
+/* 自定义swiper指示点位置 */
567
+.wx-swiper-dots {
568
+  position: absolute;
569
+  right: -20rpx !important;
570
+  left: unset !important;
571
+}
572
+
573
+
574
+.panelMenu{
575
+  background-color: rgba(26,67,51,0.50);
576
+  z-index: 20;
577
+  position: fixed;
578
+  top:0;
579
+}
580
+
581
+/* 翻译 */
582
+.panelTranslate{
583
+  width: 710rpx;
584
+  min-height:170rpx;
585
+  z-index: 30;
586
+  position: fixed;
587
+  bottom: 50rpx;
588
+  left:20rpx;
589
+  background: #F0F0F0;
590
+  box-shadow: 0 30rpx 0 0 rgba(0,0,0,0.50);
591
+  border-radius: 40rpx;
592
+  align-items: flex-start;
593
+  justify-content: flex-start;
594
+  color: #2E2E2E;
595
+}
596
+
597
+.panelTranslate2{
598
+  height:1000rpx;
599
+}
600
+
601
+.panelTranslateTest1{
602
+  width: 630rpx;
603
+  margin: 30rpx 0 20rpx 40rpx;
604
+  font-size: 36rpx;
605
+  font-weight: 700;
606
+}
607
+.panelTranslateTest10{
608
+  margin: 30rpx 0 20rpx 0rpx;
609
+}
610
+.panelTranslateTest2{
611
+  width: 630rpx;
612
+  margin:0 0 30rpx 40rpx;
613
+  font-size: 36rpx;
614
+  font-weight: 400;
615
+}
616
+.panelTranslateCollect{
617
+  position: absolute;
618
+  top:0;
619
+  right:0;
620
+}
621
+.panelTranslateCollect1{
622
+  width:80rpx;
623
+  height:90rpx;
624
+}
625
+
626
+.panelTranslate21{
627
+  width: 100%;
628
+}
629
+
630
+.panelTranslateScroll{
631
+  width:100%;
632
+  height:910rpx;
633
+  justify-content: flex-start;
634
+  align-items: flex-start;
635
+}
636
+
637
+.sysIcon_a35{
638
+  width: 30rpx;
639
+  height:30rpx;
640
+}
641
+.sysIcon_a45{
642
+  width: 26rpx;
643
+  height:30rpx;
644
+}
645
+.sysIcon_a09{
646
+  width: 20rpx;
647
+  height:20rpx;
648
+}
649
+.panelTranslate22{
650
+  width: 100%;
651
+  justify-content: flex-start;
652
+}
653
+
654
+.panelTranslate22Text{
655
+  height:100rpx;
656
+  font-size: 36rpx;
657
+  margin-right: 30rpx;
658
+}
659
+.panelTranslate22Text0{
660
+  margin-left: 40rpx;
661
+}
662
+.sysIcon_a44{
663
+  width: 38rpx;
664
+  height:30rpx;
665
+  margin-left: 16rpx;
666
+}
667
+.panelTranslateLine{
668
+  width:630rpx;
669
+  height:1rpx;
670
+  background-color: #d2d2d2;
671
+  margin-left: 40rpx;
672
+}
673
+
674
+.panelTranslate23{
675
+  width: 100%;
676
+  display: flex;
677
+  white-space: nowrap;
678
+}
679
+.panelTranslate231{
680
+  line-height:50rpx;
681
+  border: 3rpx solid #D2D2D2;
682
+  border-radius: 25rpx;
683
+  padding: 0 20rpx;
684
+  margin: 30rpx 0 30rpx 40rpx;
685
+  display: inline-block;
686
+  font-size: 24rpx;
687
+}
688
+
689
+.panelTranslate232{
690
+  margin: 30rpx 0 30rpx 20rpx;
691
+}
692
+.panelTranslate24{
693
+  width:630rpx;
694
+  align-items: flex-start;
695
+  color:#2E2E2E;
696
+}
697
+.panelTranslate241{
698
+  width: 100%;
699
+  margin: 30rpx 0 0 40rpx;
700
+  font-weight: 400;
701
+  font-size: 28rpx;
702
+}
703
+.panelTranslate242{
704
+  font-weight: 700;
705
+}
706
+.panelTranslate243{
707
+  margin-top: 0;
708
+}
709
+.panelTranslateText1{
710
+  text-decoration: underline;
711
+}
712
+
713
+/* 生成中 */
714
+.panelBuildindParent{
715
+  z-index: 50;
716
+}
717
+
718
+.pic_08{
719
+  width: 100%;
720
+  position: fixed;
721
+  top:0rpx;
722
+  z-index: 50;
723
+}
724
+
725
+.panelBuilding{
726
+  z-index: 20;
727
+  position: fixed;
728
+  top:0;
729
+  width:100%;
730
+  justify-content: flex-start;
731
+  font-weight: 700;
732
+  z-index: 50;
733
+}
734
+
735
+.panelBuildingDarkColor{
736
+  background-image: linear-gradient(180deg, rgba(0,68,51,0.70) 0%, rgba(0,20,15,0.60) 100%);
737
+}
738
+.panelBuildingLightColor{
739
+  background-image: linear-gradient(180deg, rgba(208,236,211,0.50) 0%, rgba(165,221,187,0.50) 100%);
740
+}
741
+
742
+.panelBuilding1{
743
+  width: 100%;
744
+  position: fixed;
745
+  top:160rpx;
746
+}
747
+
748
+.pic_03{
749
+  width:100%;
750
+  height:1050rpx;
751
+  position: absolute;
752
+  top:0;
753
+}
754
+.sysIcon_b08{
755
+  width:100%;
756
+  height:150rpx;
757
+  position: absolute;
758
+  top: 353rpx;
759
+  z-index: 25;
760
+}
761
+
762
+.panelBuilding11{
763
+  position: absolute;
764
+  top: 150rpx;
765
+  left:100rpx;
766
+  color: #2E2E2E;
767
+  align-items: flex-start;
768
+}
769
+
770
+.text08{
771
+  font-size: 48rpx;
772
+}
773
+.text09{
774
+  font-size: 24rpx;
775
+  text-align: left;
776
+  margin-top: 20rpx;
777
+  font-weight: 400;
778
+}
779
+
780
+.panelBuilding12{
781
+  position: absolute;
782
+  top: 533rpx;
783
+  color: #FDAD94;
784
+  align-items: flex-start;
785
+}
786
+
787
+.text10{
788
+  margin-left: 50rpx;
789
+  font-size: 24rpx;
790
+  text-align: center;
791
+}
792
+
793
+.panelBuilding121{
794
+  width:650rpx;
795
+  height: 70rpx;
796
+  background: rgba(0,0,0,0.25);
797
+  border-radius: 35rpx;
798
+  margin: 0 0 20rpx 0;
799
+}
800
+.panelBuilding122{
801
+  width:252rpx;
802
+  height: 70rpx;
803
+  font-size: 28rpx;
804
+  font-weight: 400;
805
+}
806
+
807
+.sysIcon_a17{
808
+  width:30rpx;
809
+  height:30rpx;
810
+  margin: 5rpx 20rpx 0 0;
811
+}
812
+.panelBuilding121text{
813
+  width:550rpx;
814
+  font-size: 28rpx;
815
+  font-weight: 400;
816
+  overflow: hidden;
817
+  white-space: nowrap;
818
+}
819
+
820
+.panelGuideContainer .pic_ha07{
821
+  width: 610rpx;
822
+  height: 378rpx;
823
+}
824
+.panelGuideContainer .pic_ha08{
825
+  width: 610rpx;
826
+  height: 643rpx;
827
+}
828
+
829
+.panelPercentage {
830
+  /* 若使用绝对定位,可参考如下(根据实际布局微调 top/left/right/bottom) */
831
+  position: fixed;
832
+  top: 4rpx;
833
+  right: 20rpx;
834
+
835
+  /* 尺寸 */
836
+  font-size: 32rpx;           /* 字体大小,可根据整体设计调整 */
837
+  min-width: 80rpx;          /* 保证数字不会太拥挤,可根据需要调整 */
838
+  height: 50rpx;              /* 高度,便于垂直居中或布局整齐 */
839
+  line-height: 50rpx;         /* 行高,实现垂直居中 */
840
+
841
+  /* 颜色与背景 */
842
+  color: #333333;             /* 深色文字,确保清晰易读,也可以使用 #000000 或主题色 */
843
+  background-color: #f5f5f5;  /* 浅灰背景,增加层次感,也可用透明或主题色 */
844
+  border-radius: 30rpx;       /* 圆角,使显示更柔和,数值约为高度的一半 */
845
+
846
+  /* 字体样式 */
847
+  font-weight: bold;          /* 加粗,突出百分比数字 */
848
+  text-align: center;         /* 文字居中,配合 line-height 实现垂直居中 */
849
+
850
+  /* 内边距(如果需要) */
851
+  padding: 0 20rpx;    
852
+  /* 外边距(如有需要,用来与其他元素保持间距) */
853
+  margin: 10rpx 0;            /* 上下外边距,根据布局调整 */
854
+}

+ 38 - 0
packageReader/main/index.js

@@ -0,0 +1,38 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    ImageUrl:app.globalData.uploadImageUrl,
9
+  },
10
+  onLoad: function (options) {
11
+    let that = this;
12
+    that.setData({
13
+      Containnerheight: main.getWindowHeight(),
14
+    });
15
+
16
+    main.getData('GetReaderBooks?UserID=' + app.globalData.userInfo.UserID, function (data) {
17
+      if (data) {
18
+        that.setData({
19
+          List:data,
20
+        });
21
+      }
22
+    });
23
+  },
24
+  goto: function (e) {
25
+    let that=this;
26
+    var url=e.currentTarget.dataset.url;
27
+    wx.navigateTo({
28
+      url: url,
29
+    });
30
+  },
31
+  onShareAppMessage: function () {
32
+    return {
33
+      title: app.globalData.ShareTitle,
34
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
35
+      imageUrl: app.globalData.ShareImage,
36
+    }
37
+  },
38
+})

+ 4 - 0
packageReader/main/index.json

@@ -0,0 +1,4 @@
1
+{
2
+  "navigationBarTitleText": "书架",
3
+  "usingComponents": {}
4
+}

+ 8 - 0
packageReader/main/index.wxml

@@ -0,0 +1,8 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexRow">
3
+    <view class="panelBook FlexColumn" wx:for="{{List}}" wx:key="*this" bind:tap="goto" data-url="list?Title={{item.Title}}">
4
+      <image src="{{ImageUrl}}web/_yjbdc/{{item.Title}}.jpeg" class="img"></image>
5
+    </view>
6
+  </view>
7
+  <view style="height: 150rpx;"></view>
8
+</view>

+ 20 - 0
packageReader/main/index.wxss

@@ -0,0 +1,20 @@
1
+/* packageReader/main/index.wxss */
2
+.panel1{
3
+  margin-top: 40rpx;
4
+  width: 690rpx;
5
+  align-items: flex-start;
6
+  justify-content: flex-start;
7
+  flex-wrap: wrap;
8
+}
9
+.panelBook{
10
+  width:300rpx;
11
+  height:400rpx;
12
+  margin: 20rpx;
13
+  box-shadow: 0 10rpx 0 0 rgba(0,0,0,0.30);
14
+  border-radius: 20rpx;
15
+}
16
+.img{
17
+  width:300rpx;
18
+  height:400rpx;
19
+  border-radius: 20rpx;
20
+}

+ 68 - 0
packageReader/main/list.js

@@ -0,0 +1,68 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    ImageUrl:app.globalData.serverUrl,
9
+  },
10
+  onLoad: function (options) {
11
+    let that = this;
12
+    that.setData({
13
+      Title:options.Title,
14
+      Containnerheight: main.getWindowHeight(),
15
+    });
16
+    wx.setNavigationBarTitle({
17
+      title: options.Title,
18
+    });
19
+
20
+    main.getData('GetReaderBooksChapter?UserID=' + app.globalData.userInfo.UserID+"&Title="+options.Title, function (data) {
21
+      if (data) {
22
+        let arr=[];
23
+        for(let i=0;i<data.length;i++){
24
+          let obj={};
25
+          obj.CSS="";
26
+          obj.Chapter=data[i];
27
+          arr.push(obj);
28
+        }
29
+        that.setData({
30
+          List:arr,
31
+        });
32
+        that.enterSchedule();
33
+      }
34
+    });
35
+  },
36
+  enterSchedule:function(){
37
+    let that=this;
38
+    let schedule=wx.getStorageSync('Schedule_'+this.data.Title);
39
+    if (schedule){
40
+      let list=this.data.List;
41
+      for(let i=0;i<list.length;i++){
42
+        if (list[i].Chapter==schedule.Chapter){
43
+          list[i].CSS="highlight";
44
+          break;
45
+        }
46
+      }
47
+      that.setData({
48
+        List:list,
49
+      });
50
+      let url="article?Title="+that.data.Title+"&Chapter="+schedule.Chapter;
51
+      that.goto({currentTarget:{dataset:{url:url}}});
52
+    }
53
+  },
54
+  goto: function (e) {
55
+    let that=this;
56
+    var url=e.currentTarget.dataset.url;
57
+    wx.navigateTo({
58
+      url: url,
59
+    });
60
+  },
61
+  onShareAppMessage: function () {
62
+    return {
63
+      title: app.globalData.ShareTitle,
64
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
65
+      imageUrl: app.globalData.ShareImage,
66
+    }
67
+  },
68
+})

+ 4 - 0
packageReader/main/list.json

@@ -0,0 +1,4 @@
1
+{
2
+  "navigationBarTitleText": "章节",
3
+  "usingComponents": {}
4
+}

+ 8 - 0
packageReader/main/list.wxml

@@ -0,0 +1,8 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexRow">
3
+    <view class="panelChapter {{item.CSS}} FlexColumn" wx:for="{{List}}" wx:key="*this" bind:tap="goto" data-url="article?Title={{Title}}&Chapter={{item.Chapter}}">
4
+      {{item.Chapter}}
5
+    </view>
6
+  </view>
7
+  <view style="height: 150rpx;"></view>
8
+</view>

+ 17 - 0
packageReader/main/list.wxss

@@ -0,0 +1,17 @@
1
+.panel1{
2
+  margin-top: 40rpx;
3
+  width: 690rpx;
4
+  justify-content: flex-start;
5
+  flex-wrap: wrap;
6
+}
7
+.panelChapter{
8
+  width: 200rpx;
9
+  margin: 10rpx 5rpx;
10
+  font-size: 32rpx;
11
+  color:#C1E1C1;
12
+}
13
+
14
+.highlight{
15
+  color: #FFDD88; 
16
+  font-weight: bold;
17
+}

BIN
pages/images/sysIcon_a44.png


BIN
pages/images/sysIcon_a45.png


+ 111 - 5
pages/main/article.js

@@ -16,6 +16,7 @@ const Theme=[{
16 16
   }
17 17
 ];
18 18
 const app = getApp();
19
+var timeout1=[];//用于判断是否是双击
19 20
 
20 21
 Page({
21 22
   behaviors: [commonBehavior],
@@ -31,6 +32,7 @@ Page({
31 32
     IsShowSetting:false,
32 33
     IsShowWordTranslate:false,
33 34
     IsBuildQueue:false,
35
+    IsShowWordDetail:false,//显示单词细节
34 36
     TranslateHeight:100,//翻译单词框的高度
35 37
     CurrentQuestionIndex:0,
36 38
     swiperHeight: "526rpx",
@@ -149,7 +151,7 @@ Page({
149 151
       app.globalData.Generating=false;
150 152
       app.globalData.GeneratingStart=false;
151 153
       if (data){
152
-        console.log("请求生成数据:"+JSON.stringify(data));
154
+        //console.log("请求生成数据:"+JSON.stringify(data));
153 155
         if (data=="-1"){
154 156
           that.setData({
155 157
             IsBuilding:false,
@@ -511,12 +513,61 @@ Page({
511 513
       TranslateHeight:240,
512 514
     });
513 515
   },
516
+  onLongPressApi: function(e) {
517
+    let that = this;
518
+    let strType=e.currentTarget.dataset.strtype;
519
+    let selectedIndex=e.currentTarget.dataset.index;
520
+    let engSentence,chnSentence;
521
+    if (strType=="article"){
522
+      engSentence=that.data.Content.ArticleEnglish[selectedIndex];
523
+      let param={};
524
+      param.Sentence=engSentence;
525
+      main.postData('GetSentenceTranslate?UserID=' + app.globalData.userInfo.UserID,param, function (data) {
526
+        if (data) {
527
+          chnSentence=data;
528
+          that.setData({
529
+            EnglishSentence:engSentence,
530
+            ChineseSentence:chnSentence,
531
+            IsShowWordTranslate:true,
532
+            TranslateHeight:240,
533
+          });
534
+        }
535
+      });
536
+    }
537
+  },
514 538
   selectWord:function(e){
539
+    let that=this;
540
+    //以下为双击判断
541
+    const currentTime = new Date().getTime();
542
+    const lastTapTime = this.data.lastTapTime;
543
+    const timeDiff = currentTime - lastTapTime;
544
+    const param=e;
545
+    //以下为单击
546
+    const timeout11=setTimeout(function(){
547
+      that.onClickHandler(param);
548
+    },300);
549
+    timeout1.push(timeout11);
550
+    //console.log("timeout1:"+timeout1);
551
+    // 如果两次点击的时间间隔小于300毫秒,则认为是双击
552
+    if (timeDiff < 300 && timeDiff > 0) {
553
+      console.log('双击事件触发');
554
+      for(let i=0;i<timeout1.length;i++)
555
+        clearTimeout(timeout1[i]);
556
+      
557
+        // 在这里添加双击事件的处理逻辑
558
+      that.onDoubleClickHandler(param);
559
+    }
560
+    // 更新上一次点击的时间
561
+    this.setData({
562
+      lastTapTime: currentTime
563
+    });
564
+  },
565
+  onClickHandler:function(e){
515 566
     let that=this;
516 567
     let css=e.currentTarget.dataset.css;
517 568
     let word=e.currentTarget.dataset.word;
518 569
     let originalWord=e.currentTarget.dataset.originalWord || word;
519
-    
570
+
520 571
     console.log("点击的单词:", originalWord);
521 572
     that.playAudio(originalWord);
522 573
     
@@ -574,6 +625,47 @@ Page({
574 625
       }
575 626
     });
576 627
   },
628
+  onDoubleClickHandler:function(e){
629
+    let that=this;
630
+    let originalWord=e.currentTarget.dataset.originalWord || word;
631
+    that.playAudio(originalWord);
632
+    that.getWordDetail(originalWord,function(result){
633
+      if (result){
634
+        if (result.ENG.Book){
635
+          for(let i=0;i<result.ENG.Book.length;i++){
636
+            result.ENG.Book[i]=result.ENG.Book[i].substring(result.ENG.Book[i].indexOf(" "));
637
+            result.ENG.Book[i]=result.ENG.Book[i].substring(1,result.ENG.Book[i].indexOf("单元词汇")-2);
638
+            result.ENG.Book[i]=result.ENG.Book[i].replace("英语 ","英语 人教版PEP ")
639
+          }
640
+        }
641
+        if (result.ENG.ExamplesSentences){
642
+          for(let j=0;j<3;j++){
643
+            for(let i=0;i<result.ENG.ExamplesSentences.length;i++){
644
+              result.ENG.ExamplesSentences[i][0]=result.ENG.ExamplesSentences[i][0].replace("[线]","");
645
+              result.ENG.ExamplesSentences[i][0]=result.ENG.ExamplesSentences[i][0].replace("[/线]","");
646
+            }
647
+          }
648
+        }
649
+        that.setData({
650
+          IsShowWordDetail:true,
651
+          IsShowWordTranslate:false,
652
+          WordJSON:result.ENG,
653
+        });
654
+
655
+        that.setData({
656
+          IsCollect:false,
657
+        });
658
+        app.globalData.UserCollect.filter(function (item) {
659
+          if (item.Word==originalWord){
660
+            that.setData({
661
+              IsCollect:true,
662
+            });
663
+          }
664
+        });
665
+      }
666
+      //console.log(result);
667
+    });
668
+  },
577 669
   getWordChinese:function(word,callback){
578 670
     let that=this;
579 671
     main.getData('GetWordChinese?UserID=' + app.globalData.userInfo.UserID+'&Word='+word+'&Level='+that.data.Level, function (data) {
@@ -584,6 +676,16 @@ Page({
584 676
         callback();
585 677
     });
586 678
   },
679
+  getWordDetail:function(word,callback){
680
+    let that=this;
681
+    main.getData('GetWordDetail?UserID=' + app.globalData.userInfo.UserID+'&Word='+word, function (data) {
682
+      if (data) {
683
+        callback(data);
684
+      }
685
+      else
686
+        callback();
687
+    });
688
+  },
587 689
   saveUserCollect:function(e){
588 690
     let that=this;
589 691
     let word=e.currentTarget.dataset.word;
@@ -595,9 +697,13 @@ Page({
595 697
     });
596 698
   },
597 699
   playAudio: function (word) {
598
-    var url = app.globalData.audioUrlBaidu;
599
-    url = url.replace("[token]", app.globalData.BaiduToken);
600
-    url = url.replace("[word]", word);
700
+    let url = app.globalData.audioUrlBaidu;
701
+    if (word.currentTarget)
702
+      url=word.currentTarget.dataset.url;
703
+    else{
704
+      url = url.replace("[token]", app.globalData.BaiduToken);
705
+      url = url.replace("[word]", word);
706
+    }
601 707
     this.audioCtx.setSrc(url);
602 708
     this.audioCtx.play();
603 709
   },

+ 186 - 109
pages/main/article.wxml

@@ -1,141 +1,218 @@
1 1
 <block wx:if="{{!IsBuilding && !IsBuildError}}">
2
-<!-- 正常文章 -->
3
-<view class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catch:tap="hideWordTranslate">
4
-  <view id="panelArticle" style="width: 100%;height: 1rpx;"></view>
5
-  <view class="panel1 FlexColumn">
6
-    <!-- 完整文章 -->
7
-    <text class="textArticle" wx:if="{{!IsShowTranslate}}" >
8
-      <text bindlongpress="onLongPress" data-strtype="article" data-index="{{index}}" wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" >
9
-        <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
2
+  <!-- 正常文章 -->
3
+  <view class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catch:tap="hideWordTranslate">
4
+    <view id="panelArticle" style="width: 100%;height: 1rpx;"></view>
5
+    <view class="panel1 FlexColumn">
6
+      <!-- 完整文章 -->
7
+      <text class="textArticle" wx:if="{{!IsShowTranslate}}">
8
+        <text bindlongpress="onLongPress" data-strtype="article" data-index="{{index}}" wx:for="{{Content.ArticleEnglishArr}}" wx:key="index">
9
+          <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
10
+        </text>
10 11
       </text>
11
-    </text>
12
-    <!-- 有翻译文章 -->
13
-    <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
14
-      <view wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" class="textArticle">
15
-        <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" bind:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
16
-        <view class="textArticleTranslate">{{Content.ArticleChinese[index]}}</view>
17
-        <view class="panelLine" wx:if="{{index<Content.ArticleEnglish.length-1}}"></view>
12
+      <!-- 有翻译文章 -->
13
+      <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
14
+        <view wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" class="textArticle">
15
+          <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" bind:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
16
+          <view class="textArticleTranslate">{{Content.ArticleChinese[index]}}</view>
17
+          <view class="panelLine" wx:if="{{index<Content.ArticleEnglish.length-1}}"></view>
18
+        </view>
18 19
       </view>
19 20
     </view>
20
-  </view>
21
-  <view style="width: 100%;height:700rpx;" wx:if="{{IsShowQuestion}}"></view>
22
-  <view style="width: 100%;height:{{TranslateHeight}}rpx;" wx:if="{{IsShowWordTranslate}}"></view>
23
-  
24
-  <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
25
-    <view class="panelFooter1 FlexRow">
26
-      <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">
27
-        <image src="../images/sysIcon_a15.png" class="sysIcon_a15"></image>
28
-        <view class="text02">中英对照</view>
29
-      </view>
30
-      <view id="btnQAndA" class="panelFooter12 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowQuestion">
31
-        答题
32
-      </view>
33
-      <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowSetting">
34
-        <image src="../images/sysIcon_a08.png" class="sysIcon_a03"></image>
35
-        <view class="text02">更多</view>
21
+    <view style="width: 100%;height:700rpx;" wx:if="{{IsShowQuestion}}"></view>
22
+    <view style="width: 100%;height:{{TranslateHeight}}rpx;" wx:if="{{IsShowWordTranslate}}"></view>
23
+
24
+    <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
25
+      <view class="panelFooter1 FlexRow">
26
+        <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">
27
+          <image src="../images/sysIcon_a15.png" class="sysIcon_a15"></image>
28
+          <view class="text02">中英对照</view>
29
+        </view>
30
+        <view id="btnQAndA" class="panelFooter12 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowQuestion">
31
+          答题
32
+        </view>
33
+        <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowSetting">
34
+          <image src="../images/sysIcon_a08.png" class="sysIcon_a03"></image>
35
+          <view class="text02">更多</view>
36
+        </view>
36 37
       </view>
37 38
     </view>
38
-  </view>
39 39
 
40
-  <!-- 看问题 -->
41
-  <view hidden="{{!IsShowQuestion}}" class="{{ThemeCSS}} panelAnswer FlexColumn">
42
-    <view class="text03">Reading Comprehension Questions</view>
43
-    <swiper class="panelAnswer1" indicator-dots="true" current="{{CurrentQuestionIndex}}" bindchange="updateQuestionIndex" >
44
-      <swiper-item class="panelAnswer1Item" wx:for="{{Content.Question}}" wx:key="index" data-index="{{index}}">
45
-        <scroll-view scroll-y="true" class="panelAnswer1Item1 FlexColumn">
46
-          <view class="panelAnswer2 FlexRow">
47
-            <image src="../images/sysIcon_c0{{index+1}}.png" wx:if="{{ThemeCSS=='DarkColor'}}" class="sysIcon_c01"></image>
48
-            <image src="../images/sysIcon_d0{{index+1}}.png" wx:if="{{ThemeCSS=='LightColor'}}" class="sysIcon_c01"></image>
49
-            <view class="text04 FlexColumn">
50
-              <view class="text041" bindlongpress="onLongPress" data-strtype="question" data-index="{{index}}">{{item.QuestionEnglish}}</view>
51
-              <view class="text042" wx:if="{{IsShowTranslate}}">{{item.QuestionChinese}}</view>
52
-            </view>
53
-          </view>
54
-          <view class="panelAnswer3 FlexColumn" >
55
-            <view class="panelAnswer31 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer310':'' }} FlexRow" wx:for="{{item.OptionsEnglish}}" wx:key="indexChild" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectedAnswer" data-question="{{index}}" data-index="{{indexChild}}">
56
-              <view class="panelAnswer311 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer3110':'' }}" wx:if="{{indexChild!=item.UserAnswer}}"></view>
57
-              <view class="panelAnswer311 panelAnswer3110 FlexColumn" wx:if="{{indexChild==item.UserAnswer}}">
58
-                <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a10.png" class="sysIcon_a10"></image>
59
-                <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a11.png" class="sysIcon_a10"></image>
40
+    <!-- 看问题 -->
41
+    <view hidden="{{!IsShowQuestion}}" class="{{ThemeCSS}} panelAnswer FlexColumn">
42
+      <view class="text03">Reading Comprehension Questions</view>
43
+      <swiper class="panelAnswer1" indicator-dots="true" current="{{CurrentQuestionIndex}}" bindchange="updateQuestionIndex">
44
+        <swiper-item class="panelAnswer1Item" wx:for="{{Content.Question}}" wx:key="index" data-index="{{index}}">
45
+          <scroll-view scroll-y="true" class="panelAnswer1Item1 FlexColumn">
46
+            <view class="panelAnswer2 FlexRow">
47
+              <image src="../images/sysIcon_c0{{index+1}}.png" wx:if="{{ThemeCSS=='DarkColor'}}" class="sysIcon_c01"></image>
48
+              <image src="../images/sysIcon_d0{{index+1}}.png" wx:if="{{ThemeCSS=='LightColor'}}" class="sysIcon_c01"></image>
49
+              <view class="text04 FlexColumn">
50
+                <view class="text041" bindlongpress="onLongPress" data-strtype="question" data-index="{{index}}">{{item.QuestionEnglish}}</view>
51
+                <view class="text042" wx:if="{{IsShowTranslate}}">{{item.QuestionChinese}}</view>
60 52
               </view>
61
-              <view class="text05 FlexColumn">
62
-              <view class="text051" bindlongpress="onLongPress" data-strtype="option" data-index="{{index}}" data-index2="{{indexChild}}">{{itemChild}}</view>
63
-              <view class="text052" wx:if="{{IsShowTranslate}}">{{item.OptionsChinese[indexChild]}}</view>
64 53
             </view>
54
+            <view class="panelAnswer3 FlexColumn">
55
+              <view class="panelAnswer31 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer310':'' }} FlexRow" wx:for="{{item.OptionsEnglish}}" wx:key="indexChild" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectedAnswer" data-question="{{index}}" data-index="{{indexChild}}">
56
+                <view class="panelAnswer311 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer3110':'' }}" wx:if="{{indexChild!=item.UserAnswer}}"></view>
57
+                <view class="panelAnswer311 panelAnswer3110 FlexColumn" wx:if="{{indexChild==item.UserAnswer}}">
58
+                  <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a10.png" class="sysIcon_a10"></image>
59
+                  <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a11.png" class="sysIcon_a10"></image>
60
+                </view>
61
+                <view class="text05 FlexColumn">
62
+                  <view class="text051" bindlongpress="onLongPress" data-strtype="option" data-index="{{index}}" data-index2="{{indexChild}}">{{itemChild}}</view>
63
+                  <view class="text052" wx:if="{{IsShowTranslate}}">{{item.OptionsChinese[indexChild]}}</view>
64
+                </view>
65
+              </view>
65 66
             </view>
66
-          </view>
67
-        </scroll-view>
68
-      </swiper-item>
69
-    </swiper>    
70
-    <view class="panelLine2"></view>
71
-    <view class="panelAnswer4 FlexRow">
72
-      <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{!Content.Question[CurrentQuestionIndex].IsShowAnswer}}">看答案</view>
73
-      <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{Content.Question[CurrentQuestionIndex].IsShowAnswer}}">关答案</view>
74
-      <view class="btn1  {{ CurrentQuestionIndex+1==Content.Question.length?'btn10':'' }} FlexRow" catch:tap="nextQuestion">下一题</view>
67
+          </scroll-view>
68
+        </swiper-item>
69
+      </swiper>
70
+      <view class="panelLine2"></view>
71
+      <view class="panelAnswer4 FlexRow">
72
+        <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{!Content.Question[CurrentQuestionIndex].IsShowAnswer}}">看答案</view>
73
+        <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{Content.Question[CurrentQuestionIndex].IsShowAnswer}}">关答案</view>
74
+        <view class="btn1  {{ CurrentQuestionIndex+1==Content.Question.length?'btn10':'' }} FlexRow" catch:tap="nextQuestion">下一题</view>
75
+      </view>
76
+      <view class="btnClose" capture-bind:tap="showData" data-name="IsShowQuestion">隐藏</view>
75 77
     </view>
76
-    <view class="btnClose" capture-bind:tap="showData" data-name="IsShowQuestion">隐藏</view>
77
-  </view>
78 78
 
79
-  <!-- 设置 -->
80
-  <view wx:if="{{IsShowSetting}}" class="panelAnswer FlexColumn">
81
-    <view class="text03 text06">更多功能</view>
82
-    <view class="btn2 FlexRow" catch:tap="generatePDF">
83
-      <view>PDF下载</view>
84
-    </view>
85
-    <view class="panelAnswer5 FlexColumn">
86
-      <view class="panelAnswer51 FlexRow">
87
-        <view class="text12">突出关键词</view>
88
-        <switch class="switchClass" bindchange="showData" checked="{{IsShowKeyword}}" data-name="IsShowKeyword" />
79
+    <!-- 设置 -->
80
+    <view wx:if="{{IsShowSetting}}" class="panelAnswer FlexColumn">
81
+      <view class="text03 text06">更多功能</view>
82
+      <view class="btn2 FlexRow" catch:tap="generatePDF">
83
+        <view>PDF下载</view>
89 84
       </view>
90
-      <view class="text13">用亮色强调用来生成短文的单词</view>
91
-    </view>
92
-    <view class="panelLine3"></view>
93
-    <view class="panelAnswer5 FlexColumn">
94
-      <view class="panelAnswer51 panelAnswer510 FlexRow">
95
-        <view class="text12">浅色方案</view>
96
-        <switch  class="switchClass" bindchange="showData" checked="{{IsShowLightColor}}" data-name="IsShowLightColor"/>
85
+      <view class="panelAnswer5 FlexColumn">
86
+        <view class="panelAnswer51 FlexRow">
87
+          <view class="text12">突出关键词</view>
88
+          <switch class="switchClass" bindchange="showData" checked="{{IsShowKeyword}}" data-name="IsShowKeyword" />
89
+        </view>
90
+        <view class="text13">用亮色强调用来生成短文的单词</view>
91
+      </view>
92
+      <view class="panelLine3"></view>
93
+      <view class="panelAnswer5 FlexColumn">
94
+        <view class="panelAnswer51 panelAnswer510 FlexRow">
95
+          <view class="text12">浅色方案</view>
96
+          <switch class="switchClass" bindchange="showData" checked="{{IsShowLightColor}}" data-name="IsShowLightColor" />
97
+        </view>
98
+      </view>
99
+      <view class="btnClose btnClose2 FlexRow" capture-bind:tap="showData" data-name="IsShowSetting">
100
+        <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a03.png" class="sysIcon_a03"></image>
101
+        <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a09.png" class="sysIcon_a03"></image>
97 102
       </view>
98 103
     </view>
99
-    <view class="btnClose btnClose2 FlexRow" capture-bind:tap="showData" data-name="IsShowSetting">
100
-      <image  wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a03.png" class="sysIcon_a03"></image>
101
-      <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a09.png" class="sysIcon_a03"></image>
104
+
105
+  </view>
106
+
107
+  <!-- 翻译 -->
108
+  <view wx:if="{{IsShowWordTranslate}}" class="panelTranslate FlexColumn" catch:tap="setDataBoolean" data-name="IsShowWordTranslate">
109
+    <text class="panelTranslateTest1">{{EnglishSentence}}</text>
110
+    <text class="panelTranslateTest2">{{ChineseSentence}}</text>
111
+    <view class="panelTranslateCollect FlexRow" wx:if="{{TranslateHeight==100}}" >
112
+      <view class="panelTranslateCollect1 FlexRow" catch:tap="saveUserCollect" data-word="{{EnglishSentence}}">
113
+        <image wx:if="{{!IsCollect}}" src="../images/sysIcon_a35.png" class="sysIcon_a35"></image>
114
+        <image wx:if="{{IsCollect}}" src="../images/sysIcon_a36.png" class="sysIcon_a35"></image>
115
+      </view>
116
+      <view class="panelTranslateCollect1 FlexRow" catch:tap="onDoubleClickHandler" data-original-word="{{EnglishSentence}}">
117
+        <image src="../images/sysIcon_a45.png" class="sysIcon_a45"></image>
118
+      </view>
102 119
     </view>
103 120
   </view>
104 121
 
105
-</view>
122
+  <!-- 单词细节 -->
123
+  <view wx:if="{{IsShowWordDetail}}" class="panelTranslate panelTranslate2 FlexColumn" catch:tap="setDataBoolean" data-name="IsShowWordDetail">
124
+    <view class="panelTranslate21 FlexRow">
125
+      <text class="panelTranslateTest1 panelTranslateTest10">{{WordJSON.Word}}</text>
126
+      <view class="panelTranslateCollect FlexRow" catch:tap="saveUserCollect" data-word="{{WordJSON.Word}}">
127
+        <view class="panelTranslateCollect1 FlexRow">
128
+          <image wx:if="{{!IsCollect}}" src="../images/sysIcon_a35.png" class="sysIcon_a35"></image>
129
+          <image wx:if="{{IsCollect}}" src="../images/sysIcon_a36.png" class="sysIcon_a35"></image>
130
+        </view>
131
+        <view class="panelTranslateCollect1 FlexRow" catch:tap="setDataBoolean" data-name="IsShowWordDetail">
132
+          <image src="../images/sysIcon_a09.png" class="sysIcon_a09"></image>
133
+        </view>
134
+      </view>
135
+    </view>
136
+    <scroll-view scroll-y="true" class="panelTranslateScroll FlexColumn">
137
+      <block wx:if="{{WordJSON.Soundmark}}">
138
+        <view class="panelTranslate22 FlexRow">
139
+          <view class="panelTranslate22Text panelTranslate22Text0 FlexRow" catch:tap="playAudio" data-url="{{WordJSON.Soundmark.EngSound}}" wx:if="{{WordJSON.Soundmark.EngSound}}">
140
+            英{{WordJSON.Soundmark.Eng}}
141
+            <image src="../images/sysIcon_a44.png" class="sysIcon_a44"></image>
142
+          </view>
143
+          <view class="panelTranslate22Text FlexRow" catch:tap="playAudio" data-url="{{WordJSON.Soundmark.AmESound}}" wx:if="{{WordJSON.Soundmark.AmESound}}">
144
+            美{{WordJSON.Soundmark.AmE}}
145
+            <image src="../images/sysIcon_a44.png" class="sysIcon_a44"></image>
146
+          </view>
147
+        </view>
148
+      </block>
149
+      
150
+      <block wx:if="{{WordJSON.CEFR_Level || WordJSON.WordFrequency || WordJSON.Book.length>0}}">
151
+        <view class="panelTranslateLine"></view>
152
+        <scroll-view class="panelTranslate23"  scroll-x="true">
153
+          <view class="panelTranslate231 FlexRow" wx:if="{{WordJSON.CEFR_Level}}"><view>CEFR {{WordJSON.CEFR_Level}}</view></view>
154
+          <view class="panelTranslate231 panelTranslate232 FlexRow" wx:if="{{WordJSON.WordFrequency}}"><view>高频单词{{WordJSON.WordFrequency.Max}}范围</view></view>
155
+          <view class="panelTranslate231 panelTranslate232 FlexRow" wx:if="{{WordJSON.Book}}" wx:for="{{WordJSON.Book}}" wx:key="*this"><view>{{item}}</view></view>
156
+          <view style="width:30rpx;display: inline-block;"></view>
157
+        </scroll-view>
158
+      </block>
159
+
160
+      <block wx:if="{{WordJSON.ParaphraseEng}}">
161
+        <view class="panelTranslateLine" ></view>
162
+        <view class="panelTranslate24 FlexColumn" wx:for="{{WordJSON.ParaphraseEng}}" wx:key="*this">
163
+          <view class="panelTranslate241" wx:for="{{item.ParaphraseList}}" wx:key="*this" wx:for-item="itemChild">
164
+            {{item.PartOfSpeech}} {{itemChild}}
165
+          </view>
166
+        </view>
167
+        <view style="height:30rpx;"></view>
168
+      </block>
169
+
170
+      <block wx:if="{{WordJSON.Paraphrase}}">
171
+        <view class="panelTranslateLine" wx:if="{{WordJSON.Paraphrase}}"></view>
172
+        <view class="panelTranslate24 FlexColumn" wx:for="{{WordJSON.Paraphrase}}" wx:key="*this">
173
+          <view class="panelTranslate241">{{item.PartOfSpeech}} <block class="panelTranslate242" wx:for="{{item.ParaphraseList}}" wx:key="*this" wx:for-item="itemChild">
174
+            {{itemChild}}
175
+          </block>
176
+          </view>
177
+        </view>
178
+        <view style="height:30rpx;"></view>
179
+      </block>
180
+
181
+      <block wx:if="{{WordJSON.Paraphrase}}">
182
+        <view class="panelTranslateLine" ></view>
183
+        <view class="panelTranslate24 FlexColumn" wx:for="{{WordJSON.ExamplesSentences}}" wx:key="*this">
184
+          <text class="panelTranslate241 panelTranslate242">{{item[0]}}</text>
185
+          <view class="panelTranslate241 panelTranslate243">{{item[1]}}</view>
186
+        </view>
187
+      </block>
188
+
189
+      <view style="height:50rpx;"></view>
190
+    </scroll-view>
106 191
 
107
-<!-- 翻译 -->
108
-<view wx:if="{{IsShowWordTranslate}}"  class="panelTranslate FlexColumn" catch:tap="setDataBoolean" data-name="IsShowWordTranslate">
109
-  <text class="panelTranslateTest1">{{EnglishSentence}}</text>
110
-  <text class="panelTranslateTest2">{{ChineseSentence}}</text>
111
-  <view class="panelTranslateCollect FlexColumn" wx:if="{{TranslateHeight==100}}" catch:tap="saveUserCollect" data-word="{{EnglishSentence}}">
112
-    <image wx:if="{{!IsCollect}}" src="../images/sysIcon_a35.png" class="sysIcon_a35"></image>
113
-    <image wx:if="{{IsCollect}}" src="../images/sysIcon_a36.png" class="sysIcon_a35"></image>
114 192
   </view>
115
-</view>
116 193
 
117
-<!-- 显示第一次打开帮助 -->
118
-<view wx:if="{{IsShowFirstOpen2}}" class="panelHelp container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
119
-  <view class="panelHelp1">
120
-    <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
121
-    <view class="panelHelp2 FlexColumn">
122
-      <text class="text07">点击译单词,双击看详细,长按译句子\n点答题做题目,右下角还有PDF</text>
123
-      <view class="btn3 FlexColumn" catch:tap="setDataBoolean" data-name="IsShowFirstOpen2" data-savedata="2">知道了</view>
194
+  <!-- 显示第一次打开帮助 -->
195
+  <view wx:if="{{IsShowFirstOpen2}}" class="panelHelp container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
196
+    <view class="panelHelp1">
197
+      <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
198
+      <view class="panelHelp2 FlexColumn">
199
+        <text class="text07">点击译单词,双击看详细,长按译句子\n点答题做题目,右下角还有PDF</text>
200
+        <view class="btn3 FlexColumn" catch:tap="setDataBoolean" data-name="IsShowFirstOpen2" data-savedata="2">知道了</view>
201
+      </view>
124 202
     </view>
125 203
   </view>
126
-</view>
127 204
 </block>
128 205
 
129 206
 <!-- 引入引导模板 -->
130
-<import src="../templates/guide-container.wxml"/>
207
+<import src="../templates/guide-container.wxml" />
131 208
 <!-- 显示引导 -->
132
-<template is="guide-container" data="{{IsShowGuideContainer, panelGuideContainerTop, panelGuideContainerWidth1, panelGuideContainerHeight1, panelGuideContainerLeft2, Containnerheight, panelGuideContainerImage, panelGuideContainerImageLeft, panelGuideContainerImageTop, panelGuideContainerCloseLeft, panelGuideContainerCloseTop}}"/>
209
+<template is="guide-container" data="{{IsShowGuideContainer, panelGuideContainerTop, panelGuideContainerWidth1, panelGuideContainerHeight1, panelGuideContainerLeft2, Containnerheight, panelGuideContainerImage, panelGuideContainerImageLeft, panelGuideContainerImageTop, panelGuideContainerCloseLeft, panelGuideContainerCloseTop}}" />
133 210
 
134 211
 <!-- 显示生成出错 -->
135 212
 <view wx:if="{{IsBuildError}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
136 213
   <view class="{{ThemeCSS}} panelError FlexColumn">
137
-    <image  wx:if="{{ThemeCSS=='DarkColor'}}"  src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
138
-    <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
214
+    <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
215
+    <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
139 216
     <view class="textError1">抱歉,生成失败</view>
140 217
     <view class="textError2">可能生成过于频繁、网络不畅或使用了不适合的单词,请稍候再试。</view>
141 218
   </view>
@@ -145,8 +222,8 @@
145 222
 <!-- 显示生成排队中 -->
146 223
 <view wx:if="{{IsBuildQueue}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
147 224
   <view class="{{ThemeCSS}} panelError FlexColumn">
148
-    <image  wx:if="{{ThemeCSS=='DarkColor'}}"  src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
149
-    <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
225
+    <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
226
+    <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
150 227
     <view class="textError1">抱歉,生成排队中</view>
151 228
     <view class="textError2">生成文章已加入队列,等待处理,请稍候</view>
152 229
   </view>

+ 97 - 4
pages/main/article.wxss

@@ -585,29 +585,122 @@ pages .LightColor{
585 585
   justify-content: flex-start;
586 586
   color: #2E2E2E;
587 587
 }
588
+
589
+.panelTranslate2{
590
+  height:1000rpx;
591
+}
592
+
588 593
 .panelTranslateTest1{
589 594
   width: 630rpx;
590
-  margin: 30rpx 0 0 40rpx;
595
+  margin: 30rpx 0 20rpx 40rpx;
591 596
   font-size: 28rpx;
592 597
   font-weight: 700;
593 598
 }
599
+.panelTranslateTest10{
600
+  margin: 30rpx 0 20rpx 0rpx;
601
+}
594 602
 .panelTranslateTest2{
595 603
   width: 630rpx;
596
-  margin: 20rpx 0 30rpx 40rpx;
604
+  margin:0 0 30rpx 40rpx;
597 605
   font-size: 36rpx;
598 606
   font-weight: 400;
599 607
 }
600 608
 .panelTranslateCollect{
601
-  width:100rpx;
602
-  height:90rpx;
603 609
   position: absolute;
604 610
   top:0;
605 611
   right:0;
606 612
 }
613
+.panelTranslateCollect1{
614
+  width:80rpx;
615
+  height:90rpx;
616
+}
617
+
618
+.panelTranslate21{
619
+  width: 100%;
620
+}
621
+
622
+.panelTranslateScroll{
623
+  width:100%;
624
+  height:910rpx;
625
+  justify-content: flex-start;
626
+  align-items: flex-start;
627
+}
628
+
607 629
 .sysIcon_a35{
608 630
   width: 30rpx;
609 631
   height:30rpx;
610 632
 }
633
+.sysIcon_a45{
634
+  width: 26rpx;
635
+  height:30rpx;
636
+}
637
+.sysIcon_a09{
638
+  width: 20rpx;
639
+  height:20rpx;
640
+}
641
+.panelTranslate22{
642
+  width: 100%;
643
+  justify-content: flex-start;
644
+}
645
+
646
+.panelTranslate22Text{
647
+  height:100rpx;
648
+  font-size: 36rpx;
649
+  margin-right: 30rpx;
650
+}
651
+.panelTranslate22Text0{
652
+  margin-left: 40rpx;
653
+}
654
+.sysIcon_a44{
655
+  width: 38rpx;
656
+  height:30rpx;
657
+  margin-left: 16rpx;
658
+}
659
+.panelTranslateLine{
660
+  width:630rpx;
661
+  height:1rpx;
662
+  background-color: #d2d2d2;
663
+  margin-left: 40rpx;
664
+}
665
+
666
+.panelTranslate23{
667
+  width: 100%;
668
+  display: flex;
669
+  white-space: nowrap;
670
+}
671
+.panelTranslate231{
672
+  line-height:50rpx;
673
+  border: 3rpx solid #D2D2D2;
674
+  border-radius: 25rpx;
675
+  padding: 0 20rpx;
676
+  margin: 30rpx 0 30rpx 40rpx;
677
+  display: inline-block;
678
+  font-size: 24rpx;
679
+}
680
+
681
+.panelTranslate232{
682
+  margin: 30rpx 0 30rpx 20rpx;
683
+}
684
+.panelTranslate24{
685
+  width:630rpx;
686
+  align-items: flex-start;
687
+  color:#2E2E2E;
688
+}
689
+.panelTranslate241{
690
+  width: 100%;
691
+  margin: 30rpx 0 0 40rpx;
692
+  font-weight: 400;
693
+  font-size: 28rpx;
694
+}
695
+.panelTranslate242{
696
+  font-weight: 700;
697
+}
698
+.panelTranslate243{
699
+  margin-top: 0;
700
+}
701
+.panelTranslateText1{
702
+  text-decoration: underline;
703
+}
611 704
 
612 705
 /* 生成中 */
613 706
 .panelBuildindParent{

+ 12 - 1
pages/main/index.js

@@ -21,7 +21,7 @@ Page({
21 21
     // setTimeout(function(){
22 22
     //   if (!app.globalData.IsProduction){
23 23
     //     wx.navigateTo({
24
-    //       url: 'articlefine',
24
+    //       url: '../../packageReader/main/index',
25 25
     //     })
26 26
     //   }
27 27
     // },1000);
@@ -67,6 +67,17 @@ Page({
67 67
   goto: function (e) {
68 68
     let that=this;
69 69
     var url=e.currentTarget.dataset.url;
70
+    if ((
71
+      app.globalData.userInfo.UserID==1 || 
72
+      app.globalData.userInfo.UserID==244 || 
73
+      app.globalData.userInfo.UserID==1874
74
+      )
75
+      && url=="../../packageReader/main/index"){
76
+      wx.redirectTo({
77
+        url: url,
78
+      });
79
+    }
80
+
70 81
     if (url=="wordsinput"){
71 82
       if (that.data.TodayCount>that.data.MaxCount){
72 83
         animation.toggleRemindWithAnimation(that);

+ 1 - 1
pages/main/index.wxml

@@ -2,7 +2,7 @@
2 2
   <view class="panelTop {{CanScrollCSS}} FlexColumn">
3 3
     
4 4
     <view class="panel1 FlexColumn">
5
-      <image src="../images/pic_01.png" class="pic_01"></image>
5
+      <image src="../images/pic_01.png" class="pic_01" bind:tap="goto" data-url="../../packageReader/main/index"></image>
6 6
     </view>
7 7
 
8 8
     <view class="panel2 FlexColumn">

+ 9 - 2
project.private.config.json

@@ -23,12 +23,19 @@
23 23
     "miniprogram": {
24 24
       "list": [
25 25
         {
26
-          "name": "pages/main/product",
27
-          "pathName": "pages/main/product",
26
+          "name": "packageReader/main/index",
27
+          "pathName": "packageReader/main/index",
28 28
           "query": "",
29 29
           "scene": null,
30 30
           "launchMode": "default"
31 31
         },
32
+        {
33
+          "name": "pages/main/product",
34
+          "pathName": "pages/main/product",
35
+          "query": "",
36
+          "launchMode": "default",
37
+          "scene": null
38
+        },
32 39
         {
33 40
           "name": "文章跳转",
34 41
           "pathName": "pages/index/index",