chengjie 4 月之前
父节点
当前提交
813fdca6a9
共有 61 个文件被更改,包括 1002 次插入393 次删除
  1. 1 1
      app.js
  2. 1 1
      components/navigation-bar/navigation-bar.wxml
  3. 3 3
      components/navigation-bar/navigation-bar.wxss
  4. 二进制
      pages/.DS_Store
  5. 二进制
      pages/images/.DS_Store
  6. 二进制
      pages/images/pic_01.png
  7. 二进制
      pages/images/pic_02.png
  8. 二进制
      pages/images/pic_03.png
  9. 二进制
      pages/images/pic_07.png
  10. 二进制
      pages/images/pic_08.png
  11. 二进制
      pages/images/pic_09.png
  12. 二进制
      pages/images/pic_h01.png
  13. 二进制
      pages/images/pic_h02.png
  14. 二进制
      pages/images/pic_h03.png
  15. 二进制
      pages/images/pic_h08.png
  16. 二进制
      pages/images/pic_h09.png
  17. 二进制
      pages/images/pic_h10.png
  18. 二进制
      pages/images/pic_h11.png
  19. 二进制
      pages/images/pic_h12.png
  20. 二进制
      pages/images/pic_h13.png
  21. 二进制
      pages/images/pic_h14.png
  22. 二进制
      pages/images/pic_h15.png
  23. 二进制
      pages/images/sysIcon_a15.png
  24. 二进制
      pages/images/sysIcon_a16.png
  25. 二进制
      pages/images/sysIcon_a99.png
  26. 二进制
      pages/images/sysIcon_b02.png
  27. 二进制
      pages/images/sysIcon_b05.png
  28. 二进制
      pages/images/sysIcon_b08.gif
  29. 二进制
      pages/images/sysIcon_b09.png
  30. 二进制
      pages/images/sysIcon_b10.png
  31. 二进制
      pages/images/sysIcon_b11.png
  32. 二进制
      pages/images/sysIcon_b12.png
  33. 二进制
      pages/images/sysIcon_b13.png
  34. 二进制
      pages/images/sysIcon_b14.png
  35. 二进制
      pages/images/sysIcon_b15.png
  36. 3 3
      pages/index/index.js
  37. 68 150
      pages/main/article.js
  38. 5 2
      pages/main/article.json
  39. 45 20
      pages/main/article.wxml
  40. 101 16
      pages/main/article.wxss
  41. 1 1
      pages/main/help.js
  42. 1 1
      pages/main/help.wxml
  43. 30 1
      pages/main/index.js
  44. 19 0
      pages/main/index.wxml
  45. 70 0
      pages/main/index.wxss
  46. 26 27
      pages/main/myarticles.js
  47. 22 1
      pages/main/myarticles.wxml
  48. 71 2
      pages/main/myarticles.wxss
  49. 61 26
      pages/main/ocr.js
  50. 1 1
      pages/main/ocr.wxml
  51. 80 19
      pages/main/paste.js
  52. 1 1
      pages/main/paste.json
  53. 16 12
      pages/main/paste.wxml
  54. 50 24
      pages/main/paste.wxss
  55. 50 19
      pages/main/selectword.js
  56. 18 12
      pages/main/selectword.wxml
  57. 35 10
      pages/main/selectword.wxss
  58. 71 15
      pages/main/wordsinput.js
  59. 1 0
      pages/main/wordsinput.json
  60. 37 12
      pages/main/wordsinput.wxml
  61. 114 13
      pages/main/wordsinput.wxss

+ 1 - 1
app.js

@@ -34,7 +34,7 @@ App({
34
     ocrReady: false
34
     ocrReady: false
35
   },
35
   },
36
   onLaunch: function (options) {
36
   onLaunch: function (options) {
37
-    var that=this;
37
+    let that=this;
38
     that.getSystemInfo();
38
     that.getSystemInfo();
39
     // wx.setEnableDebug({
39
     // wx.setEnableDebug({
40
     //   enableDebug: true
40
     //   enableDebug: true

+ 1 - 1
components/navigation-bar/navigation-bar.wxml

@@ -15,7 +15,7 @@
15
               aria-role="button"
15
               aria-role="button"
16
               aria-label="返回"
16
               aria-label="返回"
17
             >
17
             >
18
-              <view class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
18
+              <view class="{{ThemeCSS}} weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
19
             </view>
19
             </view>
20
           </view>
20
           </view>
21
         </block>
21
         </block>

+ 3 - 3
components/navigation-bar/navigation-bar.wxss

@@ -39,7 +39,7 @@
39
 
39
 
40
 .weui-navigation-bar__btn_goback_wrapper {
40
 .weui-navigation-bar__btn_goback_wrapper {
41
   padding: 11px 18px 11px 16px;
41
   padding: 11px 18px 11px 16px;
42
-  margin: -11px -18px -11px -16px;
42
+  margin: -0rpx -18rpx -11rpx -40rpx;
43
 }
43
 }
44
 
44
 
45
 .weui-navigation-bar__btn_goback_wrapper.weui-active {
45
 .weui-navigation-bar__btn_goback_wrapper.weui-active {
@@ -50,8 +50,8 @@
50
   font-size: 12px;
50
   font-size: 12px;
51
   width: 12px;
51
   width: 12px;
52
   height: 24px;
52
   height: 24px;
53
-  -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
54
-  mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
53
+  -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
54
+  mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
55
   -webkit-mask-size: cover;
55
   -webkit-mask-size: cover;
56
   mask-size: cover;
56
   mask-size: cover;
57
   background-color: var(--weui-FG-0);
57
   background-color: var(--weui-FG-0);

二进制
pages/.DS_Store


二进制
pages/images/.DS_Store


二进制
pages/images/pic_01.png


二进制
pages/images/pic_02.png


二进制
pages/images/pic_03.png


二进制
pages/images/pic_07.png


二进制
pages/images/pic_08.png


二进制
pages/images/pic_09.png


二进制
pages/images/pic_h01.png


二进制
pages/images/pic_h02.png


二进制
pages/images/pic_h03.png


二进制
pages/images/pic_h08.png


二进制
pages/images/pic_h09.png


二进制
pages/images/pic_h10.png


二进制
pages/images/pic_h11.png


二进制
pages/images/pic_h12.png


二进制
pages/images/pic_h13.png


二进制
pages/images/pic_h14.png


二进制
pages/images/pic_h15.png


二进制
pages/images/sysIcon_a15.png


二进制
pages/images/sysIcon_a16.png


二进制
pages/images/sysIcon_a99.png


二进制
pages/images/sysIcon_b02.png


二进制
pages/images/sysIcon_b05.png


二进制
pages/images/sysIcon_b08.gif


二进制
pages/images/sysIcon_b09.png


二进制
pages/images/sysIcon_b10.png


二进制
pages/images/sysIcon_b11.png


二进制
pages/images/sysIcon_b12.png


二进制
pages/images/sysIcon_b13.png


二进制
pages/images/sysIcon_b14.png


二进制
pages/images/sysIcon_b15.png


+ 3 - 3
pages/index/index.js

@@ -7,7 +7,7 @@ Page({
7
   data: {
7
   data: {
8
   },
8
   },
9
   onLoad: function (options) {
9
   onLoad: function (options) {
10
-    const that = this;
10
+    let that = this;
11
     if (options) {
11
     if (options) {
12
       if (options.UserID) {
12
       if (options.UserID) {
13
         console.log("UserID:" + options.UserID);
13
         console.log("UserID:" + options.UserID);
@@ -46,7 +46,7 @@ Page({
46
   },
46
   },
47
   //得到用户信息
47
   //得到用户信息
48
   getUserInfo: function (cb) {
48
   getUserInfo: function (cb) {
49
-    var that = this
49
+    let that = this
50
     //调用登录接口
50
     //调用登录接口
51
     wx.login({
51
     wx.login({
52
       success: function (res0) {
52
       success: function (res0) {
@@ -66,7 +66,7 @@ Page({
66
   },
66
   },
67
 
67
 
68
   login: function (param) {
68
   login: function (param) {
69
-    var that = this;
69
+    let that = this;
70
 
70
 
71
     main.getLocalHost(function () {
71
     main.getLocalHost(function () {
72
       main.postData('YJBDCLogin', {
72
       main.postData('YJBDCLogin', {

+ 68 - 150
pages/main/article.js

@@ -19,25 +19,34 @@ Page({
19
     Words:"",
19
     Words:"",
20
     IsShowFirstOpen:true,
20
     IsShowFirstOpen:true,
21
     IsBuilding:false,
21
     IsBuilding:false,
22
+    IsBuildError:false,
22
     IsShowLightColor:false,
23
     IsShowLightColor:false,
23
     IsShowKeyword:true,//显示关键词
24
     IsShowKeyword:true,//显示关键词
24
     IsShowQuestion:false,
25
     IsShowQuestion:false,
25
     IsShowTranslate:false,
26
     IsShowTranslate:false,
26
-    IsShowAnswer:false,
27
     IsShowSetting:false,
27
     IsShowSetting:false,
28
     CurrentQuestionIndex:0,
28
     CurrentQuestionIndex:0,
29
     swiperHeight: "526rpx",
29
     swiperHeight: "526rpx",
30
     lastTapTime: 0, // 记录上一次点击的时间,用于检测双击
30
     lastTapTime: 0, // 记录上一次点击的时间,用于检测双击
31
+    CountDown:30,//倒计时秒数
31
   },
32
   },
32
   onLoad: function (options) {
33
   onLoad: function (options) {
33
     let that = this;
34
     let that = this;
34
     let words=app.globalData.SelectedWords.join(",");
35
     let words=app.globalData.SelectedWords.join(",");
36
+    let wordsStr=app.globalData.SelectedWords.join(" ");
35
     const hiddenhelp=wx.getStorageSync('HiddenArticleFirstOpen');
37
     const hiddenhelp=wx.getStorageSync('HiddenArticleFirstOpen');
36
 
38
 
39
+    let IsShowLightColor=wx.getStorageSync('IsShowLightColor');
40
+    if (!IsShowLightColor)
41
+      IsShowLightColor=false;
42
+    
37
     that.setData({
43
     that.setData({
38
       Containnerheight: main.getWindowHeight(),
44
       Containnerheight: main.getWindowHeight(),
39
-      Words:words, 
45
+      Words:words,
46
+      WordsStr:wordsStr,
40
       IsShowFirstOpen:!hiddenhelp,
47
       IsShowFirstOpen:!hiddenhelp,
48
+      IsShowLightColor:IsShowLightColor,
49
+      IsBuildError:false,
41
     });
50
     });
42
 
51
 
43
     if (options.ID)
52
     if (options.ID)
@@ -47,7 +56,7 @@ Page({
47
     that.setTheme();
56
     that.setTheme();
48
   },
57
   },
49
   getArticleByID:function(id){
58
   getArticleByID:function(id){
50
-    const that=this;
59
+    let that=this;
51
     main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+'&ID='+id, function (data) {
60
     main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+'&ID='+id, function (data) {
52
       if (data) {
61
       if (data) {
53
         data=data[0];
62
         data=data[0];
@@ -61,10 +70,17 @@ Page({
61
     });
70
     });
62
   },
71
   },
63
   init:function(options){
72
   init:function(options){
64
-    const that=this;
65
-    wx.showLoading({
66
-      title: '生成中',
67
-    });
73
+    let that=this;
74
+    let interval=0;
75
+    that.data.CountDown=30;
76
+    interval = setInterval(function(){
77
+      that.setData({
78
+        CountDown:--that.data.CountDown,
79
+      });
80
+      if (that.data.CountDown<=0)
81
+        clearInterval(interval);
82
+    },1200);
83
+
68
     that.setData({
84
     that.setData({
69
       IsBuilding:true
85
       IsBuilding:true
70
     });
86
     });
@@ -75,149 +91,26 @@ Page({
75
       ArticleStyle:options.ArticleStyle
91
       ArticleStyle:options.ArticleStyle
76
     }, function (data) {
92
     }, function (data) {
77
       if (data){
93
       if (data){
78
-        wx.hideLoading();
79
-        let content=data;
80
-        that.updateData(content);
81
-        that.setData({
82
-          IsBuilding:false,
83
-        });
94
+        if (data=="-1"){
95
+          that.setData({
96
+            IsBuildError:true,
97
+          });
98
+        }
99
+        else{
100
+          let content=data;
101
+          that.updateData(content);
102
+          that.setData({
103
+            IsBuilding:false,
104
+          });
105
+        }
106
+        
107
+        clearInterval(interval);
84
       }
108
       }
85
     });
109
     });
86
-
87
-    if (1==0){
88
-    //   let content={
89
-    //     "ArticleEnglish": [
90
-    //         "Once upon a time, there was a king in a beautiful kingdom.",
91
-    //         "A fierce dragon came and brought yellow fire to the kingdom.",
92
-    //         "The people in the kingdom were very afraid.",
93
-    //         "A brave boy and a kind - hearted girl decided to go and fight against the dragon.",
94
-    //         "They came to the dragon's cave and saw the dragon sleeping.",
95
-    //         "The boy used a big stick to wake up the dragon.",
96
-    //         "The dragon was angry and spat out yellow fire at them.",
97
-    //         "But the boy and the girl were not scared.",
98
-    //         "They worked together and finally defeated the dragon.",
99
-    //         "The king was very happy and thanked the boy and the girl."
100
-    //     ],
101
-    //     "ArticleChinese": [
102
-    //         "从前,在一个美丽的王国里有一位国王。",
103
-    //         "一条凶猛的龙来了,给王国带来了黄色的火焰。",
104
-    //         "王国里的人们非常害怕。",
105
-    //         "一个勇敢的男孩和一个善良的女孩决定去与龙战斗。",
106
-    //         "他们来到了龙的洞穴,看到龙正在睡觉。",
107
-    //         "男孩用一根大棍子把龙叫醒了。",
108
-    //         "龙很生气,朝他们吐出了黄色的火焰。",
109
-    //         "但是男孩和女孩并不害怕。",
110
-    //         "他们齐心协力,最终打败了龙。",
111
-    //         "国王非常高兴,感谢了男孩和女孩。"
112
-    //     ],
113
-    //     "FormsOfWords": [
114
-    //         "boy",
115
-    //         "girl",
116
-    //         "king",
117
-    //         "come",
118
-    //         "came",
119
-    //         "go",
120
-    //         "went",
121
-    //         "yellow",
122
-    //         "dragon",
123
-    //         "dragons",
124
-    //         "fire"
125
-    //     ],
126
-    //     "Question": [
127
-    //         {
128
-    //             "QuestionEnglish": "Who brought yellow fire to the kingdom?",
129
-    //             "QuestionChinese": "谁给王国带来了黄色的火焰?",
130
-    //             "OptionsEnglish": [
131
-    //                 "A. The boy",
132
-    //                 "B. The girl",
133
-    //                 "C. The king",
134
-    //                 //"D. The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon  The dragon"
135
-    //                 "D. The dragon"
136
-    //             ],
137
-    //             "OptionsChinese": [
138
-    //                 "A. 男孩",
139
-    //                 "B. 女孩",
140
-    //                 "C. 国王",
141
-    //                 "D. 龙"
142
-    //             ],
143
-    //             "Answer": "D"
144
-    //         },
145
-    //         {
146
-    //             "QuestionEnglish": "What did the boy and the girl decide to do?",
147
-    //             "QuestionChinese": "男孩和女孩决定做什么?",
148
-    //             "OptionsEnglish": [
149
-    //                 "A. Go home",
150
-    //                 "B. Fight against the dragon",
151
-    //                 "C. Play with the dragon",
152
-    //                 "D. Sleep in the cave"
153
-    //             ],
154
-    //             "OptionsChinese": [
155
-    //                 "A. 回家",
156
-    //                 "B. 与龙战斗",
157
-    //                 "C. 和龙一起玩",
158
-    //                 "D. 在洞穴里睡觉"
159
-    //             ],
160
-    //             "Answer": "B"
161
-    //         },
162
-    //         {
163
-    //             "QuestionEnglish": "How did the boy wake up the dragon?",
164
-    //             "QuestionChinese": "男孩是如何叫醒龙的?",
165
-    //             "OptionsEnglish": [
166
-    //                 "A. By shouting",
167
-    //                 "B. By using a big stick",
168
-    //                 "C. By throwing stones",
169
-    //                 "D. By singing"
170
-    //             ],
171
-    //             "OptionsChinese": [
172
-    //                 "A. 通过大喊",
173
-    //                 "B. 通过使用一根大棍子",
174
-    //                 "C. 通过扔石头",
175
-    //                 "D. 通过唱歌"
176
-    //             ],
177
-    //             "Answer": "B"
178
-    //         },
179
-    //         {
180
-    //             "QuestionEnglish": "How did the dragon feel when it woke up?",
181
-    //             "QuestionChinese": "龙醒来时感觉如何?",
182
-    //             "OptionsEnglish": [
183
-    //                 "A. Happy",
184
-    //                 "B. Sad",
185
-    //                 "C. Angry",
186
-    //                 "D. Tired"
187
-    //             ],
188
-    //             "OptionsChinese": [
189
-    //                 "A. 高兴的",
190
-    //                 "B. 悲伤的",
191
-    //                 "C. 生气的",
192
-    //                 "D. 疲惫的"
193
-    //             ],
194
-    //             "Answer": "C"
195
-    //         },
196
-    //         {
197
-    //             "QuestionEnglish": "What did the king do after the boy and the girl defeated the dragon?",
198
-    //             "QuestionChinese": "男孩和女孩打败龙后,国王做了什么?",
199
-    //             "OptionsEnglish": [
200
-    //                 "A. He punished them",
201
-    //                 "B. He thanked them",
202
-    //                 "C. He ignored them",
203
-    //                 "D. He was angry with them"
204
-    //             ],
205
-    //             "OptionsChinese": [
206
-    //                 "A. 他惩罚了他们",
207
-    //                 "B. 他感谢了他们",
208
-    //                 "C. 他无视了他们",
209
-    //                 "D. 他对他们很生气"
210
-    //             ],
211
-    //             "Answer": "B"
212
-    //         }
213
-    //     ]
214
-    // };
215
-      that.updateData(content);
216
-    }
217
   },
110
   },
218
   
111
   
219
   updateData:function(content){
112
   updateData:function(content){
220
-    const that=this;
113
+    let that=this;
221
     //console.log(content);
114
     //console.log(content);
222
     if (typeof content === 'string') {
115
     if (typeof content === 'string') {
223
       content = JSON.parse(content);
116
       content = JSON.parse(content);
@@ -248,13 +141,14 @@ Page({
248
       let char = content.Question[i].Answer;
141
       let char = content.Question[i].Answer;
249
       let asciiCode = char.charCodeAt(0);
142
       let asciiCode = char.charCodeAt(0);
250
       content.Question[i].AnswerNumber=asciiCode-65;
143
       content.Question[i].AnswerNumber=asciiCode-65;
144
+      content.Question[i].IsShowAnswer=false;
251
     }
145
     }
252
     that.setData({
146
     that.setData({
253
       Content:content,
147
       Content:content,
254
     });
148
     });
255
   },
149
   },
256
   setTheme:function(){
150
   setTheme:function(){
257
-    const that=this;
151
+    let that=this;
258
     const css=Theme[that.data.IsShowLightColor?1:0];
152
     const css=Theme[that.data.IsShowLightColor?1:0];
259
     wx.setNavigationBarColor({
153
     wx.setNavigationBarColor({
260
       frontColor: css.frontColor,
154
       frontColor: css.frontColor,
@@ -268,6 +162,7 @@ Page({
268
     that.setData({
162
     that.setData({
269
       ThemeCSS:css.Name,
163
       ThemeCSS:css.Name,
270
     });
164
     });
165
+    wx.setStorageSync('IsShowLightColor', that.data.IsShowLightColor);
271
   },
166
   },
272
   closeHelp:function(){
167
   closeHelp:function(){
273
     this.setData({
168
     this.setData({
@@ -276,7 +171,7 @@ Page({
276
     wx.setStorageSync('HiddenArticleFirstOpen', true);
171
     wx.setStorageSync('HiddenArticleFirstOpen', true);
277
   },
172
   },
278
   selectedAnswer:function(e){
173
   selectedAnswer:function(e){
279
-    const that=this;
174
+    let that=this;
280
     const question=e.currentTarget.dataset.question;
175
     const question=e.currentTarget.dataset.question;
281
     const index=e.currentTarget.dataset.index;
176
     const index=e.currentTarget.dataset.index;
282
     that.data.Content.Question[question].UserAnswer=index;
177
     that.data.Content.Question[question].UserAnswer=index;
@@ -286,7 +181,7 @@ Page({
286
   },
181
   },
287
 
182
 
288
   showData:function(e){
183
   showData:function(e){
289
-    const that=this;
184
+    let that=this;
290
     let name=e.currentTarget.dataset.name;
185
     let name=e.currentTarget.dataset.name;
291
     this.data[name] = !this.data[name];
186
     this.data[name] = !this.data[name];
292
     this.setData(this.data);
187
     this.setData(this.data);
@@ -297,9 +192,17 @@ Page({
297
     else if (name=="IsShowLightColor"){
192
     else if (name=="IsShowLightColor"){
298
       that.setTheme();
193
       that.setTheme();
299
     }
194
     }
195
+    else if (name=="IsShowAnswer"){
196
+      let index=e.currentTarget.dataset.index;
197
+      let content=that.data.Content;
198
+      content.Question[index].IsShowAnswer=!content.Question[index].IsShowAnswer;
199
+      that.setData({
200
+        Content:content,
201
+      });
202
+    }
300
   },
203
   },
301
   setShowKeyword:function(){
204
   setShowKeyword:function(){
302
-    const that=this;
205
+    let that=this;
303
     let content=that.data.Content;
206
     let content=that.data.Content;
304
     let source="highlight",target="nonelight";
207
     let source="highlight",target="nonelight";
305
     if (that.data["IsShowKeyword"]){
208
     if (that.data["IsShowKeyword"]){
@@ -320,7 +223,6 @@ Page({
320
     if (this.data.CurrentQuestionIndex+1<this.data.Content.Question.length){
223
     if (this.data.CurrentQuestionIndex+1<this.data.Content.Question.length){
321
       this.data.CurrentQuestionIndex=this.data.CurrentQuestionIndex+1;
224
       this.data.CurrentQuestionIndex=this.data.CurrentQuestionIndex+1;
322
       this.setData({
225
       this.setData({
323
-        IsShowAnswer:false,
324
         CurrentQuestionIndex:this.data.CurrentQuestionIndex,
226
         CurrentQuestionIndex:this.data.CurrentQuestionIndex,
325
       });
227
       });
326
     }
228
     }
@@ -329,6 +231,7 @@ Page({
329
     this.setData({
231
     this.setData({
330
       CurrentQuestionIndex:e.detail.current,
232
       CurrentQuestionIndex:e.detail.current,
331
     });
233
     });
234
+    console.log(e.detail.current);
332
   },
235
   },
333
 
236
 
334
   onContainerTap: function() {
237
   onContainerTap: function() {
@@ -415,6 +318,21 @@ Page({
415
       }
318
       }
416
     });
319
     });
417
   },
320
   },
321
+  // 处理导航栏返回按钮点击事件
322
+  back: function() {
323
+    if (this.data.IsBuilding) {
324
+      return; // 如果正在生成文章,不执行返回操作
325
+    }
326
+    
327
+    if (!this.data.ID){
328
+      wx.navigateBack({
329
+        delta: 2,
330
+      });
331
+    } else {
332
+      wx.navigateBack();
333
+    }
334
+  },
335
+  
418
   onUnload:function(){
336
   onUnload:function(){
419
     if (!this.data.ID){
337
     if (!this.data.ID){
420
       wx.navigateBack({
338
       wx.navigateBack({

+ 5 - 2
pages/main/article.json

@@ -1,4 +1,7 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "短文",
3
-  "usingComponents": {}
2
+  "navigationBarTitleText": "文章",
3
+  "navigationStyle": "custom",
4
+  "usingComponents": {
5
+    "navigation-bar": "/components/navigation-bar/navigation-bar"
6
+  }
4
 }
7
 }

+ 45 - 20
pages/main/article.wxml

@@ -1,4 +1,12 @@
1
-<view class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;' bindtap="onContainerTap">
1
+<navigation-bar
2
+  title="文章"
3
+  back="{{!IsBuilding}}"
4
+  background="{{ThemeCSS === 'DarkColor' ? '#004433' : '#D0ECD3'}}"
5
+  color="{{ThemeCSS === 'DarkColor' ? '#ffffff' : '#151815'}}"
6
+  extClass="fixed-nav {{ThemeCSS}}"
7
+></navigation-bar>
8
+<!-- 正常文章 -->
9
+<view wx:if="{{!IsBuilding && !IsBuildError}}" class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;' bindtap="onContainerTap">
2
   <view class="panel1 FlexColumn">
10
   <view class="panel1 FlexColumn">
3
     <rich-text class="textArticle" wx:if="{{!IsShowTranslate}}" nodes="{{Content.ArticleEnglishStr}}"></rich-text>
11
     <rich-text class="textArticle" wx:if="{{!IsShowTranslate}}" nodes="{{Content.ArticleEnglishStr}}"></rich-text>
4
     <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
12
     <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
@@ -12,16 +20,16 @@
12
 
20
 
13
   <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
21
   <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
14
     <view class="panelFooter1 FlexRow">
22
     <view class="panelFooter1 FlexRow">
15
-      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="generatePDF">
16
-        <image src="../images/sysIcon_a07.png" class="sysIcon_a03"></image>
17
-        <view class="text02">PDF下载</view>
23
+      <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">
24
+        <image src="../images/sysIcon_a15.png" class="sysIcon_a15"></image>
25
+        <view class="text02">中英对照</view>
18
       </view>
26
       </view>
19
       <view class="panelFooter12 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowQuestion">
27
       <view class="panelFooter12 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowQuestion">
20
         答题
28
         答题
21
       </view>
29
       </view>
22
       <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowSetting">
30
       <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowSetting">
23
         <image src="../images/sysIcon_a08.png" class="sysIcon_a03"></image>
31
         <image src="../images/sysIcon_a08.png" class="sysIcon_a03"></image>
24
-        <view class="text02">设置</view>
32
+        <view class="text02">更多</view>
25
       </view>
33
       </view>
26
     </view>
34
     </view>
27
   </view>
35
   </view>
@@ -41,8 +49,8 @@
41
             </view>
49
             </view>
42
           </view>
50
           </view>
43
           <view class="panelAnswer3 FlexColumn" >
51
           <view class="panelAnswer3 FlexColumn" >
44
-            <view class="panelAnswer31 {{ item.AnswerNumber==indexChild && 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}}">
45
-              <view class="panelAnswer311 {{ item.AnswerNumber==indexChild && IsShowAnswer?'panelAnswer3110':'' }}" wx:if="{{indexChild!=item.UserAnswer}}"></view>
52
+            <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}}">
53
+              <view class="panelAnswer311 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer3110':'' }}" wx:if="{{indexChild!=item.UserAnswer}}"></view>
46
               <view class="panelAnswer311 panelAnswer3110 FlexColumn" wx:if="{{indexChild==item.UserAnswer}}">
54
               <view class="panelAnswer311 panelAnswer3110 FlexColumn" wx:if="{{indexChild==item.UserAnswer}}">
47
                 <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a10.png" class="sysIcon_a10"></image>
55
                 <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a10.png" class="sysIcon_a10"></image>
48
                 <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a11.png" class="sysIcon_a10"></image>
56
                 <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a11.png" class="sysIcon_a10"></image>
@@ -58,7 +66,8 @@
58
     </swiper>    
66
     </swiper>    
59
     <view class="panelLine2"></view>
67
     <view class="panelLine2"></view>
60
     <view class="panelAnswer4 FlexRow">
68
     <view class="panelAnswer4 FlexRow">
61
-      <view class="btn1 FlexRow" catch:tap="showData" data-name="IsShowAnswer"><block wx:if="{{!IsShowAnswer}}">看答案</block><block wx:if="{{IsShowAnswer}}">关答案</block></view>
69
+      <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{!Content.Question[CurrentQuestionIndex].IsShowAnswer}}">看答案</view>
70
+      <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{Content.Question[CurrentQuestionIndex].IsShowAnswer}}">关答案</view>
62
       <view class="btn1  {{ CurrentQuestionIndex+1==Content.Question.length?'btn10':'' }} FlexRow" catch:tap="nextQuestion">下一题</view>
71
       <view class="btn1  {{ CurrentQuestionIndex+1==Content.Question.length?'btn10':'' }} FlexRow" catch:tap="nextQuestion">下一题</view>
63
     </view>
72
     </view>
64
     <view class="btnClose" capture-bind:tap="showData" data-name="IsShowQuestion">隐藏</view>
73
     <view class="btnClose" capture-bind:tap="showData" data-name="IsShowQuestion">隐藏</view>
@@ -66,16 +75,14 @@
66
 
75
 
67
   <!-- 设置 -->
76
   <!-- 设置 -->
68
   <view wx:if="{{IsShowSetting}}" class="panelAnswer FlexColumn">
77
   <view wx:if="{{IsShowSetting}}" class="panelAnswer FlexColumn">
69
-    <view class="text03 text06">阅读设置</view>
70
-    <view class="btn2 FlexRow" catch:tap="showData" data-name="IsShowTranslate">
71
-      <image  wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_b02.png" class="sysIcon_b02"></image>
72
-      <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b03.png" class="sysIcon_b02"></image>
73
-      <view>中英对照</view>
78
+    <view class="text03 text06">更多功能</view>
79
+    <view class="btn2 FlexRow" catch:tap="generatePDF">
80
+      <view>PDF下载</view>
74
     </view>
81
     </view>
75
     <view class="panelAnswer5 FlexColumn">
82
     <view class="panelAnswer5 FlexColumn">
76
       <view class="panelAnswer51 FlexRow">
83
       <view class="panelAnswer51 FlexRow">
77
         <view class="text12">突出关键词</view>
84
         <view class="text12">突出关键词</view>
78
-        <switch class="switchClass" bindchange="showData" checked="true" data-name="IsShowKeyword"/>
85
+        <switch class="switchClass" bindchange="showData" checked="true" data-name="IsShowKeyword" />
79
       </view>
86
       </view>
80
       <view class="text13">用亮色强调用来生成短文的单词</view>
87
       <view class="text13">用亮色强调用来生成短文的单词</view>
81
     </view>
88
     </view>
@@ -83,7 +90,7 @@
83
     <view class="panelAnswer5 FlexColumn">
90
     <view class="panelAnswer5 FlexColumn">
84
       <view class="panelAnswer51 panelAnswer510 FlexRow">
91
       <view class="panelAnswer51 panelAnswer510 FlexRow">
85
         <view class="text12">浅色方案</view>
92
         <view class="text12">浅色方案</view>
86
-        <switch class="switchClass" bindchange="showData"  data-name="IsShowLightColor"/>
93
+        <switch  class="switchClass" bindchange="showData"  data-name="IsShowLightColor"/>
87
       </view>
94
       </view>
88
     </view>
95
     </view>
89
     <view class="btnClose btnClose2 FlexRow" capture-bind:tap="showData" data-name="IsShowSetting">
96
     <view class="btnClose btnClose2 FlexRow" capture-bind:tap="showData" data-name="IsShowSetting">
@@ -93,26 +100,44 @@
93
   </view>
100
   </view>
94
 </view>
101
 </view>
95
 
102
 
103
+<!-- 显示第一次打开帮助 -->
96
 <view wx:if="{{IsShowFirstOpen}}" class="panelHelp container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
104
 <view wx:if="{{IsShowFirstOpen}}" class="panelHelp container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
97
   <view class="panelHelp1">
105
   <view class="panelHelp1">
98
     <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
106
     <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
99
     <view class="panelHelp2 FlexColumn">
107
     <view class="panelHelp2 FlexColumn">
100
-      <text class="text07">上面看短文\n下面做题目,右下角还有调节功能</text>
108
+      <text class="text07">在这里看文章\n点下面做题目,右下角还有PDF</text>
101
       <view class="btn3 FlexColumn" bind:tap="closeHelp">知道了</view>
109
       <view class="btn3 FlexColumn" bind:tap="closeHelp">知道了</view>
102
     </view>
110
     </view>
103
   </view>
111
   </view>
104
 </view>
112
 </view>
105
 
113
 
106
-<view wx:if="{{IsBuilding}}" class="panelBuilding container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
114
+<!-- 显示生成中 -->
115
+<view wx:if="{{IsBuilding}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
116
+</view>
117
+<image wx:if="{{IsBuilding && ThemeCSS=='DarkColor'}}" src="../images/pic_08.png" mode="widthFix"  class="pic_08"></image>
118
+<image wx:if="{{IsBuilding && ThemeCSS=='LightColor'}}" src="../images/pic_09.png" mode="widthFix"  class="pic_08"></image>
119
+<view wx:if="{{IsBuilding}}" class="panelBuilding FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
107
   <view class="panelBuilding1 FlexColumn">
120
   <view class="panelBuilding1 FlexColumn">
108
     <image src="../images/pic_03.png" class="pic_03"></image>
121
     <image src="../images/pic_03.png" class="pic_03"></image>
122
+    <image src="../images/sysIcon_b08.gif" class="sysIcon_b08"></image>
109
     <view class="panelBuilding11 FlexColumn">
123
     <view class="panelBuilding11 FlexColumn">
110
-      <text class="text08">生成中</text>
111
-      <text class="text09">还需要5……10秒左右\n感谢您耐心等待</text>
124
+      <text class="text08" wx:if="{{CountDown>0}}">生成中…{{CountDown}}秒</text>
125
+      <text class="text08" wx:if="{{CountDown==0}}">生成中…差一点,就快好了</text>
126
+      <text class="text09">请眨眨眼,揉揉四白穴、睛明穴、攒竹穴</text>
112
     </view>
127
     </view>
113
     <view class="panelBuilding12 FlexColumn">
128
     <view class="panelBuilding12 FlexColumn">
114
       <text class="text10">Vocabulary:</text>
129
       <text class="text10">Vocabulary:</text>
115
-      <text class="text11">{{Words}}</text>
130
+      <text class="text11">{{WordsStr}}</text>
116
     </view>
131
     </view>
117
   </view>
132
   </view>
133
+</view>
134
+
135
+<!-- 显示生成出错 -->
136
+<view wx:if="{{IsBuildError}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
137
+  <view class="{{ThemeCSS}} panelError FlexColumn">
138
+    <image  wx:if="{{ThemeCSS=='DarkColor'}}"  src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
139
+    <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
140
+    <view class="textError1">抱歉,生成失败</view>
141
+    <view class="textError2">可能网络不畅或使用了不适合的单词</view>
142
+  </view>
118
 </view>
143
 </view>

+ 101 - 16
pages/main/article.wxss

@@ -7,9 +7,28 @@
7
   color:#151815;
7
   color:#151815;
8
 }
8
 }
9
 
9
 
10
+/* 导航栏吸顶样式 */
11
+.fixed-nav {
12
+  position: fixed !important;
13
+  top: 0;
14
+  left: 0;
15
+  right: 0;
16
+  z-index: 1000;
17
+  /* box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1); 添加阴影效果 */
18
+}
19
+
20
+/* 设置不同主题下的返回箭头颜色 */
21
+.DarkColor.fixed-nav .weui-navigation-bar__btn_goback {
22
+  background-color: #C1E1C1 !important; /* 使用与DarkColor主题文字相同的颜色 */
23
+}
24
+
25
+.LightColor.fixed-nav .weui-navigation-bar__btn_goback {
26
+  background-color: #151815 !important; /* 使用与LightColor主题文字相同的颜色 */
27
+}
28
+
10
 .panel1{
29
 .panel1{
11
   width:670rpx;
30
   width:670rpx;
12
-  margin: 50rpx 0 250rpx 0;
31
+  margin: 180rpx 0 250rpx 0; /* 增加上边距,确保内容不会被导航栏遮挡 */
13
   justify-content: flex-start;
32
   justify-content: flex-start;
14
   align-items: flex-start;
33
   align-items: flex-start;
15
 }
34
 }
@@ -118,6 +137,10 @@
118
   height:20rpx;
137
   height:20rpx;
119
 }
138
 }
120
 
139
 
140
+.sysIcon_a15{
141
+  width:28rpx;
142
+  height:20rpx;
143
+}
121
 
144
 
122
 .panelHelp{
145
 .panelHelp{
123
   background-color: rgba(0,0,0,0.00);
146
   background-color: rgba(0,0,0,0.00);
@@ -129,7 +152,7 @@
129
 .panelHelp1{
152
 .panelHelp1{
130
   width: 100%;
153
   width: 100%;
131
   position: fixed;
154
   position: fixed;
132
-  bottom:902rpx;
155
+  bottom:942rpx;
133
 }
156
 }
134
 
157
 
135
 .sysIcon_b07{
158
 .sysIcon_b07{
@@ -160,17 +183,60 @@
160
   margin-top: 50rpx;
183
   margin-top: 50rpx;
161
 }
184
 }
162
 
185
 
186
+
187
+.pic_08{
188
+  width: 100%;
189
+  position: fixed;
190
+  top:200rpx;
191
+}
192
+
163
 .panelBuilding{
193
 .panelBuilding{
164
-  background-image: linear-gradient(180deg, rgba(0,68,51,0.70) 0%, rgba(0,20,15,0.90) 100%);
165
   z-index: 20;
194
   z-index: 20;
166
   position: fixed;
195
   position: fixed;
167
   top:0;
196
   top:0;
197
+  width:100%;
198
+  justify-content: flex-start;
199
+  font-weight: 700;
200
+}
201
+
202
+.DarkColor .panelBuilding{
203
+  background-image: linear-gradient(180deg, rgba(0,68,51,0.70) 0%, rgba(0,20,15,0.60) 100%);
204
+}
205
+.LightColor .panelBuilding{
206
+  background-image: linear-gradient(180deg, rgba(208,236,211,0.50) 0%, rgba(159,180,161,0.70) 100%);
207
+}
208
+
209
+.panelError{
210
+  margin-top: 560rpx;
211
+  font-size: 28rpx;
212
+}
213
+
214
+.DarkColor .panelError{
215
+  color: #C1E1C1;
216
+}
217
+
218
+.LightColor .panelError{
219
+  color: #5A7D5A;
220
+}
221
+
222
+.sysIcon_b14{
223
+  width:102rpx;
224
+  height:52rpx;
225
+  margin-bottom: 50rpx;
226
+}
227
+.textError2{
228
+  font-weight: 400;
229
+  font-size: 24rpx;
230
+  margin-top: 10rpx;
168
 }
231
 }
169
 
232
 
233
+
234
+
235
+
170
 .panelBuilding1{
236
 .panelBuilding1{
171
   width: 100%;
237
   width: 100%;
172
   position: fixed;
238
   position: fixed;
173
-  top:145rpx;
239
+  top:345rpx;
174
 }
240
 }
175
 
241
 
176
 .pic_03{
242
 .pic_03{
@@ -179,6 +245,13 @@
179
   position: absolute;
245
   position: absolute;
180
   top:0;
246
   top:0;
181
 }
247
 }
248
+.sysIcon_b08{
249
+  width:220rpx;
250
+  height:220rpx;
251
+  position: absolute;
252
+  top:337rpx;
253
+  z-index: 25;
254
+}
182
 
255
 
183
 .panelBuilding11{
256
 .panelBuilding11{
184
   position: absolute;
257
   position: absolute;
@@ -193,6 +266,7 @@
193
   font-size: 28rpx;
266
   font-size: 28rpx;
194
   text-align: center;
267
   text-align: center;
195
   margin-top: 20rpx;
268
   margin-top: 20rpx;
269
+  font-weight: 400;
196
 }
270
 }
197
 
271
 
198
 .panelBuilding12{
272
 .panelBuilding12{
@@ -210,7 +284,7 @@
210
   text-align: center;
284
   text-align: center;
211
   margin-top: 10rpx;
285
   margin-top: 10rpx;
212
   font-weight: 400;
286
   font-weight: 400;
213
-  width: 580rpx;
287
+  width: 640rpx;
214
 }
288
 }
215
 
289
 
216
 .panelAnswer{
290
 .panelAnswer{
@@ -240,7 +314,7 @@
240
 
314
 
241
 .DarkColor .text03{
315
 .DarkColor .text03{
242
   background: #1E1E1E;
316
   background: #1E1E1E;
243
-  color: #C1E1C1;
317
+  color: #f2f2f2;
244
 }
318
 }
245
 
319
 
246
 .LightColor .text03{
320
 .LightColor .text03{
@@ -285,8 +359,7 @@
285
 
359
 
286
 .DarkColor .panelAnswer1{
360
 .DarkColor .panelAnswer1{
287
   background-color: #1e1e1e;
361
   background-color: #1e1e1e;
288
-  /* background-image: linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.30) 100%); */
289
-}
362
+ }
290
 .LightColor .panelAnswer1{
363
 .LightColor .panelAnswer1{
291
   background-color: #FFFFFF;
364
   background-color: #FFFFFF;
292
 }
365
 }
@@ -464,12 +537,6 @@
464
   color:#2E2E2E;
537
   color:#2E2E2E;
465
 }
538
 }
466
 
539
 
467
-.sysIcon_b02{
468
-  width:38rpx;
469
-  height:28rpx;
470
-  margin-right: 20rpx;
471
-}
472
-
473
 .panelAnswer5{
540
 .panelAnswer5{
474
   width:100%;
541
   width:100%;
475
 }
542
 }
@@ -494,6 +561,7 @@
494
 .text13{
561
 .text13{
495
   width: 670rpx;
562
   width: 670rpx;
496
   font-size: 24rpx;
563
   font-size: 24rpx;
564
+  font-weight: 400;
497
   margin-bottom: 30rpx;
565
   margin-bottom: 30rpx;
498
 }
566
 }
499
 
567
 
@@ -507,7 +575,7 @@
507
 .panelLine3{
575
 .panelLine3{
508
   width:670rpx;
576
   width:670rpx;
509
   height:1rpx;
577
   height:1rpx;
510
-  background-color: #787878;
578
+  background-color: #131313;
511
 }
579
 }
512
 .panelAnswer510{
580
 .panelAnswer510{
513
   margin-bottom: 100rpx;
581
   margin-bottom: 100rpx;
@@ -516,6 +584,23 @@
516
   margin-right: 40rpx;
584
   margin-right: 40rpx;
517
 }
585
 }
518
 
586
 
587
+/* 自定义switch样式 */
588
+/* 修改switch关闭时的背景颜色 */
589
+.DarkColor .wx-switch-input {
590
+  background-color: #D2D2D2 !important; /* 深色主题下关闭时的颜色 */
591
+}
592
+
593
+.LightColor .wx-switch-input {
594
+  background-color: #D2D2D2 !important; /* 浅色主题下关闭时的颜色 */
595
+}
596
+
597
+/* 修改switch选中时的颜色 */
598
+.wx-switch-input.wx-switch-input-checked {
599
+  border-color: #4aa010 !important;
600
+  background-color: #4aa010 !important;
601
+}
602
+
603
+
519
 .wx-swiper-dot {
604
 .wx-swiper-dot {
520
   width: 14rpx !important;
605
   width: 14rpx !important;
521
   height: 14rpx !important;
606
   height: 14rpx !important;
@@ -544,4 +629,4 @@
544
   position: absolute;
629
   position: absolute;
545
   right: -20rpx !important;
630
   right: -20rpx !important;
546
   left: unset !important;
631
   left: unset !important;
547
-}
632
+}

+ 1 - 1
pages/main/help.js

@@ -7,7 +7,7 @@ Page({
7
   data: {
7
   data: {
8
   },
8
   },
9
   onLoad: function (options) {
9
   onLoad: function (options) {
10
-    var that = this;
10
+    let that = this;
11
     that.setData({
11
     that.setData({
12
       Containnerheight: main.getWindowHeight(),
12
       Containnerheight: main.getWindowHeight(),
13
     });
13
     });

+ 1 - 1
pages/main/help.wxml

@@ -1,4 +1,4 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' bindtap="onContainerTap">
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' bindtap="onContainerTap">
2
-  <image mode="widthFix" src="../images/pic_h0{{item}}.png" class="pic_h04" wx:for="{{[4,5,6,7,8]}}" wx:key="index"></image>
2
+  <image mode="widthFix" src="../images/pic_h{{item}}.png" class="pic_h04" wx:for='{{["04","05","06","07","08","09","10","11"]}}' wx:key="index"></image>
3
         
3
         
4
 </view>
4
 </view>

+ 30 - 1
pages/main/index.js

@@ -5,21 +5,50 @@ const app = getApp();
5
 
5
 
6
 Page({
6
 Page({
7
   data: {
7
   data: {
8
+    IsShowRemind:false,
8
   },
9
   },
9
   onLoad: function (options) {
10
   onLoad: function (options) {
10
-    var that = this;
11
+    let that = this;
11
     that.setData({
12
     that.setData({
12
       Containnerheight: main.getWindowHeight(),
13
       Containnerheight: main.getWindowHeight(),
13
       Version:app.globalData.Version,
14
       Version:app.globalData.Version,
14
     });
15
     });
15
   },
16
   },
17
+  onShow:function(){
18
+    this.getData();
19
+  },
16
   goto: function (e) {
20
   goto: function (e) {
17
     let that=this;
21
     let that=this;
18
     var url=e.currentTarget.dataset.url;
22
     var url=e.currentTarget.dataset.url;
23
+    if (url=="wordsinput"){
24
+      if (that.data.TodayCount>that.data.MaxCount){
25
+        this.setData({
26
+          IsShowRemind:true,
27
+        });
28
+        return ;
29
+      }
30
+    }
19
     wx.navigateTo({
31
     wx.navigateTo({
20
       url: url,
32
       url: url,
21
     });
33
     });
22
   },
34
   },
35
+  getData:function(){
36
+    let that=this;
37
+    main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+'&IsTodayCount=1', function (data) {
38
+      if (data) {
39
+        that.setData({
40
+          TodayCount:data.TodayCount,
41
+          MaxCount:data.MaxCount,
42
+          IsShowRemind:false,
43
+        });
44
+      }
45
+    });
46
+  },
47
+  showRemind:function(){
48
+    this.setData({
49
+      IsShowRemind:!this.data.IsShowRemind,
50
+    });
51
+  },
23
   onShareAppMessage: function () {
52
   onShareAppMessage: function () {
24
     return {
53
     return {
25
       title: app.globalData.ShareTitle,
54
       title: app.globalData.ShareTitle,

+ 19 - 0
pages/main/index.wxml

@@ -29,4 +29,23 @@
29
     <image src="../images/pic_02.png" class="pic_02"></image>
29
     <image src="../images/pic_02.png" class="pic_02"></image>
30
     <view class="text03">©2025 秒过语境背单词 {{Version}}</view>
30
     <view class="text03">©2025 秒过语境背单词 {{Version}}</view>
31
   </view>
31
   </view>
32
+</view>
33
+
34
+<view wx:if="{{IsShowRemind}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
35
+  <view class="panelRemind FlexColumn">
36
+    <image src="../images/sysIcon_b10.png" class="sysIcon_b10"></image>
37
+      
38
+    <view class="panelRemind1 FlexRow">
39
+      <image src="../images/sysIcon_b09.png" class="sysIcon_b09"></image>
40
+      <view>次数上限</view>
41
+    </view>
42
+    <view class="panelRemind2 FlexColumn">
43
+      <view class="textRemind FlexColumn">
44
+        <text>很抱歉,您今日的生成次数已达到上限。请您明日再次使用,我们将继续为您提供服务。</text>
45
+        <text style="margin-top: 20rpx;">每天可生成文章{{MaxCount}}次。感谢您的支持。</text>
46
+      </view>
47
+      <view class="btnReind1 FlexColumn" catch:tap="showRemind">知道了</view>
48
+      <view class="btnReind2 FlexColumn" catch:tap="goto" data-url="myarticles">去我的文库看看</view>
49
+    </view>
50
+  </view>
32
 </view>
51
 </view>

+ 70 - 0
pages/main/index.wxss

@@ -91,4 +91,74 @@
91
   left:50rpx;
91
   left:50rpx;
92
   font-size: 20rpx;
92
   font-size: 20rpx;
93
   color: #544641;
93
   color: #544641;
94
+}
95
+
96
+
97
+.panelMenu{
98
+  background-color: rgba(26,67,51,0.50);
99
+  z-index: 20;
100
+  position: fixed;
101
+  top:0;
102
+}
103
+.panelRemind{
104
+  width: 690rpx;
105
+  margin-bottom: 75rpx;
106
+  position: fixed;
107
+  bottom: 0;
108
+  background: #CA4B15;
109
+  box-shadow: 0 20rpx 0 0 #8E3F1D, 0 50rpx 0 0 rgba(0,0,0,0.50);
110
+  border-radius: 60rpx;
111
+  background-image: radial-gradient(circle at 53% 50%, #85261E 0%, rgba(178,71,62,0.00) 50%);
112
+}
113
+.sysIcon_b10{
114
+  width: 360rpx;
115
+  height:140rpx;
116
+  position: absolute;
117
+  right:0;
118
+  top:-20rpx;
119
+}
120
+.panelRemind1{
121
+  width: 100%;
122
+  justify-content: flex-start;
123
+  margin-top: 40rpx;
124
+  font-size: 36rpx;
125
+  color: #FFFFFF;
126
+  z-index: 25rpx;
127
+}
128
+.sysIcon_b09{
129
+  width: 50rpx;
130
+  height:50rpx;
131
+  margin: 0 20rpx 0 50rpx ;
132
+}
133
+.panelRemind2{
134
+  width: 650rpx;
135
+  min-height:220rpx;
136
+  background: #FFFFFF;
137
+  color: #2E2E2E;
138
+  border-radius: 40rpx;
139
+  margin: 30rpx 0;
140
+  justify-content: flex-start;
141
+}
142
+.textRemind{
143
+  width:570rpx;
144
+  font-weight: 400;
145
+  font-size: 28rpx;
146
+  align-items: flex-start;
147
+  margin-top: 80rpx;
148
+}
149
+.btnReind1{
150
+  width:590rpx;
151
+  height:90rpx;
152
+  background: #F0F0F0;
153
+  border-radius: 20rpx;
154
+  font-size: 36rpx;
155
+  margin-top: 60rpx;
156
+}
157
+
158
+.btnReind2{
159
+  width:590rpx;
160
+  height:70rpx;
161
+  background: #fff;
162
+  font-size: 28rpx;
163
+  margin: 30rpx 0 40rpx 0;
94
 }
164
 }

+ 26 - 27
pages/main/myarticles.js

@@ -5,6 +5,7 @@ const app = getApp();
5
 
5
 
6
 Page({
6
 Page({
7
   data: {
7
   data: {
8
+    IsShowRemind:false,
8
   },
9
   },
9
   onLoad: function (options) {
10
   onLoad: function (options) {
10
     let that = this;
11
     let that = this;
@@ -14,12 +15,12 @@ Page({
14
     that.getData();
15
     that.getData();
15
   },
16
   },
16
   getData:function(){
17
   getData:function(){
17
-    const that=this;
18
+    let that=this;
18
     main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID, function (data) {
19
     main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID, function (data) {
19
       if (data) {
20
       if (data) {
20
         for(let i=0;i<data.length;i++){
21
         for(let i=0;i<data.length;i++){
21
             let item=data[i];
22
             let item=data[i];
22
-            item.WordsStr=item.Words.split(",").join(" ");
23
+            item.WordsStr=item.Words.split(",").join(" ");
23
         }
24
         }
24
         that.setData({
25
         that.setData({
25
           List:data,
26
           List:data,
@@ -35,35 +36,33 @@ Page({
35
     });
36
     });
36
   },
37
   },
37
   setClipboard:function(e){
38
   setClipboard:function(e){
38
-    wx.setClipboardData({
39
-      data: e.currentTarget.dataset.words,
40
-      success (res) {
41
-        wx.getClipboardData({
42
-          success (res) {
43
-            app.globalData.SelectedWords=res.data.split(",");
44
-          }
45
-        });
46
-      }
47
-    });
39
+    let words=e.currentTarget.dataset.words;
40
+    app.globalData.SelectedWords=words.split(",");
41
+    wx.redirectTo({
42
+      url: 'wordsinput',
43
+    })
48
   },
44
   },
49
   deleteArticle:function(e){
45
   deleteArticle:function(e){
50
-    const that=this;
51
-    const id=e.currentTarget.dataset.id;
52
-    wx.showModal({
53
-      title: '删除',
54
-      content: '确认删除这篇文章吗?',
55
-      complete: (res) => {
56
-        if (res.confirm) {
57
-          main.getData('DeleteYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+"&ID="+id, function (data) {
58
-             wx.showToast({
59
-               title: '删除完成',
60
-             });
61
-             that.getData();
62
-          });
63
-        }
64
-      }
46
+    this.setData({
47
+      IsShowRemind:true,
48
+      ID:e.currentTarget.dataset.id
65
     });
49
     });
66
   },
50
   },
51
+  showRemind:function(e){
52
+    let that=this;
53
+    const confirm=e.currentTarget.dataset.confirm;
54
+    this.setData({
55
+      IsShowRemind:!this.data.IsShowRemind,
56
+    });
57
+    if (confirm=="1") {
58
+      main.getData('DeleteYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+"&ID="+that.data.ID, function (data) {
59
+         wx.showToast({
60
+           title: '删除完成',
61
+         });
62
+         that.getData();
63
+      });
64
+    }
65
+  },
67
   onShareAppMessage: function () {
66
   onShareAppMessage: function () {
68
     return {
67
     return {
69
       title: app.globalData.ShareTitle,
68
       title: app.globalData.ShareTitle,

+ 22 - 1
pages/main/myarticles.wxml

@@ -22,7 +22,7 @@
22
       </view>
22
       </view>
23
       
23
       
24
       <view class="panelBtn FlexRow">
24
       <view class="panelBtn FlexRow">
25
-        <view class="btn1" bind:tap="setClipboard" data-words="{{item.Words}}">复用单词</view>
25
+        <view class="btn1" bind:tap="setClipboard" data-words="{{item.Words}}">重新生成</view>
26
         <image src="../images/sysIcon_a13.png" class="sysIcon_a13"></image>
26
         <image src="../images/sysIcon_a13.png" class="sysIcon_a13"></image>
27
         <view class="btn2 FlexRow" bind:tap="deleteArticle" data-id="{{item.ID}}">
27
         <view class="btn2 FlexRow" bind:tap="deleteArticle" data-id="{{item.ID}}">
28
           <image src="../images/sysIcon_a14.png" class="sysIcon_a14"></image>
28
           <image src="../images/sysIcon_a14.png" class="sysIcon_a14"></image>
@@ -31,4 +31,25 @@
31
     </view>
31
     </view>
32
   </block>
32
   </block>
33
   <view style="height: 100rpx;"></view>
33
   <view style="height: 100rpx;"></view>
34
+</view>
35
+
36
+
37
+<view wx:if="{{IsShowRemind}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
38
+  <view class="panelRemind FlexColumn">
39
+    <image src="../images/sysIcon_b13.png" class="sysIcon_b10"></image>
40
+      
41
+    <view class="panelRemind1 FlexRow">
42
+      <image src="../images/sysIcon_b12.png" class="sysIcon_b09"></image>
43
+      <view>删除文章</view>
44
+    </view>
45
+    <view class="panelRemind2 FlexColumn">
46
+      <view class="textRemind FlexColumn">
47
+        <text>确定删除这篇文章吗?删除后无法恢复。</text>
48
+      </view>
49
+      <view class="panelRemind21 FlexColumn">
50
+        <view class="btnReind1 FlexColumn" catch:tap="showRemind" data-confirm="1">删除</view>
51
+        <view class="btnReind1 btnReind2 FlexColumn" catch:tap="showRemind" data-confirm="0">取消</view>
52
+      </view>
53
+    </view>
54
+  </view>
34
 </view>
55
 </view>

+ 71 - 2
pages/main/myarticles.wxss

@@ -50,7 +50,6 @@
50
 }
50
 }
51
 .panel12{
51
 .panel12{
52
   width: 670rpx;
52
   width: 670rpx;
53
-  height:90rpx;
54
   background: #002F24;
53
   background: #002F24;
55
   border-radius: 10rpx;
54
   border-radius: 10rpx;
56
   margin: 0 0 20rpx 0;
55
   margin: 0 0 20rpx 0;
@@ -90,4 +89,74 @@
90
 .sysIcon_a14{
89
 .sysIcon_a14{
91
   width: 20rpx;
90
   width: 20rpx;
92
   height:22rpx;
91
   height:22rpx;
93
-}
92
+}
93
+
94
+
95
+.panelMenu{
96
+  background-color: rgba(26,67,51,0.50);
97
+  z-index: 20;
98
+  position: fixed;
99
+  top:0;
100
+}
101
+.panelRemind{
102
+  width: 690rpx;
103
+  margin-bottom: 75rpx;
104
+  position: fixed;
105
+  bottom: 0;
106
+
107
+  background: #FFA70C;
108
+  box-shadow: 0 20rpx 0 0 #CB8409, 0 50rpx 0 0 rgba(0,0,0,0.50);
109
+  border-radius: 60rpx;
110
+  background-image: radial-gradient(circle at 53% 50%, #85261E 0%, rgba(178,71,62,0.00) 50%);
111
+}
112
+.sysIcon_b10{
113
+  width: 360rpx;
114
+  height:140rpx;
115
+  position: absolute;
116
+  right:0;
117
+  top:-20rpx;
118
+}
119
+.panelRemind1{
120
+  width: 100%;
121
+  justify-content: flex-start;
122
+  margin-top: 40rpx;
123
+  font-size: 36rpx;
124
+  color: #FFFFFF;
125
+  z-index: 25rpx;
126
+}
127
+.sysIcon_b09{
128
+  width: 50rpx;
129
+  height:50rpx;
130
+  margin: 0 20rpx 0 50rpx ;
131
+}
132
+.panelRemind2{
133
+  width: 650rpx;
134
+  min-height:220rpx;
135
+  background: #FFFFFF;
136
+  color: #2E2E2E;
137
+  border-radius: 40rpx;
138
+  margin: 30rpx 0;
139
+  justify-content: flex-start;
140
+}
141
+.textRemind{
142
+  width:570rpx;
143
+  font-weight: 400;
144
+  font-size: 28rpx;
145
+  align-items: flex-start;
146
+  margin-top: 80rpx;
147
+}
148
+.panelRemind21{
149
+  width:100%;
150
+  margin: 60rpx 0 0 0;
151
+}
152
+.btnReind1{
153
+  width:580rpx;
154
+  height:90rpx;
155
+  background: #F0F0F0;
156
+  border-radius: 20rpx;
157
+  font-size: 36rpx;
158
+}
159
+
160
+.btnReind2{
161
+  margin: 30rpx 0 40rpx 0;
162
+}

+ 61 - 26
pages/main/ocr.js

@@ -6,12 +6,15 @@ const app = getApp();
6
 Page({
6
 Page({
7
   data: {
7
   data: {
8
     Menu:[],
8
     Menu:[],
9
+    cameraActive: true,
9
   },
10
   },
10
   onLoad: function (options) {
11
   onLoad: function (options) {
12
+    app.globalData.OCRWords=[];
11
   },
13
   },
12
   onShow:function(){
14
   onShow:function(){
13
-    var that = this;
15
+    let that = this;
14
     that.setData({
16
     that.setData({
17
+      cameraActive: true,
15
       Menu:[{Name:"相册",CSS:"",Fun:"chooseImage"},{Name:"拍照",CSS:"Selected",Fun:"retake"}]
18
       Menu:[{Name:"相册",CSS:"",Fun:"chooseImage"},{Name:"拍照",CSS:"Selected",Fun:"retake"}]
16
     });
19
     });
17
   },
20
   },
@@ -20,6 +23,7 @@ Page({
20
     this.data.Menu[1].CSS="Selected";
23
     this.data.Menu[1].CSS="Selected";
21
     this.setData({
24
     this.setData({
22
       Menu:this.data.Menu,
25
       Menu:this.data.Menu,
26
+      cameraActive: true,
23
     });
27
     });
24
   },
28
   },
25
   // 拍照识别
29
   // 拍照识别
@@ -31,12 +35,12 @@ Page({
31
         this.setData({
35
         this.setData({
32
           imageUrl: res.tempImagePath,
36
           imageUrl: res.tempImagePath,
33
           cameraActive: false,
37
           cameraActive: false,
34
-          showCanvas: true
35
         })
38
         })
36
         this.performOCR(res.tempImagePath)
39
         this.performOCR(res.tempImagePath)
37
       },
40
       },
38
       fail: (err) => {
41
       fail: (err) => {
39
         console.error('拍照失败:', err)
42
         console.error('拍照失败:', err)
43
+
40
         wx.showToast({
44
         wx.showToast({
41
           title: '拍照失败,请重试',
45
           title: '拍照失败,请重试',
42
           icon: 'none'
46
           icon: 'none'
@@ -49,6 +53,7 @@ Page({
49
     this.data.Menu[1].CSS="";
53
     this.data.Menu[1].CSS="";
50
     this.setData({
54
     this.setData({
51
       Menu:this.data.Menu,
55
       Menu:this.data.Menu,
56
+      cameraActive: false,
52
     });
57
     });
53
 
58
 
54
     wx.chooseMedia({
59
     wx.chooseMedia({
@@ -59,8 +64,6 @@ Page({
59
         const tempFilePath = res.tempFiles[0].tempFilePath
64
         const tempFilePath = res.tempFiles[0].tempFilePath
60
         this.setData({
65
         this.setData({
61
           imageUrl: tempFilePath,
66
           imageUrl: tempFilePath,
62
-          cameraActive: false,
63
-          showCanvas: true
64
         })
67
         })
65
         this.performOCR(tempFilePath)
68
         this.performOCR(tempFilePath)
66
       },
69
       },
@@ -75,6 +78,7 @@ Page({
75
   },
78
   },
76
   // 加强版的OCR识别方法
79
   // 加强版的OCR识别方法
77
   async performOCR(imagePath) {
80
   async performOCR(imagePath) {
81
+    let that=this;
78
     if (!imagePath) {
82
     if (!imagePath) {
79
       console.error('图片路径无效')
83
       console.error('图片路径无效')
80
     }
84
     }
@@ -143,19 +147,24 @@ Page({
143
       // 6.提取英文单词
147
       // 6.提取英文单词
144
       const engTexts=this.extractEnglishWords(texts);
148
       const engTexts=this.extractEnglishWords(texts);
145
 
149
 
146
-      let arr=[];
147
-      for(var i=0;i<engTexts.length;i++){
148
-        let obj={};
149
-        obj.Word=engTexts[i];
150
-        obj.Selected=0;
151
-        arr.push(obj);
152
-      }
153
-
150
+      // let arr=[];
151
+      // for(var i=0;i<engTexts.length;i++){
152
+      //   let obj={};
153
+      //   obj.Word=engTexts[i];
154
+      //   obj.Selected=0;
155
+      //   arr.push(obj);
156
+      // }
154
       app.globalData.OCRWords=engTexts;
157
       app.globalData.OCRWords=engTexts;
155
-      wx.navigateTo({
158
+      //debugger;
159
+      
160
+      wx.redirectTo({
156
         url: "./selectword",
161
         url: "./selectword",
157
       });
162
       });
158
 
163
 
164
+      that.setData({
165
+        cameraActive: true,
166
+      })
167
+
159
     } catch (err) {
168
     } catch (err) {
160
       console.error('OCR处理失败:', err)
169
       console.error('OCR处理失败:', err)
161
       wx.showToast({
170
       wx.showToast({
@@ -164,7 +173,10 @@ Page({
164
         duration: 3000
173
         duration: 3000
165
       })
174
       })
166
     } finally {
175
     } finally {
167
-      wx.hideLoading()
176
+      wx.hideLoading();
177
+      that.setData({
178
+        cameraActive: true,
179
+      })
168
     }
180
     }
169
   },
181
   },
170
 
182
 
@@ -193,34 +205,57 @@ Page({
193
   extractEnglishWords(texts) {
205
   extractEnglishWords(texts) {
194
     console.group('英语单词提取');
206
     console.group('英语单词提取');
195
     const words = new Set();
207
     const words = new Set();
196
-    
208
+
197
     texts.forEach(item => {
209
     texts.forEach(item => {
198
       const text = item.text;
210
       const text = item.text;
199
       console.log('处理文本:', text);
211
       console.log('处理文本:', text);
200
       
212
       
201
-      // 改进的正则表达式,能更好处理中英文混合文本
202
-      const wordRegex = /(?:^|\s|[\u4e00-\u9fa5])([A-Za-z]{2,}(?:['’-][A-Za-z]+)*)(?=$|\s|[\u4e00-\u9fa5])/g;
213
+      // 使用多种分隔符分割文本(空格、逗号、句号、感叹号、中文字符等)
214
+      // 这个正则表达式会匹配任何非英文字母、撇号或连字符的字符作为分隔符
215
+      const parts = text.split(/[^A-Za-z''-]+/).filter(Boolean);
216
+      
217
+      console.log('分割后的部分:', parts);
203
       
218
       
204
-      let match;
205
-      while ((match = wordRegex.exec(text)) !== null) {
206
-        const word = match[1];
207
-        console.log('匹配到单词:', word);
219
+      // 处理每个可能的单词
220
+      parts.forEach(part => {
221
+        // 清理并验证单词
222
+        const cleanWord = this.cleanWord(part);
208
         
223
         
209
-        // 验证单词有效性
210
-        if (/^[A-Za-z'’-]+$/.test(word)) {
211
-          const lowerWord = word.toLowerCase();
224
+        // 特殊处理单词"I"
225
+        if (cleanWord === 'I' || cleanWord === 'a') {
226
+          words.add(cleanWord); // 添加小写的"i"
227
+          console.log('添加单词: I (特殊处理)');
228
+        }
229
+        // 处理其他单词(长度>=2)
230
+        else if (cleanWord && cleanWord.length >= 2 && /^[A-Za-z''-]+$/.test(cleanWord)) {
231
+          let lowerWord = cleanWord.toLowerCase();
232
+          if (lowerWord=="i'm"){
233
+            lowerWord="I'm";
234
+          }
212
           words.add(lowerWord);
235
           words.add(lowerWord);
213
           console.log('添加单词:', lowerWord);
236
           console.log('添加单词:', lowerWord);
214
         }
237
         }
215
-      }
238
+      });
216
     });
239
     });
217
     
240
     
218
     //const result = Array.from(words).sort();
241
     //const result = Array.from(words).sort();
219
-    const result=Array.from(words);
242
+    let result = Array.from(words);
243
+    result = common.removeDuplicateAndTrimStrings(result);
220
     console.log('提取结果:', result);
244
     console.log('提取结果:', result);
221
     console.groupEnd();
245
     console.groupEnd();
222
     return result;
246
     return result;
223
   },
247
   },
248
+  
249
+  // 清理单词,去除非字母字符
250
+  cleanWord(word) {
251
+    if (!word) return '';
252
+    
253
+    // 去除单词前后的非字母字符
254
+    const cleaned = word.replace(/^[^A-Za-z]+|[^A-Za-z]+$/g, '');
255
+    
256
+    // 保留单词中间的撇号和连字符
257
+    return cleaned.replace(/[^A-Za-z''-]/g, '');
258
+  },
224
 
259
 
225
   onShareAppMessage: function () {
260
   onShareAppMessage: function () {
226
     return {
261
     return {

+ 1 - 1
pages/main/ocr.wxml

@@ -1,5 +1,5 @@
1
 <view class="container FlexColumn">
1
 <view class="container FlexColumn">
2
-  <view class="camera-container">
2
+  <view class="camera-container" wx:if="{{cameraActive}}">
3
     <camera device-position="back" flash="auto" class="camera"></camera>
3
     <camera device-position="back" flash="auto" class="camera"></camera>
4
     <view class="btnCamera FlexColumn" bindtap="takePhoto">
4
     <view class="btnCamera FlexColumn" bindtap="takePhoto">
5
       <image src="../images/sysIcon_b05.png" class="sysIcon_b05"></image>
5
       <image src="../images/sysIcon_b05.png" class="sysIcon_b05"></image>

+ 80 - 19
pages/main/paste.js

@@ -4,39 +4,41 @@ import main from '../../utils/main';
4
 const COUNT_MAX=10;
4
 const COUNT_MAX=10;
5
 const app = getApp();
5
 const app = getApp();
6
 
6
 
7
+let EntryWords="";//进来的单词,用于返回恢复
8
+let IsEdit=false;  //是否编辑过,编辑过不恢复
9
+
7
 Page({
10
 Page({
8
   data: {
11
   data: {
9
     Words:"",
12
     Words:"",
13
+    importWordStr:"",//输入过的单词
14
+    inputThreshold: 100, // 时间阈值,单位毫秒,可根据实际情况调整
10
   },
15
   },
11
   onLoad: function (options) {
16
   onLoad: function (options) {
12
     let that = this;
17
     let that = this;
18
+    EntryWords=app.globalData.SelectedWords;
13
     let words=app.globalData.SelectedWords.join("\n");
19
     let words=app.globalData.SelectedWords.join("\n");
14
     that.setData({
20
     that.setData({
15
       Containnerheight: main.getWindowHeight(),
21
       Containnerheight: main.getWindowHeight(),
16
       Words:words, 
22
       Words:words, 
17
     });
23
     });
18
-    that.handlePaste();
19
   },
24
   },
25
+  
26
+  
20
   handlePaste: function(e) {
27
   handlePaste: function(e) {
21
     let that = this;
28
     let that = this;
22
     // 获取剪贴板内容
29
     // 获取剪贴板内容
23
     wx.getClipboardData({
30
     wx.getClipboardData({
24
       success: function(res) {
31
       success: function(res) {
25
-        // res.data 包含剪贴板的内容
26
-        let pasteData = res.data;
27
-        
28
-        // 这里可以处理粘贴的数据,比如按空格分割成单词
29
-        let words = pasteData.split(/[\r\n]+/);  // 按空格分割
30
-        
31
-        // 过滤掉空字符串和非单词内容
32
-        words = common.filterWordsWithSpecialChars(words);
33
-        //debugger;
34
         let str="";
32
         let str="";
35
         if (that.data.Words)
33
         if (that.data.Words)
36
           str+=that.data.Words+"\n";
34
           str+=that.data.Words+"\n";
37
-        str+=words.join("\n");
35
+        str+=that.setWordsArr(res.data).join("\n");
36
+        
37
+        // let arr=that.setWordsArr(str);
38
+        // str=arr.join("\n");
38
         that.setData({
39
         that.setData({
39
           Words: str,
40
           Words: str,
41
+          importWordStr:str,
40
         });
42
         });
41
       },
43
       },
42
       fail: function(err) {
44
       fail: function(err) {
@@ -45,24 +47,82 @@ Page({
45
     });
47
     });
46
   },
48
   },
47
   bindKeyInput:function(e){
49
   bindKeyInput:function(e){
48
-    let words=e.detail.value;
49
-    if (typeof words === 'string' && words.indexOf(",")>0)
50
-      words = words.split(",").join("\n");
50
+    let that=this;
51
+    let words = e.detail.value;
52
+    let currentTime = new Date().getTime();
53
+    let timeDiff = currentTime - this.data.lastInputTime;
54
+
55
+    if (timeDiff > this.data.inputThreshold && words.length>that.data.Words.length+2) {
56
+        console.log("可能是粘贴操作");
57
+        let str=that.data.importWordStr;
58
+        let str2=words.substring(str.length);
59
+        str+="\n"+str2;
60
+        let arr=that.setWordsArr(str);
61
+        words=arr.join("\n");
62
+    } else {
63
+        console.log("可能是键盘输入");
64
+    }
65
+
51
     this.setData({
66
     this.setData({
52
-      Words:words, 
67
+        Words: words,
68
+        importWordStr:words,
69
+        lastInputTime: currentTime
53
     });
70
     });
71
+    IsEdit=true;
72
+  },
73
+  onUnload:function(e){
74
+    if (!IsEdit){
75
+      app.globalData.SelectedWords=EntryWords;
76
+    }
77
+  },
78
+  
79
+  showExample:function(){
80
+    this.setData({
81
+      IsShowExample:!this.data.IsShowExample,
82
+    });
83
+  },
84
+  setWordsArr:function(data){
85
+    let that=this;
86
+    // 这里可以处理粘贴的数据,比如按空格分割成单词
87
+    let words = data.split(/[\r\n]+/);  // 按换行分割
88
+    let words2 = data.split(" ");  // 按空格分割
89
+    //debugger;
90
+    if (words2.length>20 || words2.length>words.length)
91
+      words=words2;
92
+    else if (typeof data === 'string' && data.indexOf(",")>0)
93
+      words = data.split(",");
94
+    // 过滤掉空字符串和非单词内容
95
+    words = common.filterWordsWithSpecialChars(words);
96
+    words = common.removeDuplicateAndTrimStrings(words);
97
+    //debugger;
98
+    let arr2=[];
99
+    if (words.length>10){
100
+      for(let i=0;i<10;i++)
101
+        arr2.push(words[i]);
102
+        words=arr2;
103
+    }
104
+    return words;
54
   },
105
   },
55
   submit:function(){
106
   submit:function(){
56
-    app.globalData.SelectedWords=this.data.Words.split("\n");
57
-    app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
107
+    if (IsEdit){
108
+      let words=this.setWordsArr(this.data.Words);
109
+      app.globalData.SelectedWords=words;
110
+    }
58
     wx.navigateBack({
111
     wx.navigateBack({
59
       delta: 1
112
       delta: 1
60
     });
113
     });
61
   },
114
   },
62
-  showExample:function(){
115
+  clearInput:function(){
116
+    app.globalData.SelectedWords=[];
63
     this.setData({
117
     this.setData({
64
-      IsShowExample:!this.data.IsShowExample,
118
+      Words:"", 
65
     });
119
     });
120
+    IsEdit=false;
121
+  },
122
+  // 阻止示例面板的触摸事件传递到底层
123
+  catchTouchMove: function(e) {
124
+    // 这个函数不需要做任何事情,只需要捕获事件防止冒泡
125
+    return false;
66
   },
126
   },
67
   onShareAppMessage: function () {
127
   onShareAppMessage: function () {
68
     return {
128
     return {
@@ -71,4 +131,5 @@ Page({
71
       imageUrl: app.globalData.ShareImage,
131
       imageUrl: app.globalData.ShareImage,
72
     }
132
     }
73
   },
133
   },
134
+  
74
 })
135
 })

+ 1 - 1
pages/main/paste.json

@@ -1,4 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "粘贴",
2
+  "navigationBarTitleText": "粘贴单词",
3
   "usingComponents": {}
3
   "usingComponents": {}
4
 }
4
 }

+ 16 - 12
pages/main/paste.wxml

@@ -1,17 +1,20 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view class="panel1 FlexRow">
3
-    <view class="text01">1行1个单词或词组</view>
4
-    <view class="panel11 FlexRow" bind:tap="showExample">
5
-      <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
6
-      <view>范例</view>
2
+  <view class="panel1 FlexColumn">
3
+    <view class="text01">格式1行1个</view>
4
+    <view class="panel11 FlexRow" >
5
+      <view class="panel111 FlexRow" bind:tap="showExample">
6
+        <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
7
+        <view>示范</view>
8
+      </view>
9
+      <view class="panel112 FlexRow" >
10
+        <view class="panel1121 FlexRow" bind:tap="clearInput" data-id="0">清空全部</view>
11
+        <view class="panel1122 FlexRow" bind:tap="handlePaste">粘贴</view>
12
+      </view>
7
     </view>
13
     </view>
8
   </view>
14
   </view>
9
 
15
 
10
   <view class="panel2 FlexRow">
16
   <view class="panel2 FlexRow">
11
     <view class="panel21 FlexRow">
17
     <view class="panel21 FlexRow">
12
-      <view class="panel211 FlexColumn">
13
-        <view class="text03" wx:for="{{[1,2,3,4,5,6,7,8,9,10]}}" wx:key="index">{{item}}</view>
14
-      </view>
15
       <textarea class="text04" focus="true" value="{{Words}}" bindinput="bindKeyInput" />
18
       <textarea class="text04" focus="true" value="{{Words}}" bindinput="bindKeyInput" />
16
     </view>
19
     </view>
17
   </view>
20
   </view>
@@ -24,9 +27,10 @@
24
 </view>
27
 </view>
25
 
28
 
26
 
29
 
27
-<view wx:if="{{IsShowExample}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
28
-  
29
-  <image src="../images/pic_h02.png" class="pic_h02"></image>
30
+<view wx:if="{{IsShowExample}}" class="panelExample container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catchtouchmove="catchTouchMove">
31
+  <scroll-view scroll-y="true" class="exampleScrollView" style='height:{{Containnerheight}}rpx;'>
32
+    <image src="../images/pic_h02.png" class="pic_h01"></image>
33
+  </scroll-view>
30
   <image src="../images/pic_04.png" class="pic_04"></image>
34
   <image src="../images/pic_04.png" class="pic_04"></image>
31
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
35
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
32
-</view>
36
+</view>

+ 50 - 24
pages/main/paste.wxss

@@ -1,21 +1,40 @@
1
-
2
 .panel1{
1
 .panel1{
3
-  width:100%;
4
-  height:140rpx;
2
+  width:690rpx;
5
   color: #C1E1C1;
3
   color: #C1E1C1;
6
-  justify-content: space-between;
7
   position: relative;
4
   position: relative;
8
 }
5
 }
9
 
6
 
10
 .text01{
7
 .text01{
11
   font-size: 36rpx;
8
   font-size: 36rpx;
12
-  margin-left: 70rpx;
9
+  margin:50rpx 0 0 40rpx;
10
+  align-self: start;
13
 }
11
 }
14
 
12
 
15
 .panel11{
13
 .panel11{
16
-  margin-right: 70rpx;
14
+  margin: 0 0 30rpx 0;
15
+  font-size:24rpx;
16
+  width: 100%;
17
+  justify-content: space-between;
18
+}
19
+
20
+.panel111{
21
+  margin-left: 40rpx;
22
+}
23
+.panel112{
17
   font-size:24rpx;
24
   font-size:24rpx;
18
 }
25
 }
26
+.panel1121{
27
+  width: 120rpx;
28
+  height:73rpx;
29
+  margin-right: 62rpx;
30
+}
31
+.panel1122{
32
+  width: 96rpx;
33
+  height:73rpx;
34
+  margin-right: 40rpx;
35
+  border: 3rpx solid #C1E1C1;
36
+  border-radius: 20rpx;
37
+}
19
 .sysIcon_a01{
38
 .sysIcon_a01{
20
   width:24rpx;
39
   width:24rpx;
21
   height:24rpx;
40
   height:24rpx;
@@ -39,24 +58,15 @@
39
   border-radius: 20rpx;
58
   border-radius: 20rpx;
40
   background-color: #004433;
59
   background-color: #004433;
41
   justify-content: flex-start;
60
   justify-content: flex-start;
42
-}
43
-.panel211{
44
-  margin: 25rpx 30rpx 15rpx 0;
45
   align-items: flex-start;
61
   align-items: flex-start;
46
 }
62
 }
47
-.text03{
48
-  width: 30rpx;
49
-  margin-bottom: 10rpx;
50
-  font-size: 28rpx;
51
-  color: #728173;
52
-  margin-left: 30rpx;
53
-}
54
 .text04{
63
 .text04{
55
-  width:510rpx;
64
+  margin: 20rpx 30rpx 20rpx 30rpx;
65
+  width:570rpx;
56
   height:500rpx;
66
   height:500rpx;
57
   font-size: 36rpx;
67
   font-size: 36rpx;
58
   color: #FFDD88;
68
   color: #FFDD88;
59
-  line-height: 49rpx;
69
+  
60
 }
70
 }
61
 
71
 
62
 .panelFooter{
72
 .panelFooter{
@@ -95,11 +105,23 @@
95
 }
105
 }
96
 
106
 
97
 
107
 
98
-.panelMenu{
108
+.panelExample{
99
   background-color: rgba(26,67,51,0.50);
109
   background-color: rgba(26,67,51,0.50);
100
   z-index: 20;
110
   z-index: 20;
101
   position: fixed;
111
   position: fixed;
102
   top:0;
112
   top:0;
113
+  left:0;
114
+  right:0;
115
+  bottom:0;
116
+  overflow: hidden;
117
+}
118
+
119
+.exampleScrollView {
120
+  width: 100%;
121
+  display: flex;
122
+  flex-direction: column;
123
+  align-items: center;
124
+  padding-bottom: 300rpx;
103
 }
125
 }
104
 
126
 
105
 .panelExampleBtn{
127
 .panelExampleBtn{
@@ -110,16 +132,20 @@
110
   color: #F0F0F0;
132
   color: #F0F0F0;
111
   position: fixed;
133
   position: fixed;
112
   bottom:0;
134
   bottom:0;
135
+  z-index: 20;
113
 }
136
 }
114
-.pic_h02{
115
-  position: fixed;
116
-  bottom:176rpx;
117
-  width: 670rpx;
118
-  height:760rpx;
137
+.pic_h01{
138
+  margin-top: 64rpx;
139
+  margin-left: 15rpx;
140
+  width: 728rpx;
141
+  height:1258rpx;
142
+  margin-bottom: 300rpx;
143
+  z-index: 15;
119
 }
144
 }
120
 .pic_04{
145
 .pic_04{
121
   width:100%;
146
   width:100%;
122
   height: 170rpx;
147
   height: 170rpx;
123
   position: fixed;
148
   position: fixed;
124
   bottom:140rpx;
149
   bottom:140rpx;
150
+  z-index: 20;
125
 }
151
 }

+ 50 - 19
pages/main/selectword.js

@@ -13,20 +13,35 @@ Page({
13
     IsShowExample:false,
13
     IsShowExample:false,
14
   },
14
   },
15
   onLoad: function (options) {
15
   onLoad: function (options) {
16
-    var that = this;
16
+    let that = this;
17
+    that.setData({
18
+      Containnerheight: main.getWindowHeight(),
19
+    });
20
+  },
21
+
22
+  onShow:function(e){
23
+    let that = this;
17
     let words=app.globalData.OCRWords;
24
     let words=app.globalData.OCRWords;
18
     that.data.Words=[];
25
     that.data.Words=[];
26
+    let list=app.globalData.SelectedWords;
27
+    let count=0;
19
     for(let i=0;i<words.length;i++){
28
     for(let i=0;i<words.length;i++){
20
       let obj={};
29
       let obj={};
21
       obj.Name=words[i];
30
       obj.Name=words[i];
22
       obj.CSS="";
31
       obj.CSS="";
32
+      for(let j=0;j<list.length;j++){
33
+        if (list[j]==obj.Name){
34
+          obj.CSS="Selected";
35
+          count++;
36
+          break;
37
+        }
38
+      }
23
       that.data.Words.push(obj);
39
       that.data.Words.push(obj);
24
     }
40
     }
25
-    let list=app.globalData.SelectedWords;
26
     that.setData({
41
     that.setData({
27
-      Containnerheight: main.getWindowHeight(),
28
       Words:that.data.Words,
42
       Words:that.data.Words,
29
-      CountMax:COUNT_MAX-list.length,
43
+      CountMax:COUNT_MAX-list.length+count,
44
+      Count:count,
30
     });
45
     });
31
   },
46
   },
32
   selectWord:function(e){
47
   selectWord:function(e){
@@ -44,16 +59,13 @@ Page({
44
           count++;
59
           count++;
45
         }
60
         }
46
     }
61
     }
47
-    if (count>0){
48
-      this.setData({
49
-        IsShowAlert:false,
50
-      });
51
-    }
52
-    else{
53
-      this.setData({
54
-        IsShowAlert:true,
55
-      });
62
+    if (count==this.data.CountMax){
63
+        wx.showToast({
64
+          title: '本次最多'+this.data.CountMax+"个",
65
+          icon:"none"
66
+        })
56
     }
67
     }
68
+
57
     this.setData({
69
     this.setData({
58
       Words:list,
70
       Words:list,
59
       Count:count,
71
       Count:count,
@@ -66,11 +78,23 @@ Page({
66
       url: url,
78
       url: url,
67
     });
79
     });
68
   },
80
   },
69
-  close:function(n){
70
-    if (!n)
71
-      n=1;
72
-    wx.navigateBack({
73
-      delta: n
81
+  clearInput: function (e) {
82
+    let that=this;
83
+    let list=this.data.Words;
84
+    for(let i=0;i<list.length;i++){
85
+        list[i].CSS="";
86
+    }
87
+
88
+    this.setData({
89
+      Words:list,
90
+      Count:0,
91
+    });
92
+  },
93
+  gotoRedirectTo:function(e){
94
+    let that=this;
95
+    var url=e.currentTarget.dataset.url;
96
+    wx.redirectTo({
97
+      url: url,
74
     })
98
     })
75
   },
99
   },
76
   submit:function(){
100
   submit:function(){
@@ -86,7 +110,9 @@ Page({
86
           app.globalData.SelectedWords.push(list[i].Name);
110
           app.globalData.SelectedWords.push(list[i].Name);
87
         }
111
         }
88
       }
112
       }
89
-      this.close(2);
113
+      wx.navigateBack({
114
+        delta: 1,
115
+      });
90
     }
116
     }
91
   },
117
   },
92
   showExample:function(){
118
   showExample:function(){
@@ -94,6 +120,11 @@ Page({
94
       IsShowExample:!this.data.IsShowExample,
120
       IsShowExample:!this.data.IsShowExample,
95
     });
121
     });
96
   },
122
   },
123
+  // 阻止示例面板的触摸事件传递到底层
124
+  catchTouchMove: function(e) {
125
+    // 这个函数不需要做任何事情,只需要捕获事件防止冒泡
126
+    return false;
127
+  },
97
   onShareAppMessage: function () {
128
   onShareAppMessage: function () {
98
     return {
129
     return {
99
       title: app.globalData.ShareTitle,
130
       title: app.globalData.ShareTitle,

+ 18 - 12
pages/main/selectword.wxml

@@ -1,15 +1,19 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight+100}}rpx;'>
2
   <block wx:if="{{Words.length>0}}">
2
   <block wx:if="{{Words.length>0}}">
3
-    <view class="panel1 FlexRow">
4
-      <view class="text01">挑选单词1-{{CountMax}}个</view>
5
-      <view class="panel11 FlexRow" bind:tap="showExample">
6
-        <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
7
-        <view>提升识别</view>
3
+    <view class="panel1 FlexColumn">
4
+      <view class="text01">至少选一个</view>
5
+      <view class="panel11 FlexRow" >
6
+        <view class="panel111 FlexRow" bind:tap="showExample">
7
+          <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
8
+          <view>示范</view>
9
+        </view>
10
+        <view class="panel112 FlexRow" bind:tap="clearInput">取消选择</view>
8
       </view>
11
       </view>
9
     </view>
12
     </view>
13
+
10
     <view class="panel10 FlexRow" wx:if="{{IsShowAlert}}">
14
     <view class="panel10 FlexRow" wx:if="{{IsShowAlert}}">
11
       <view class="panel101 FlexRow">
15
       <view class="panel101 FlexRow">
12
-        <image src="../images/sysIcon_a03.png" class="sysIcon_a03"></image>
16
+        <image src="../images/sysIcon_b11.png" class="sysIcon_a03"></image>
13
         <view class="text03">请至少选择1个单词</view>
17
         <view class="text03">请至少选择1个单词</view>
14
       </view>
18
       </view>
15
     </view>
19
     </view>
@@ -19,6 +23,7 @@
19
         <view class="btn btn{{item.CSS}} FlexRow" wx:for="{{Words}}" wx:key="index" bind:tap="selectWord" data-word="{{item.Name}}">{{item.Name}}</view>
23
         <view class="btn btn{{item.CSS}} FlexRow" wx:for="{{Words}}" wx:key="index" bind:tap="selectWord" data-word="{{item.Name}}">{{item.Name}}</view>
20
       </view>
24
       </view>
21
     </view>
25
     </view>
26
+    <view style="height: 250rpx;"></view>
22
   </block>
27
   </block>
23
 
28
 
24
   <block wx:if="{{Words.length==0}}">
29
   <block wx:if="{{Words.length==0}}">
@@ -26,7 +31,7 @@
26
       <image src="../images/pic_05.png" class="pic_05"></image>
31
       <image src="../images/pic_05.png" class="pic_05"></image>
27
       <view class="text05">未识别到单词</view>
32
       <view class="text05">未识别到单词</view>
28
       <view class="text06">请拍摄含有英语单词、句子的画面</view>
33
       <view class="text06">请拍摄含有英语单词、句子的画面</view>
29
-      <view class="panelNull1 FlexRow">
34
+      <view class="panelNull1 FlexRow" catch:tap="showExample">
30
         <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
35
         <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
31
         <view>提升识别质量</view>
36
         <view>提升识别质量</view>
32
       </view>
37
       </view>
@@ -36,7 +41,7 @@
36
 
41
 
37
   <view class="panelFooter FlexRow">
42
   <view class="panelFooter FlexRow">
38
     <view class="panelFooter1 FlexRow">
43
     <view class="panelFooter1 FlexRow">
39
-      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="close">
44
+      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="gotoRedirectTo" data-url="ocr">
40
         <image src="../images/sysIcon_a04.png" class="sysIcon_a03"></image>
45
         <image src="../images/sysIcon_a04.png" class="sysIcon_a03"></image>
41
         <view class="text02">拍照</view>
46
         <view class="text02">拍照</view>
42
       </view>
47
       </view>
@@ -51,9 +56,10 @@
51
 </view>
56
 </view>
52
 
57
 
53
 
58
 
54
-<view wx:if="{{IsShowExample}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
55
-  
56
-  <image src="../images/pic_h03.png" class="pic_h03"></image>
59
+<view wx:if="{{IsShowExample}}" class="panelExample container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catchtouchmove="catchTouchMove">
60
+  <scroll-view scroll-y="true" class="exampleScrollView" style='height:{{Containnerheight}}rpx;'>
61
+    <image src="../images/pic_h03.png" class="pic_h01"></image>
62
+  </scroll-view>
57
   <image src="../images/pic_04.png" class="pic_04"></image>
63
   <image src="../images/pic_04.png" class="pic_04"></image>
58
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
64
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
59
 </view>
65
 </view>

+ 35 - 10
pages/main/selectword.wxss

@@ -1,19 +1,28 @@
1
 .panel1{
1
 .panel1{
2
-  width:100%;
3
-  height:140rpx;
2
+  width:690rpx;
4
   color: #C1E1C1;
3
   color: #C1E1C1;
5
-  justify-content: space-between;
6
   position: relative;
4
   position: relative;
7
 }
5
 }
8
 
6
 
9
 .text01{
7
 .text01{
10
   font-size: 36rpx;
8
   font-size: 36rpx;
11
-  margin-left: 70rpx;
9
+  margin:50rpx 0 0 40rpx;
10
+  align-self: start;
12
 }
11
 }
13
 
12
 
14
 .panel11{
13
 .panel11{
15
-  margin-right: 70rpx;
14
+  margin: 0 0 30rpx 0;
16
   font-size:24rpx;
15
   font-size:24rpx;
16
+  width: 100%;
17
+  justify-content: space-between;
18
+}
19
+
20
+.panel111{
21
+  margin-left: 40rpx;
22
+}
23
+.panel112{
24
+  width: 176rpx;
25
+  height:73rpx;
17
 }
26
 }
18
 .sysIcon_a01{
27
 .sysIcon_a01{
19
   width:24rpx;
28
   width:24rpx;
@@ -169,11 +178,23 @@
169
 }
178
 }
170
 
179
 
171
 
180
 
172
-.panelMenu{
181
+.panelExample{
173
   background-color: rgba(26,67,51,0.50);
182
   background-color: rgba(26,67,51,0.50);
174
   z-index: 20;
183
   z-index: 20;
175
   position: fixed;
184
   position: fixed;
176
   top:0;
185
   top:0;
186
+  left:0;
187
+  right:0;
188
+  bottom:0;
189
+  overflow: hidden;
190
+}
191
+
192
+.exampleScrollView {
193
+  width: 100%;
194
+  display: flex;
195
+  flex-direction: column;
196
+  align-items: center;
197
+  padding-bottom: 300rpx;
177
 }
198
 }
178
 
199
 
179
 .panelExampleBtn{
200
 .panelExampleBtn{
@@ -184,16 +205,20 @@
184
   color: #F0F0F0;
205
   color: #F0F0F0;
185
   position: fixed;
206
   position: fixed;
186
   bottom:0;
207
   bottom:0;
208
+  z-index: 20;
187
 }
209
 }
188
-.pic_h03{
189
-  position: fixed;
190
-  bottom:176rpx;
191
-  width: 670rpx;
210
+.pic_h01{
211
+  margin-top: 64rpx;
212
+  margin-left: 15rpx;
213
+  width: 728rpx;
192
   height:1258rpx;
214
   height:1258rpx;
215
+  margin-bottom: 300rpx;
216
+  z-index: 15;
193
 }
217
 }
194
 .pic_04{
218
 .pic_04{
195
   width:100%;
219
   width:100%;
196
   height: 170rpx;
220
   height: 170rpx;
197
   position: fixed;
221
   position: fixed;
198
   bottom:140rpx;
222
   bottom:140rpx;
223
+  z-index: 20;
199
 }
224
 }

+ 71 - 15
pages/main/wordsinput.js

@@ -2,6 +2,7 @@ import common from '../../utils/util';
2
 import main from '../../utils/main';
2
 import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
+let isFocus=true;
5
 
6
 
6
 Page({
7
 Page({
7
   data: {
8
   data: {
@@ -10,9 +11,10 @@ Page({
10
     IsShowSetPanel:false,
11
     IsShowSetPanel:false,
11
     IsShowFirstOpen:false,
12
     IsShowFirstOpen:false,
12
     IsShowExample:false,
13
     IsShowExample:false,
14
+    IsShowRemind:false,
13
   },
15
   },
14
   onLoad: function (options) {
16
   onLoad: function (options) {
15
-    var that = this;
17
+    let that = this;
16
     let grade=wx.getStorageSync('Grade');
18
     let grade=wx.getStorageSync('Grade');
17
     if (!grade)
19
     if (!grade)
18
       grade=[{Name:"小学",CSS:"Selected"},{Name:"初中",CSS:""},{Name:"高中",CSS:""},{Name:"大学",CSS:""}];
20
       grade=[{Name:"小学",CSS:"Selected"},{Name:"初中",CSS:""},{Name:"高中",CSS:""},{Name:"大学",CSS:""}];
@@ -32,7 +34,7 @@ Page({
32
 
34
 
33
   },
35
   },
34
   onShow:function(e){
36
   onShow:function(e){
35
-    var that = this;
37
+    let that = this;
36
     app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
38
     app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
37
     that.data.Words=[];
39
     that.data.Words=[];
38
     for(let i=0;i<10;i++){
40
     for(let i=0;i<10;i++){
@@ -49,12 +51,15 @@ Page({
49
       obj.IsError=false;
51
       obj.IsError=false;
50
       that.data.Words.push(obj);
52
       that.data.Words.push(obj);
51
     }
53
     }
52
-    console.log(app.globalData.SelectedWords);
54
+    //console.log(app.globalData.SelectedWords);
53
     that.setData({
55
     that.setData({
54
       Words:that.data.Words,
56
       Words:that.data.Words,
55
     });
57
     });
56
     that.isShowAlert();
58
     that.isShowAlert();
57
   },
59
   },
60
+  onHide:function(e){
61
+    this.getInputData();
62
+  },
58
   bindKeyInput: function (e) {
63
   bindKeyInput: function (e) {
59
     let that=this;
64
     let that=this;
60
     let id=e.currentTarget.dataset.id;
65
     let id=e.currentTarget.dataset.id;
@@ -82,7 +87,7 @@ Page({
82
     that.isShowAlert();
87
     that.isShowAlert();
83
   },
88
   },
84
   isShowAlert:function(){
89
   isShowAlert:function(){
85
-    const that=this;
90
+    let that=this;
86
     let b=false;
91
     let b=false;
87
     for(let i=0;i<10;i++){
92
     for(let i=0;i<10;i++){
88
       if (that.data.Words[i].IsError){
93
       if (that.data.Words[i].IsError){
@@ -96,7 +101,7 @@ Page({
96
     });
101
     });
97
   },
102
   },
98
   setArticleParam:function(e){
103
   setArticleParam:function(e){
99
-    const that=this;
104
+    let that=this;
100
     let count=0;
105
     let count=0;
101
     for(let i=0;i<10;i++){
106
     for(let i=0;i<10;i++){
102
       if (that.data.Words[i].CSS=="txtWordFinished"){
107
       if (that.data.Words[i].CSS=="txtWordFinished"){
@@ -122,19 +127,18 @@ Page({
122
     });
127
     });
123
   },
128
   },
124
   showExample:function(){
129
   showExample:function(){
125
-    
126
     this.setData({
130
     this.setData({
127
       IsShowExample:!this.data.IsShowExample,
131
       IsShowExample:!this.data.IsShowExample,
128
     });
132
     });
129
   },
133
   },
130
   keyboardOK:function(e){
134
   keyboardOK:function(e){
131
-    const that=this;
135
+    let that=this;
132
     let id=e.currentTarget.dataset.id;
136
     let id=e.currentTarget.dataset.id;
133
     id++;
137
     id++;
134
     that.setFocus({currentTarget:{dataset:{id:id}}});
138
     that.setFocus({currentTarget:{dataset:{id:id}}});
135
   },
139
   },
136
   setFocus:function(e){
140
   setFocus:function(e){
137
-    const that=this;
141
+    let that=this;
138
     let id=e.currentTarget.dataset.id;
142
     let id=e.currentTarget.dataset.id;
139
     
143
     
140
     for(let i=0;i<that.data.Words.length;i++){
144
     for(let i=0;i<that.data.Words.length;i++){
@@ -187,13 +191,8 @@ Page({
187
     let that=this;
191
     let that=this;
188
     var url=e.currentTarget.dataset.url;
192
     var url=e.currentTarget.dataset.url;
189
 
193
 
190
-    app.globalData.SelectedWords=[];
191
-    for(let i=0;i<that.data.Words.length;i++){
192
-      if (that.data.Words[i].Word)
193
-        app.globalData.SelectedWords.push(that.data.Words[i].Word);
194
-    }
195
-    app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
196
-    
194
+    that.getInputData();
195
+
197
     if (url=="article"){
196
     if (url=="article"){
198
       let arr=this.data.Grade;
197
       let arr=this.data.Grade;
199
       for(let i=0;i<arr.length;i++){
198
       for(let i=0;i<arr.length;i++){
@@ -210,10 +209,67 @@ Page({
210
         }
209
         }
211
       }
210
       }
212
     }
211
     }
212
+
213
+    
214
+    if (url=="../main/ocr" || url=="../main/selectword"){
215
+      if ( app.globalData.SelectedWords.length>=10){
216
+        that.showRemind();
217
+        return;
218
+      }
219
+      if (app.globalData.OCRWords.length>0){
220
+        url="../main/selectword";
221
+      }
222
+      else{
223
+        url="../main/ocr"
224
+      }
225
+    }
213
     wx.navigateTo({
226
     wx.navigateTo({
214
       url: url,
227
       url: url,
215
     });
228
     });
216
   },
229
   },
230
+  getInputData:function(){
231
+    let that=this;
232
+    app.globalData.SelectedWords=[];
233
+    for(let i=0;i<that.data.Words.length;i++){
234
+      if (that.data.Words[i].Word)
235
+        app.globalData.SelectedWords.push(that.data.Words[i].Word);
236
+    }
237
+    app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
238
+    
239
+  },
240
+  clearInput:function(e){
241
+    let that=this;
242
+    const id=e.currentTarget.dataset.id;
243
+    if (id=="0"){
244
+      app.globalData.SelectedWords=[];
245
+      this.onShow();
246
+    }
247
+    else{
248
+      for(let i=0;i<10;i++){
249
+        if (i+1==id){
250
+          that.data.Words[i].Word="";
251
+          that.data.Words[i].CSS="";
252
+          that.data.Words[i].IsError=false;
253
+          app.globalData.SelectedWords.splice(i,1);
254
+          break;
255
+        }
256
+      }
257
+      that.setData({
258
+        Words:that.data.Words, 
259
+      });
260
+      that.isShowAlert();
261
+    }
262
+  },
263
+  showRemind:function(e){
264
+    this.setData({
265
+      IsShowRemind:!this.data.IsShowRemind,
266
+    });
267
+  },
268
+  // 阻止示例面板的触摸事件传递到底层
269
+  catchTouchMove: function(e) {
270
+    // 这个函数不需要做任何事情,只需要捕获事件防止冒泡
271
+    return false;
272
+  },
217
   onShareAppMessage: function () {
273
   onShareAppMessage: function () {
218
     return {
274
     return {
219
       title: app.globalData.ShareTitle,
275
       title: app.globalData.ShareTitle,

+ 1 - 0
pages/main/wordsinput.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
+  "navigationBarTitleText": "文章制作",
2
   "usingComponents": {}
3
   "usingComponents": {}
3
 }
4
 }

+ 37 - 12
pages/main/wordsinput.wxml

@@ -1,14 +1,17 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view class="panel1 FlexRow">
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight+100}}rpx;'>
2
+  <view class="panel1 FlexColumn">
3
     <view class="text01">输入单词5-10个</view>
3
     <view class="text01">输入单词5-10个</view>
4
-    <view class="panel11 FlexRow" bind:tap="showExample">
5
-      <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
6
-      <view>范例</view>
4
+    <view class="panel11 FlexRow" >
5
+      <view class="panel111 FlexRow" bind:tap="showExample">
6
+        <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
7
+        <view>示范</view>
8
+      </view>
9
+      <view class="panel112 FlexRow" bind:tap="clearInput" data-id="0">清空全部</view>
7
     </view>
10
     </view>
8
   </view>
11
   </view>
9
   <view class="panel10 FlexRow" wx:if="{{IsShowAlert}}">
12
   <view class="panel10 FlexRow" wx:if="{{IsShowAlert}}">
10
     <view class="panel101 FlexRow">
13
     <view class="panel101 FlexRow">
11
-      <image src="../images/sysIcon_a03.png" class="sysIcon_a03"></image>
14
+      <image src="../images/sysIcon_b11.png" class="sysIcon_a03"></image>
12
       <view class="text03">{{AlertContent}}</view>
15
       <view class="text03">{{AlertContent}}</view>
13
     </view>
16
     </view>
14
   </view>
17
   </view>
@@ -18,14 +21,17 @@
18
       <view class="panel20 panel2{{item.ID}} {{item.CSS}} FlexRow">
21
       <view class="panel20 panel2{{item.ID}} {{item.CSS}} FlexRow">
19
         <view class="panel211" wx:if="{{!item.IsError}}"></view>
22
         <view class="panel211" wx:if="{{!item.IsError}}"></view>
20
         <view class="panel211 panel2110" wx:if="{{item.IsError}}"></view>
23
         <view class="panel211 panel2110" wx:if="{{item.IsError}}"></view>
21
-        <input class="txtWord" focus="{{item.Focus}}" placeholder="单词 {{item.ID}}"  value="{{item.Word}}" confirm-type="{{KeyboardBtnName}}" maxlength="30" placeholder-class="placeholderClass" bindconfirm="keyboardOK"  bindfocus="setFocus" bindinput="bindKeyInput" data-id="{{item.ID}}"/>
24
+        <input type="text" class="txtWord" focus="{{item.Focus}}" placeholder="单词 {{item.ID}}"  value="{{item.Word}}" confirm-hold="true" hold-keyboard="true" confirm-type="{{KeyboardBtnName}}" maxlength="30" placeholder-class="placeholderClass" bindconfirm="keyboardOK"  bindfocus="setFocus" bindinput="bindKeyInput" data-id="{{item.ID}}"/>
25
+        <view class="panel20Delete FlexRow" wx:if="{{item.CSS}}" bind:tap="clearInput" data-id="{{item.ID}}">
26
+          <image src="../images/sysIcon_a99.png" class="sysIcon_a14"></image>
27
+        </view>
22
       </view>
28
       </view>
23
     </block>
29
     </block>
24
   </view>
30
   </view>
25
 
31
 
26
   <view class="panelFooter FlexRow">
32
   <view class="panelFooter FlexRow">
27
     <view class="panelFooter1 FlexRow">
33
     <view class="panelFooter1 FlexRow">
28
-      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="goto" data-url="../main/ocr">
34
+      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="goto" data-url="../main/selectword">
29
         <image src="../images/sysIcon_a04.png" class="sysIcon_a03"></image>
35
         <image src="../images/sysIcon_a04.png" class="sysIcon_a03"></image>
30
         <view class="text02">拍照</view>
36
         <view class="text02">拍照</view>
31
       </view>
37
       </view>
@@ -44,7 +50,7 @@
44
   <view class="panelHelp1">
50
   <view class="panelHelp1">
45
     <image src="../images/sysIcon_b06.png" class="sysIcon_b06"></image>
51
     <image src="../images/sysIcon_b06.png" class="sysIcon_b06"></image>
46
     <view class="panelHelp2 FlexColumn">
52
     <view class="panelHelp2 FlexColumn">
47
-      <view class="text07">先从这里输入单词再点这里生成短文</view>
53
+      <text class="text07">先从这里输入单词\n再点下一步生成文章</text>
48
       <view class="btn3 FlexColumn" bind:tap="closeHelp">知道了</view>
54
       <view class="btn3 FlexColumn" bind:tap="closeHelp">知道了</view>
49
     </view>
55
     </view>
50
   </view>
56
   </view>
@@ -81,9 +87,28 @@
81
   </view>
87
   </view>
82
 </view>
88
 </view>
83
 
89
 
84
-<view wx:if="{{IsShowExample}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
85
-  
86
-  <image src="../images/pic_h01.png" class="pic_h01"></image>
90
+<view wx:if="{{IsShowExample}}" class="panelExample container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catchtouchmove="catchTouchMove">
91
+  <scroll-view scroll-y="true" class="exampleScrollView" style='height:{{Containnerheight}}rpx;'>
92
+    <image src="../images/pic_h01.png" class="pic_h01"></image>
93
+  </scroll-view>
87
   <image src="../images/pic_04.png" class="pic_04"></image>
94
   <image src="../images/pic_04.png" class="pic_04"></image>
88
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
95
   <view class="panelExampleBtn FlexColumn" catch:tap="showExample">返回</view>
96
+</view>
97
+
98
+<view wx:if="{{IsShowRemind}}" class="panelMenu container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
99
+  <view class="panelRemind FlexColumn">
100
+    <image src="../images/sysIcon_b10.png" class="sysIcon_b10"></image>
101
+      
102
+    <view class="panelRemind1 FlexRow">
103
+      <image src="../images/sysIcon_b09.png" class="sysIcon_b09"></image>
104
+      <view>无法拍照</view>
105
+    </view>
106
+    <view class="panelRemind2 FlexColumn">
107
+      <view class="textRemind FlexColumn">
108
+        <text>很抱歉,目前不能拍照,因为单词数量已满,不能再增加新的单词。请先删除一些单词。</text>
109
+        <text style="margin-top: 20rpx;">单词容量,最多10个,至少5个。</text>
110
+      </view>
111
+      <view class="btnReind1 FlexColumn" catch:tap="showRemind">知道了</view>
112
+    </view>
113
+  </view>
89
 </view>
114
 </view>

+ 114 - 13
pages/main/wordsinput.wxss

@@ -1,19 +1,28 @@
1
 .panel1{
1
 .panel1{
2
-  width:100%;
3
-  height:140rpx;
2
+  width:690rpx;
4
   color: #C1E1C1;
3
   color: #C1E1C1;
5
-  justify-content: space-between;
6
   position: relative;
4
   position: relative;
7
 }
5
 }
8
 
6
 
9
 .text01{
7
 .text01{
10
   font-size: 36rpx;
8
   font-size: 36rpx;
11
-  margin-left: 70rpx;
9
+  margin:50rpx 0 0 40rpx;
10
+  align-self: start;
12
 }
11
 }
13
 
12
 
14
 .panel11{
13
 .panel11{
15
-  margin-right: 70rpx;
14
+  margin: 20rpx 0 30rpx 0;
16
   font-size:24rpx;
15
   font-size:24rpx;
16
+  width: 100%;
17
+  justify-content: space-between;
18
+}
19
+
20
+.panel111{
21
+  margin-left: 40rpx;
22
+}
23
+.panel112{
24
+  width: 176rpx;
25
+  height:73rpx;
17
 }
26
 }
18
 .sysIcon_a01{
27
 .sysIcon_a01{
19
   width:24rpx;
28
   width:24rpx;
@@ -25,7 +34,7 @@
25
   position: fixed;
34
   position: fixed;
26
   top:0;
35
   top:0;
27
   width: 100%;
36
   width: 100%;
28
-  height:140rpx;
37
+  height:130rpx;
29
   z-index: 10;
38
   z-index: 10;
30
   justify-content: flex-start;
39
   justify-content: flex-start;
31
   background-image: linear-gradient(180deg, #004433 0%, rgba(0,46,34,0.80) 100%);
40
   background-image: linear-gradient(180deg, #004433 0%, rgba(0,46,34,0.80) 100%);
@@ -35,7 +44,7 @@
35
   background: #CA4B15;
44
   background: #CA4B15;
36
   border-radius: 10rpx;
45
   border-radius: 10rpx;
37
   height:70rpx;
46
   height:70rpx;
38
-  margin-left: 30rpx;
47
+  margin: 0 0 0 30rpx;
39
   padding: 0 30rpx;
48
   padding: 0 30rpx;
40
 }
49
 }
41
 
50
 
@@ -66,6 +75,7 @@
66
   border-radius: 5rpx;
75
   border-radius: 5rpx;
67
   margin: 10rpx 0 0 0;
76
   margin: 10rpx 0 0 0;
68
   justify-content: flex-start;
77
   justify-content: flex-start;
78
+  position: relative;
69
 }
79
 }
70
 
80
 
71
 .panel21{
81
 .panel21{
@@ -103,6 +113,18 @@
103
   color:#627062;
113
   color:#627062;
104
 }
114
 }
105
 
115
 
116
+.panel20Delete{
117
+  width:80rpx;
118
+  height:80rpx;
119
+  position: absolute;
120
+  right:0;
121
+  z-index: 10;
122
+}
123
+.sysIcon_a14{
124
+  width: 20rpx;
125
+  height:22rpx;
126
+}
127
+
106
 .panelFooter{
128
 .panelFooter{
107
   width: 100%;
129
   width: 100%;
108
   height:180rpx;
130
   height:180rpx;
@@ -177,7 +199,7 @@
177
   font-size: 36rpx;
199
   font-size: 36rpx;
178
   color: #2E2E2E;
200
   color: #2E2E2E;
179
   text-align: center;
201
   text-align: center;
180
-  width:288rpx;
202
+  width:360rpx;
181
 }
203
 }
182
 .btn3{
204
 .btn3{
183
   width:310rpx;
205
   width:310rpx;
@@ -271,6 +293,25 @@
271
   border-radius: 50%;
293
   border-radius: 50%;
272
 }
294
 }
273
 
295
 
296
+.panelExample{
297
+  background-color: rgba(26,67,51,0.50);
298
+  z-index: 20;
299
+  position: fixed;
300
+  top:0;
301
+  left:0;
302
+  right:0;
303
+  bottom:0;
304
+  overflow: hidden;
305
+}
306
+
307
+.exampleScrollView {
308
+  width: 100%;
309
+  display: flex;
310
+  flex-direction: column;
311
+  align-items: center;
312
+  padding-bottom: 300rpx;
313
+}
314
+
274
 .panelExampleBtn{
315
 .panelExampleBtn{
275
   width: 100%;
316
   width: 100%;
276
   height:140rpx;
317
   height:140rpx;
@@ -279,16 +320,76 @@
279
   color: #F0F0F0;
320
   color: #F0F0F0;
280
   position: fixed;
321
   position: fixed;
281
   bottom:0;
322
   bottom:0;
323
+  z-index: 20;
282
 }
324
 }
283
 .pic_h01{
325
 .pic_h01{
284
-  position: fixed;
285
-  bottom:176rpx;
286
-  width: 670rpx;
287
-  height:950rpx;
326
+  margin-top: 64rpx;
327
+  margin-left: 15rpx;
328
+  width: 728rpx;
329
+  height:1258rpx;
330
+  margin-bottom: 300rpx;
331
+  z-index: 15;
288
 }
332
 }
289
 .pic_04{
333
 .pic_04{
290
   width:100%;
334
   width:100%;
291
   height: 170rpx;
335
   height: 170rpx;
292
   position: fixed;
336
   position: fixed;
293
   bottom:140rpx;
337
   bottom:140rpx;
294
-}
338
+  z-index: 20;
339
+}
340
+
341
+.panelRemind{
342
+  width: 690rpx;
343
+  margin-bottom: 75rpx;
344
+  position: fixed;
345
+  bottom: 0;
346
+  background: #CA4B15;
347
+  box-shadow: 0 20rpx 0 0 #8E3F1D, 0 50rpx 0 0 rgba(0,0,0,0.50);
348
+  border-radius: 60rpx;
349
+  background-image: radial-gradient(circle at 53% 50%, #85261E 0%, rgba(178,71,62,0.00) 50%);
350
+}
351
+.sysIcon_b10{
352
+  width: 360rpx;
353
+  height:140rpx;
354
+  position: absolute;
355
+  right:0;
356
+  top:-20rpx;
357
+}
358
+.panelRemind1{
359
+  width: 100%;
360
+  justify-content: flex-start;
361
+  margin-top: 40rpx;
362
+  font-size: 36rpx;
363
+  color: #FFFFFF;
364
+  z-index: 25rpx;
365
+}
366
+.sysIcon_b09{
367
+  width: 50rpx;
368
+  height:50rpx;
369
+  margin: 0 20rpx 0 50rpx ;
370
+}
371
+.panelRemind2{
372
+  width: 650rpx;
373
+  min-height:220rpx;
374
+  background: #FFFFFF;
375
+  color: #2E2E2E;
376
+  border-radius: 40rpx;
377
+  margin: 30rpx 0;
378
+  justify-content: flex-start;
379
+}
380
+.textRemind{
381
+  width:570rpx;
382
+  font-weight: 400;
383
+  font-size: 28rpx;
384
+  align-items: flex-start;
385
+  margin-top: 80rpx;
386
+}
387
+.btnReind1{
388
+  width:590rpx;
389
+  height:90rpx;
390
+  background: #F0F0F0;
391
+  border-radius: 20rpx;
392
+  font-size: 36rpx;
393
+  margin-top: 60rpx;
394
+  margin-bottom: 40rpx;
395
+}