chengjie vor 4 Monaten
Ursprung
Commit
3bdc87c906

+ 4 - 6
app.js

@@ -1,7 +1,6 @@
1
-// app.js
2 1
 App({
3 2
   globalData: {
4
-    Version: "1.1.1",
3
+    Version: "1.1.3",
5 4
     //IsProduction: true,
6 5
     ShareTitle: "阅读理解+答题",
7 6
     SharePath: "pages/index/index",
@@ -12,7 +11,7 @@ App({
12 11
     serverUrl: "https://scoreline.kylx365.com/apiData/",
13 12
     serverUrlServer: "https://scoreline.kylx365.com/apiData/",
14 13
     serverUrlLocalhost: "http://localhost:3000/apiData/",
15
-    audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
14
+    audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=7&pit=5",
16 15
     uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
17 16
     officialAccounts:"https://mp.weixin.qq.com/s/gO9S4PrPl1Uu1iksyRuBgw",
18 17
     BaiduToken: "",//百度开发平台token
@@ -35,13 +34,12 @@ App({
35 34
     Generating:false,//生成文章中
36 35
     GeneratingStart:false,//生成文章中已经开始
37 36
     GenerateConfig:[],//生成文章的配置信息
37
+    UserCollect:[],//用户收藏单词
38
+    UnReadCount:0,//用户未读数
38 39
   },
39 40
   onLaunch: function (options) {
40 41
     let that=this;
41 42
     that.getSystemInfo();
42
-    // wx.setEnableDebug({
43
-    //   enableDebug: true
44
-    // });
45 43
   },
46 44
   getSystemInfo: function () {
47 45
     this.globalData.systemInfo = wx.getSystemInfoSync();

+ 2 - 0
app.json

@@ -2,6 +2,8 @@
2 2
   "pages": [
3 3
     "pages/index/index",
4 4
     "pages/main/help",
5
+    "pages/main/myinfo",
6
+    "pages/main/mywords",
5 7
     "pages/main/myarticles",
6 8
     "pages/main/article",
7 9
     "pages/main/index",

BIN
pages/.DS_Store


+ 1 - 1
pages/behaviors/commonBehavior.js

@@ -18,8 +18,8 @@ module.exports = Behavior({
18 18
       let name=e.currentTarget.dataset.name;
19 19
       let saveData=e.currentTarget.dataset.savedata;
20 20
       this.data[name] = !this.data[name];
21
+      
21 22
       this.setData(this.data);
22
-
23 23
       if (saveData)
24 24
         wx.setStorageSync(name, saveData);
25 25
     },

BIN
pages/images/pic_01.png


BIN
pages/images/pic_02.png


BIN
pages/images/pic_ha08.png


BIN
pages/images/sysIcon_a14.png


BIN
pages/images/sysIcon_a35.png


BIN
pages/images/sysIcon_a36.png


BIN
pages/images/sysIcon_a37.png


BIN
pages/images/sysIcon_a38.png


BIN
pages/images/sysIcon_a39.png


BIN
pages/images/sysIcon_a40.png


BIN
pages/images/sysIcon_a41.png


+ 2 - 2
pages/index/index.js

@@ -77,8 +77,8 @@ Page({
77 77
 
78 78
   login: function (param) {
79 79
     let that = this;
80
-    console.log("app.globalData.systemInfo.screenHeight:" + app.globalData.systemInfo.screenHeight);
81
-    console.log("app.globalData.systemInfo.windowHeight:" + app.globalData.systemInfo.windowHeight);
80
+    //console.log("app.globalData.systemInfo.screenHeight:" + app.globalData.systemInfo.screenHeight);
81
+    //console.log("app.globalData.systemInfo.windowHeight:" + app.globalData.systemInfo.windowHeight);
82 82
     main.getLocalHost(function () {
83 83
       main.postData('YJBDCLogin', {
84 84
         Code: param.Code,

+ 171 - 44
pages/main/article.js

@@ -29,8 +29,9 @@ Page({
29 29
     IsShowQuestion:false,
30 30
     IsShowTranslate:false,
31 31
     IsShowSetting:false,
32
-    IsShowRemind:false,
33
-    remindAnimation: "", // 翻译弹窗动画类
32
+    IsShowWordTranslate:false,
33
+    IsBuildQueue:false,
34
+    TranslateHeight:100,//翻译单词框的高度
34 35
     CurrentQuestionIndex:0,
35 36
     swiperHeight: "526rpx",
36 37
     lastTapTime: 0, // 记录上一次点击的时间,用于检测双击
@@ -79,6 +80,7 @@ Page({
79 80
       IsShowKeyword:IsShowKeyword,
80 81
       IsBuildError:false,
81 82
       IsBuilding:false,
83
+      IsCollect:false,
82 84
     });
83 85
 
84 86
     if (options.ID)
@@ -94,8 +96,6 @@ Page({
94 96
     // that.getChoicenessArticle();
95 97
 
96 98
     main.checkGenerating();
97
-
98
-
99 99
     this.audioCtx = wx.createAudioContext('myAudio');
100 100
   },
101 101
   onShow:function(){
@@ -115,6 +115,7 @@ Page({
115 115
         });
116 116
         let content=data.JSONString;
117 117
         that.updateData(content);
118
+        that.updateReadCount(that.data.ID);
118 119
       }
119 120
     });
120 121
   },
@@ -139,7 +140,7 @@ Page({
139 140
     });
140 141
     app.globalData.Generating=true;
141 142
     let words=app.globalData.SelectedWords.join(",");
142
-    main.postData('GenerateArticle?UserID='+app.globalData.userInfo.UserID, {
143
+    main.postData('QueuedGenerateArticle?UserID='+app.globalData.userInfo.UserID, {
143 144
       Words:words,
144 145
       Level:that.data.Level,
145 146
       ArticleStyle:that.data.ArticleStyle,
@@ -148,19 +149,34 @@ Page({
148 149
       app.globalData.Generating=false;
149 150
       app.globalData.GeneratingStart=false;
150 151
       if (data){
152
+        console.log("请求生成数据:"+JSON.stringify(data));
151 153
         if (data=="-1"){
152 154
           that.setData({
155
+            IsBuilding:false,
153 156
             IsBuildError:true,
154
-            CreateTime:common.formatDateCHS(common.formatTime(new Date()),true),
157
+            IsBuildQueue:false,
158
+          });
159
+        }
160
+        else if (data=="-2"){
161
+          that.setData({
162
+            IsBuilding:false,
163
+            IsBuildError:false,
164
+            IsBuildQueue:true,
155 165
           });
156 166
         }
157 167
         else{
158
-          that.updateData(data.Content);
168
+          console.log("生成1");
169
+          if (that.data.IsNew){
170
+            console.log("生成2");
171
+            that.updateData(data.Content);
172
+            that.updateReadCount(that.data.ID);
173
+          }
159 174
           that.setData({
160 175
             IsBuilding:false,
161 176
             ID:data.ID,
162
-            IsNew:data.IsNew,
177
+            CreateTime:common.formatDateCHS(common.formatTime(new Date()),true),
163 178
           });
179
+          
164 180
         }
165 181
         clearInterval(interval);
166 182
       }
@@ -183,7 +199,6 @@ Page({
183 199
       }
184 200
     });
185 201
   },
186
-  
187 202
   updateData:function(content){
188 203
     let that=this;
189 204
     //console.log(content);
@@ -208,8 +223,29 @@ Page({
208 223
     for(let i=0; i<content.ArticleEnglish.length; i++){
209 224
       // 确保每个句子末尾有空格,避免和下一句紧挨着
210 225
       let sentence = content.ArticleEnglish[i] + " ";
211
-      // 替换所有单引号为双引号,包括对话中的单引号
212
-      sentence = sentence.replace(/(^|[,.]\s+)'([^']+)'/g, '$1"$2"');
226
+      // 替换所有单引号为双引号,包括对话中的单引号和句尾的单引号
227
+      sentence = sentence.replace(/(^|[,.;:!?\s])'([^']+)'([,.;:!?]|\s|$)/g, '$1"$2"$3');
228
+      
229
+      // 处理常见的带点缩写,将其中的点替换为特殊标记,以防止被分割
230
+      // 1. 称谓缩写
231
+      sentence = sentence.replace(/\b(Dr|Mr|Mrs|Ms|Prof)\./g, '$1@DOT@');
232
+      // 2. 时间缩写
233
+      sentence = sentence.replace(/\b([ap])\.m\./gi, '$1@DOT@m@DOT@');
234
+      // 3. 学位缩写
235
+      sentence = sentence.replace(/\b(B|M|Ph)\.([A-Z])\./gi, '$1@DOT@$2@DOT@');
236
+      // 4. 公司名称缩写
237
+      sentence = sentence.replace(/\b(Inc|Ltd|Co|Corp)\./g, '$1@DOT@');
238
+      // 5. 拉丁缩写
239
+      sentence = sentence.replace(/\b(e\.g|i\.e|etc|et al|vs)\./g, '$1@DOT@');
240
+      // 6. 军衔缩写
241
+      sentence = sentence.replace(/\b(Lt|Col|Gen|Sgt|Capt)\./g, '$1@DOT@');
242
+      // 7. 地理缩写
243
+      sentence = sentence.replace(/\b(St|Ave|Rd|Blvd)\./g, '$1@DOT@');
244
+      // 8. 其他常见缩写
245
+      sentence = sentence.replace(/\b(U\.S|U\.K|U\.N)\./g, '$1@DOT@');
246
+      
247
+      // 先处理破折号,在破折号前后添加空格,使其成为独立元素
248
+      sentence = sentence.replace(/([^\s])([—\-–—])([^\s])/g, '$1 $2 $3');
213 249
       
214 250
       // 将句子按空格分割成单词数组
215 251
       let words = sentence.trim().split(/\s+/);
@@ -218,6 +254,8 @@ Page({
218 254
       // 处理每个单词,检查是否需要高亮
219 255
       for(let j=0; j<words.length; j++){
220 256
         let word = words[j];
257
+        // 检查是否是单独的破折号
258
+        let isDash = /^[—\-–—]$/.test(word);
221 259
         let originalWord = word.replace(/[.,!?;:"'()—\-–—_]/g, ''); // 去除标点符号和特殊字符(包括各种破折号)
222 260
         let isHighlighted = false;
223 261
         
@@ -242,7 +280,7 @@ Page({
242 280
     }
243 281
 
244 282
     for(let i=0;i<content.Question.length;i++){
245
-      console.log("i:"+i);
283
+      //console.log("i:"+i);
246 284
       for(let j=0;j<content.Question[i].OptionsEnglish.length;j++){
247 285
 
248 286
         content.Question[i].OptionsEnglish[j] = content.Question[i].OptionsEnglish[j].replace(/(^|[,.]\s+)'([^']+)'/g, '$1"$2"');
@@ -256,12 +294,13 @@ Page({
256 294
       content.Question[i].AnswerNumber=asciiCode-65;
257 295
       content.Question[i].IsShowAnswer=false;
258 296
     }
297
+    // 在设置数据前,确保所有@DOT@都被替换回.
298
+    that.replaceAllDOTMarkers(content);
299
+    
259 300
     that.setData({
260 301
       Content:content,
261 302
     });
262
-    setTimeout(function(){
263
-      that.updateReadCount(that.data.ID);
264
-    },3000);
303
+    
265 304
   },
266 305
   setTheme:function(){
267 306
     let that=this;
@@ -358,26 +397,7 @@ Page({
358 397
     });
359 398
     console.log(e.detail.current);
360 399
   },
361
-
362
-  onContainerTap: function() {
363
-    const currentTime = new Date().getTime();
364
-    const lastTapTime = this.data.lastTapTime;
365
-    const timeDiff = currentTime - lastTapTime;
366
-    
367
-    // 如果两次点击的时间间隔小于300毫秒,则认为是双击
368
-    if (timeDiff < 300 && timeDiff > 0) {
369
-      console.log('双击事件触发');
370
-      // 在这里添加双击事件的处理逻辑
371
-      // 例如:切换翻译显示状态
372
-      this.showData({currentTarget:{dataset:{name:"IsShowTranslate"}}});
373
-    }
374
-    
375
-    // 更新上一次点击的时间
376
-    this.setData({
377
-      lastTapTime: currentTime
378
-    });
379
-  },
380
-    //生成PDF文件
400
+  //生成PDF文件
381 401
   //访问服务器的GeneratePDF接口,提交this.data.Content数据,获得一个生成好的pdf文件,服务端的代码已经生成好
382 402
   generatePDF: function(e) {
383 403
     let that = this;
@@ -455,7 +475,14 @@ Page({
455 475
       wx.navigateBack({
456 476
         delta: 1,
457 477
       });
478
+      //判断用户是否离开
479
+      this.setData({
480
+        IsNew:false,
481
+      });
458 482
     } 
483
+    this.setData({
484
+      IsBuildQueue:false,
485
+    });
459 486
   },
460 487
   onLongPress: function(e) {
461 488
     let that = this;
@@ -480,10 +507,8 @@ Page({
480 507
     this.setData({
481 508
       EnglishSentence:engSentence,
482 509
       ChineseSentence:chnSentence,
483
-    });
484
-    // 使用动画工具函数显示弹窗,并指定显示动画
485
-    animation.toggleRemindWithAnimation(this, {
486
-      showAnimation: 'remind-slide-up'
510
+      IsShowWordTranslate:true,
511
+      TranslateHeight:240,
487 512
     });
488 513
   },
489 514
   selectWord:function(e){
@@ -495,14 +520,79 @@ Page({
495 520
     console.log("点击的单词:", originalWord);
496 521
     that.playAudio(originalWord);
497 522
     
523
+    let b=false;
498 524
     if (css){
499 525
       let list=that.data.Content.FormsOfWords;
500 526
       for(let i=0;i<list.length;i++){
501
-        if(list[i].toLowerCase() == originalWord.toLowerCase()){
502
-          console.log(that.data.Content.FormsOfWordsChinese[i]);
527
+        if(list[i].toLowerCase() == originalWord.toLowerCase() && that.data.Content.FormsOfWordsChinese && that.data.Content.FormsOfWordsChinese[i]){
528
+          let wordChinese=that.data.Content.FormsOfWordsChinese[i];
529
+          // 直接更新翻译内容,不改变IsShowWordTranslate状态(如果已经是true)
530
+          let updateData = {
531
+            EnglishSentence: originalWord,
532
+            ChineseSentence: wordChinese,
533
+          };
534
+          //debugger;
535
+          // 只有当当前不显示翻译时,才设置IsShowWordTranslate为true
536
+          if (!that.data.IsShowWordTranslate) {
537
+            updateData.IsShowWordTranslate = true;
538
+          }
539
+          updateData.TranslateHeight=100;
540
+          that.setData(updateData);
541
+          b=true;
542
+          break;
503 543
         }
504 544
       }
505 545
     }
546
+    if (!b){
547
+      that.getWordChinese(originalWord,function(wordTarget){
548
+        // 准备更新数据
549
+        let updateData = {};
550
+        updateData.TranslateHeight=100;
551
+        if (wordTarget){
552
+          updateData.EnglishSentence = wordTarget.Word;
553
+          updateData.ChineseSentence = wordTarget.Translate;
554
+        }
555
+        else{
556
+          updateData.EnglishSentence = originalWord;
557
+          updateData.ChineseSentence = "";
558
+        }
559
+        // 只有当当前不显示翻译时,才设置IsShowWordTranslate为true
560
+        if (!that.data.IsShowWordTranslate) {
561
+          updateData.IsShowWordTranslate = true;
562
+        }
563
+        that.setData(updateData);
564
+      });
565
+    }
566
+    that.setData({
567
+      IsCollect:false,
568
+    });
569
+    app.globalData.UserCollect.filter(function (item) {
570
+      if (item.Word==originalWord){
571
+        that.setData({
572
+          IsCollect:true,
573
+        });
574
+      }
575
+    });
576
+  },
577
+  getWordChinese:function(word,callback){
578
+    let that=this;
579
+    main.getData('GetWordChinese?UserID=' + app.globalData.userInfo.UserID+'&Word='+word+'&Level='+that.data.Level, function (data) {
580
+      if (data) {
581
+        callback(data);
582
+      }
583
+      else
584
+        callback();
585
+    });
586
+  },
587
+  saveUserCollect:function(e){
588
+    let that=this;
589
+    let word=e.currentTarget.dataset.word;
590
+    main.getData('AddOrDeleteYJBDCUserCollect?UserID='+app.globalData.userInfo.UserID+'&Word='+word, function (data) {
591
+      that.setData({
592
+        IsCollect:!that.data.IsCollect,
593
+      });
594
+      app.globalData.UserCollect=data;
595
+    });
506 596
   },
507 597
   playAudio: function (word) {
508 598
     var url = app.globalData.audioUrlBaidu;
@@ -511,11 +601,14 @@ Page({
511 601
     this.audioCtx.setSrc(url);
512 602
     this.audioCtx.play();
513 603
   },
514
-  showRemind:function(e){
515
-    animation.toggleRemindWithAnimation(this, {
516
-      showAnimation: 'remind-slide-down'
604
+  hideWordTranslate: function() {
605
+    console.log("IsShowWordTranslate:false");
606
+    // 点击空白处时隐藏单词翻译
607
+    this.setData({
608
+      IsShowWordTranslate: false
517 609
     });
518 610
   },
611
+  
519 612
   goto: function (e) {
520 613
     let that=this;
521 614
     var url=e.currentTarget.dataset.url;
@@ -523,6 +616,40 @@ Page({
523 616
       url: url,
524 617
     });
525 618
   },
619
+  // 替换Content对象中所有的@DOT@标记为.
620
+  replaceAllDOTMarkers: function(obj) {
621
+    if (!obj) return;
622
+    
623
+    // 如果是字符串,直接替换
624
+    if (typeof obj === 'string') {
625
+      return obj.replace(/@DOT@/g, '.');
626
+    }
627
+    
628
+    // 如果是数组,递归处理每个元素
629
+    if (Array.isArray(obj)) {
630
+      for (let i = 0; i < obj.length; i++) {
631
+        if (typeof obj[i] === 'string') {
632
+          obj[i] = obj[i].replace(/@DOT@/g, '.');
633
+        } else if (typeof obj[i] === 'object' && obj[i] !== null) {
634
+          this.replaceAllDOTMarkers(obj[i]);
635
+        }
636
+      }
637
+      return;
638
+    }
639
+    
640
+    // 如果是对象,递归处理每个属性
641
+    if (typeof obj === 'object') {
642
+      for (let key in obj) {
643
+        if (obj.hasOwnProperty(key)) {
644
+          if (typeof obj[key] === 'string') {
645
+            obj[key] = obj[key].replace(/@DOT@/g, '.');
646
+          } else if (typeof obj[key] === 'object' && obj[key] !== null) {
647
+            this.replaceAllDOTMarkers(obj[key]);
648
+          }
649
+        }
650
+      }
651
+    }
652
+  },
526 653
   catchTouchMove: main.catchTouchMove,
527 654
   onShareAppMessage: function () {
528 655
     return {

+ 25 - 22
pages/main/article.wxml

@@ -1,14 +1,14 @@
1 1
 <block wx:if="{{!IsBuilding && !IsBuildError}}">
2 2
 <!-- 正常文章 -->
3
-<view class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
3
+<view class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;' catch:tap="hideWordTranslate">
4 4
   <view id="panelArticle" style="width: 100%;height: 1rpx;"></view>
5 5
   <view class="panel1 FlexColumn">
6 6
     <!-- 完整文章 -->
7
-    <text class="textArticle" wx:if="{{!IsShowTranslate}}" >
8
-      <text bindlongpress="onLongPress" data-strtype="article" data-index="{{index}}" wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" >
9
-        <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" bind:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
10
-      </text>
11
-    </text>
7
+        <text class="textArticle" wx:if="{{!IsShowTranslate}}" >
8
+          <text bindlongpress="onLongPress" data-strtype="article" data-index="{{index}}" wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" >
9
+            <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectWord" data-word="{{itemChild.Sentence}}" data-original-word="{{itemChild.OriginalWord}}" data-css="{{itemChild.CSS}}">{{itemChild.Sentence}} </text>
10
+          </text>
11
+        </text>
12 12
     <!-- 有翻译文章 -->
13 13
     <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
14 14
       <view wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" class="textArticle">
@@ -19,6 +19,7 @@
19 19
     </view>
20 20
   </view>
21 21
   <view style="width: 100%;height:700rpx;" wx:if="{{IsShowQuestion}}"></view>
22
+  <view style="width: 100%;height:{{TranslateHeight}}rpx;" wx:if="{{IsShowWordTranslate}}"></view>
22 23
   
23 24
   <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
24 25
     <view class="panelFooter1 FlexRow">
@@ -104,21 +105,12 @@
104 105
 </view>
105 106
 
106 107
 <!-- 翻译 -->
107
-<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{remindAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
108
-  <view class="panelRemind FlexColumn">
109
-    <image src="../images/sysIcon_b17.png" class="sysIcon_b10"></image>
110
-      
111
-    <view class="panelRemind1 FlexRow">
112
-      <image src="../images/sysIcon_b18.png" class="sysIcon_b09"></image>
113
-      <view>中英对照</view>
114
-    </view>
115
-    <view class="panelRemind2 FlexColumn">
116
-      <view class="textRemind FlexColumn">
117
-        <text>{{EnglishSentence}}</text>
118
-        <text class="textRemind2">{{ChineseSentence}}</text>
119
-      </view>
120
-      <view class="btnReind1 FlexColumn" catch:tap="showRemind">关闭</view>
121
-    </view>
108
+<view wx:if="{{IsShowWordTranslate}}"  class="panelTranslate FlexColumn" catch:tap="setDataBoolean" data-name="IsShowWordTranslate">
109
+  <text class="panelTranslateTest1">{{EnglishSentence}}</text>
110
+  <text class="panelTranslateTest2">{{ChineseSentence}}</text>
111
+  <view class="panelTranslateCollect FlexColumn" wx:if="{{TranslateHeight==100}}" catch:tap="saveUserCollect" data-word="{{EnglishSentence}}">
112
+    <image wx:if="{{!IsCollect}}" src="../images/sysIcon_a35.png" class="sysIcon_a35"></image>
113
+    <image wx:if="{{IsCollect}}" src="../images/sysIcon_a36.png" class="sysIcon_a35"></image>
122 114
   </view>
123 115
 </view>
124 116
 
@@ -145,7 +137,18 @@
145 137
     <image  wx:if="{{ThemeCSS=='DarkColor'}}"  src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
146 138
     <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
147 139
     <view class="textError1">抱歉,生成失败</view>
148
-    <view class="textError2">可能网络不畅或使用了不适合的单词</view>
140
+    <view class="textError2">可能生成过于频繁、网络不畅或使用了不适合的单词,请稍候再试。</view>
141
+  </view>
142
+</view>
143
+
144
+
145
+<!-- 显示生成排队中 -->
146
+<view wx:if="{{IsBuildQueue}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
147
+  <view class="{{ThemeCSS}} panelError FlexColumn">
148
+    <image  wx:if="{{ThemeCSS=='DarkColor'}}"  src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
149
+    <image  wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
150
+    <view class="textError1">抱歉,生成排队中</view>
151
+    <view class="textError2">生成文章已加入队列,等待处理,请稍候</view>
149 152
   </view>
150 153
 </view>
151 154
 

+ 27 - 49
pages/main/article.wxss

@@ -212,6 +212,7 @@ pages .LightColor{
212 212
   margin-bottom: 50rpx;
213 213
 }
214 214
 .textError2{
215
+  width: 500rpx;
215 216
   font-weight: 400;
216 217
   font-size: 24rpx;
217 218
   margin-top: 10rpx;
@@ -570,65 +571,42 @@ pages .LightColor{
570 571
 }
571 572
 
572 573
 /* 翻译 */
573
-
574
-.panelRemind{
575
-  width: 690rpx;
576
-  margin-bottom: 75rpx;
574
+.panelTranslate{
575
+  width: 710rpx;
576
+  min-height:170rpx;
577
+  z-index: 30;
577 578
   position: fixed;
578
-  bottom: 0;
579
-  background: #259D57;
580
-  box-shadow: 0 20rpx 0 0 #196F3D, 0 50rpx 0 0 rgba(0,0,0,0.50);
581
-  border-radius: 60rpx;
582
-}
583
-.sysIcon_b10{
584
-  width: 360rpx;
585
-  height:140rpx;
586
-  position: absolute;
587
-  right:0;
588
-  top:-22rpx;
589
-}
590
-.panelRemind1{
591
-  width: 100%;
592
-  justify-content: flex-start;
593
-  margin-top: 40rpx;
594
-  font-size: 36rpx;
595
-  color: #FFFFFF;
596
-  z-index: 25rpx;
597
-}
598
-.sysIcon_b09{
599
-  width: 50rpx;
600
-  height:50rpx;
601
-  margin: 0 20rpx 0 50rpx ;
602
-}
603
-.panelRemind2{
604
-  width: 650rpx;
605
-  min-height:220rpx;
606
-  background: #FFFFFF;
607
-  color: #2E2E2E;
579
+  bottom: 50rpx;
580
+  left:20rpx;
581
+  background: #F0F0F0;
582
+  box-shadow: 0 30rpx 0 0 rgba(0,0,0,0.50);
608 583
   border-radius: 40rpx;
609
-  margin: 30rpx 0;
584
+  align-items: flex-start;
610 585
   justify-content: flex-start;
586
+  color: #2E2E2E;
611 587
 }
612
-.textRemind{
613
-  width:570rpx;
614
-  font-weight: 400;
588
+.panelTranslateTest1{
589
+  width: 630rpx;
590
+  margin: 30rpx 0 0 40rpx;
615 591
   font-size: 28rpx;
616
-  align-items: flex-start;
617
-  margin-top: 80rpx;
592
+  font-weight: 700;
618 593
 }
619
-.textRemind2{
620
-  margin-top: 30rpx;
594
+.panelTranslateTest2{
595
+  width: 630rpx;
596
+  margin: 20rpx 0 30rpx 40rpx;
621 597
   font-size: 36rpx;
622 598
   font-weight: 400;
623 599
 }
624
-.btnReind1{
625
-  width:590rpx;
600
+.panelTranslateCollect{
601
+  width:100rpx;
626 602
   height:90rpx;
627
-  background: #F0F0F0;
628
-  border-radius: 20rpx;
629
-  font-size: 36rpx;
630
-  margin-top: 60rpx;
631
-  margin-bottom: 40rpx;
603
+  position: absolute;
604
+  top:0;
605
+  right:0;
606
+}
607
+.sysIcon_a35{
608
+  width: 30rpx;
609
+  height:30rpx;
632 610
 }
633 611
 
634 612
 /* 生成中 */

+ 9 - 1
pages/main/index.js

@@ -9,7 +9,6 @@ Page({
9 9
   behaviors: [commonBehavior],
10 10
   data: {
11 11
     IsShowRemind:false,
12
-    remindAnimation: "",
13 12
     IsIPhoneX:app.globalData.IsIPhoneX,
14 13
   },
15 14
   onLoad: function (options) {
@@ -41,6 +40,8 @@ Page({
41 40
     }
42 41
 
43 42
     that.getBaiduToken();
43
+
44
+    that.initUserCollect();
44 45
     
45 46
   },
46 47
   onShow:function(){
@@ -97,6 +98,7 @@ Page({
97 98
           MaxCount:data.MaxCount,
98 99
           UnReadCount:data.UnReadCount,
99 100
         });
101
+        app.globalData.UnReadCount=data.UnReadCount;
100 102
       }
101 103
     });
102 104
   },
@@ -117,6 +119,12 @@ Page({
117 119
       app.globalData.GenerateConfig=data;
118 120
     });
119 121
   },
122
+  initUserCollect:function(){
123
+    let that = this;
124
+    main.getData('GetYJBDCUserCollect?UserID=' + app.globalData.userInfo.UserID, function (data) {
125
+      app.globalData.UserCollect=data;
126
+    });
127
+  },
120 128
   catchTouchMove: main.catchTouchMove,
121 129
   getBaiduToken: function () {
122 130
     var that = this;

+ 3 - 3
pages/main/index.wxml

@@ -9,7 +9,7 @@
9 9
       <view id="txtWordsInput" class="btn01 FlexColumn" bind:tap="goto" data-url="wordsinput">
10 10
         <view>制作</view>
11 11
       </view>
12
-      <view class="btn02 FlexColumn" bind:tap="goto" data-url="myarticles">
12
+      <view class="btn02 FlexColumn" bind:tap="goto" data-url="myinfo">
13 13
         <view>我的文库</view>
14 14
         <view class="btn021 FlexColumn" wx:if="{{UnReadCount>0}}">未读</view>
15 15
       </view>
@@ -52,8 +52,8 @@
52 52
   </view>
53 53
 </view>
54 54
 
55
-<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{remindAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
56
-  <view class="panelRemind FlexColumn">
55
+<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{parentAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
56
+  <view class="panelRemind {{panelAnimation}} FlexColumn">
57 57
     <image src="../images/sysIcon_b10.png" class="sysIcon_b10"></image>
58 58
       
59 59
     <view class="panelRemind1 FlexRow">

+ 2 - 2
pages/main/index.wxss

@@ -192,12 +192,12 @@
192 192
 
193 193
 .pic_02{
194 194
   width:100%;
195
-  height:280rpx;
195
+  height:230rpx;
196 196
 }
197 197
 
198 198
 .text03{
199 199
   position: absolute;
200
-  top:220rpx;
200
+  top:186rpx;
201 201
   left:50rpx;
202 202
   font-size: 20rpx;
203 203
   color: #544641;

+ 17 - 4
pages/main/myarticles.js

@@ -44,10 +44,14 @@ Page({
44 44
       if (data) {
45 45
         if (!pageID)
46 46
           that.data.List=[];
47
+        app.globalData.UnReadCount=0;
47 48
         for(let i=0;i<data.length;i++){
48 49
             let item=data[i];
49 50
             item.WordsStr=item.Words.split(",").join(" ");
50 51
             that.data.List.push(item);
52
+            if (item.ReadCount==0){
53
+              app.globalData.UnReadCount++;
54
+            }
51 55
         }
52 56
         let isShowMore=true;
53 57
         if (that.data.List[0].RowsCount==that.data.List.length)
@@ -87,15 +91,24 @@ Page({
87 91
     })
88 92
   },
89 93
   deleteArticle:function(e){
90
-    animation.toggleRemindWithAnimation(this);
91
-    this.setData({
92
-      ID:e.currentTarget.dataset.id
94
+    let that=this;
95
+    that.setData({
96
+      ID:e.currentTarget.dataset.id,
97
+    });
98
+    animation.toggleRemindWithAnimation(this, {
99
+      hideColor: 'rgba(0,0,0,0)',
100
+      showColor: 'rgba(277,277,277,0.5)',
101
+      panelAnimationKey: 'panelAnimation', // 控制内容面板的动画
102
+      animationKey: 'parentAnimation' // 控制父容器的动画(如果需要)
93 103
     });
94 104
   },
95 105
   showRemind:function(e){
96 106
     let that=this;
97 107
     const confirm=e.currentTarget.dataset.confirm;
98
-    animation.toggleRemindWithAnimation(this);
108
+    animation.toggleRemindWithAnimation(this, {
109
+      hideColor: 'rgba(0,0,0,0)',
110
+      showColor: 'rgba(277,277,277,0.5)'
111
+    });
99 112
     if (confirm=="1") {
100 113
       main.getData('DeleteYJBDCArticleList?UserID=' + that.data.UserID+"&ID="+that.data.ID, function (data) {
101 114
          wx.showToast({

+ 4 - 2
pages/main/myarticles.json

@@ -1,4 +1,6 @@
1 1
 {
2
-  "navigationBarTitleText": "我的文库",
3
-  "usingComponents": {}
2
+  "navigationBarTitleText": "文章",
3
+  "navigationBarBackgroundColor": "#E3E3E3",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#E3E3E3"
4 6
 }

+ 5 - 5
pages/main/myarticles.wxml

@@ -2,7 +2,7 @@
2 2
   <view style="height: 50rpx;width: 100%;" bind:tap="setGotoID"></view>
3 3
   <view class="panelNull FlexColumn" wx:if="{{List.length==0}}">
4 4
     <view>无内容</view>
5
-    <view class="textNull1">请先前往首页制作文</view>
5
+    <view class="textNull1">请先前往首页制作文</view>
6 6
   </view>
7 7
   <block wx:if="{{List.length>0}}">
8 8
     <view class="panel1 FlexColumn" wx:for="{{List}}" wx:key="index">
@@ -26,9 +26,9 @@
26 26
       
27 27
       <view class="panelBtn FlexRow">
28 28
         <view class="btn1" bind:tap="setClipboard" data-words="{{item.Words}}">重新生成</view>
29
-        <image src="../images/sysIcon_a13.png" class="sysIcon_a13"></image>
29
+        <image src="../images/sysIcon_a38.png" class="sysIcon_a13"></image>
30 30
         <view class="btn2 FlexRow" bind:tap="deleteArticle" data-id="{{item.ID}}">
31
-          <image src="../images/sysIcon_a14.png" class="sysIcon_a14"></image>
31
+          <image src="../images/sysIcon_a39.png" class="sysIcon_a14"></image>
32 32
         </view>
33 33
       </view>
34 34
     </view>
@@ -39,8 +39,8 @@
39 39
 </view>
40 40
 
41 41
 
42
-<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{remindAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
43
-  <view class="panelRemind FlexColumn">
42
+<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{parentAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;{{VectorCSS}}'>
43
+  <view class="panelRemind {{panelAnimation}} FlexColumn">
44 44
     <image src="../images/sysIcon_b13.png" class="sysIcon_b10"></image>
45 45
       
46 46
     <view class="panelRemind1 FlexRow">

+ 16 - 12
pages/main/myarticles.wxss

@@ -1,7 +1,10 @@
1
+.container{
2
+  background: #E3E3E3;
3
+  color: #4D4D4D;
4
+}
1 5
 .panelNull{
2 6
   margin-top: 410rpx;
3 7
   font-size: 28rpx;
4
-  color: #C1E1C1;
5 8
 }
6 9
 .textNull1{
7 10
   font-weight: 400;
@@ -10,10 +13,9 @@
10 13
 }
11 14
 .panel1{
12 15
   width:710rpx;
13
-  background: #1E1E1E;
16
+  background: #FFF;
14 17
   border-radius: 20rpx;
15 18
   margin-bottom: 20rpx;
16
-  color: #C1E1C1;
17 19
   position: relative;
18 20
 }
19 21
 .panel10{
@@ -27,9 +29,9 @@
27 29
 .panel131{
28 30
   width: 88rpx;
29 31
   height:53rpx;
30
-  background: #C1E1C1;
32
+  background: #009933;
31 33
   border-radius: 10rpx;
32
-  color:#004433;
34
+  color:#fff;
33 35
   font-size: 24rpx;
34 36
   margin-right: 20rpx;
35 37
 }
@@ -45,14 +47,14 @@
45 47
 .panelLine{
46 48
   width: 5rpx;
47 49
   height: 83rpx;
48
-  background-color: #C1E1C1;
50
+  background-color: #009933;
49 51
   margin: 0 25rpx 0 30rpx;
50 52
 }
51 53
 .panel111{
52 54
   align-items: flex-start;
53 55
 }
54 56
 .text02{
55
-  font-weight: 400;
57
+  font-weight: 700;
56 58
   font-size: 24rpx;
57 59
 }
58 60
 .text03{
@@ -63,7 +65,7 @@
63 65
 }
64 66
 .panel12{
65 67
   width: 670rpx;
66
-  background: #002F24;
68
+  background: #F2F2F2;
67 69
   border-radius: 10rpx;
68 70
   margin: 0 0 20rpx 0;
69 71
 }
@@ -72,6 +74,7 @@
72 74
   font-size: 28rpx;
73 75
   width: 610rpx;
74 76
   margin: 20rpx 0;
77
+  color:#787878;
75 78
 }
76 79
 .text05{
77 80
   margin-right: 20rpx;
@@ -79,7 +82,7 @@
79 82
 
80 83
 .panelBtn{
81 84
   border-radius: 10rpx;
82
-  background-color: #002F24;
85
+  background-color: #F2F2F2;
83 86
   position: absolute;
84 87
   top:20rpx;
85 88
   right:20rpx;
@@ -88,7 +91,7 @@
88 91
   width:154rpx;
89 92
   line-height:53rpx;
90 93
   font-size: 24rpx;
91
-  color: #FFFFFF;
94
+  color: #2E2E2E;
92 95
   text-align: center;
93 96
 }
94 97
 
@@ -109,13 +112,14 @@
109 112
 .panelPage{
110 113
   width:710rpx;
111 114
   height:100rpx;
112
-  background: #002F24;
115
+  background: #fff;
113 116
   border-radius: 20rpx;
114 117
   font-size: 28rpx;
115
-  color: #C1E1C1;
118
+  color: #2e2e2e;
116 119
 }
117 120
 .panelPage2{
118 121
   background:none;
122
+  color:#4D4D4D;
119 123
 }
120 124
 
121 125
 .panelMenu{

+ 34 - 0
pages/main/myinfo.js

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

+ 6 - 0
pages/main/myinfo.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "我的文库",
3
+  "navigationBarBackgroundColor": "#E3E3E3",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#E3E3E3"
6
+}

+ 17 - 0
pages/main/myinfo.wxml

@@ -0,0 +1,17 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view style="height: 50rpx;"></view>
3
+  <view class="panel1 FlexRow" bind:tap="goto" data-url="myarticles">
4
+    <view class="panel1Left">文章</view>
5
+    <view class="panel1Right FlexRow">
6
+      <view class="btn FlexRow" wx:if="{{UnReadCount>0}}">未读</view>
7
+      <image src="../images/sysIcon_a37.png" class="sysIcon_a37"></image>
8
+    </view>
9
+  </view>
10
+  <view class="panel1 FlexRow" bind:tap="goto" data-url="mywords">
11
+    <view class="panel1Left">单词收藏</view>
12
+    <view class="panel1Right">
13
+      <image src="../images/sysIcon_a37.png" class="sysIcon_a37"></image>
14
+    </view>
15
+  </view>
16
+  <view style="height: 100rpx;"></view>
17
+</view>

+ 37 - 0
pages/main/myinfo.wxss

@@ -0,0 +1,37 @@
1
+.container {
2
+  background: #E3E3E3;
3
+  color: #4D4D4D;
4
+}
5
+
6
+.panel1 {
7
+  width: 690rpx;
8
+  height: 100rpx;
9
+  background: #FFF;
10
+  border-radius: 20rpx;
11
+  margin-bottom: 30rpx;
12
+  justify-content: space-between;
13
+  color: #2E2E2E;
14
+}
15
+
16
+.panel1Left {
17
+  font-weight: 400;
18
+  font-size: 28rpx;
19
+  margin-left: 30rpx;
20
+}
21
+.panel1Right {
22
+  margin-right: 30rpx;
23
+  justify-content: flex-end;
24
+}
25
+.btn{
26
+  width: 88rpx;
27
+  height:53rpx;
28
+  background: #009933;
29
+  border-radius: 10rpx;
30
+  color:#fff;
31
+  font-size: 24rpx;
32
+  margin-right: 30rpx;
33
+}
34
+.sysIcon_a37{
35
+  width: 16rpx;
36
+  height:26rpx;
37
+}

+ 89 - 0
pages/main/mywords.js

@@ -0,0 +1,89 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+const app = getApp();
4
+
5
+Page({
6
+  data: {
7
+    IsShowSelect:false,
8
+    Sort1:"panel112",
9
+    Sort2:"",
10
+  },
11
+  onLoad: function (options) {
12
+    let that = this;
13
+    that.setData({
14
+      Containnerheight: main.getWindowHeight(),
15
+      List:app.globalData.UserCollect,
16
+      Count:0,
17
+    });
18
+  },
19
+  sortWord:function(e){
20
+    let isSort=e.currentTarget.dataset.issort;
21
+    let list=[];
22
+    let sort1="",sort2="";
23
+    if (isSort=="1"){
24
+      list=common.sort(this.data.List,"ASC","Word","String");
25
+      sort1="";
26
+      sort2="panel112";
27
+    }
28
+    else{
29
+      list=common.sort(this.data.List,"DESC","ID","Number");
30
+      sort1="panel112";
31
+      sort2="";
32
+    }
33
+    //debugger;
34
+    this.setData({
35
+      List:list,
36
+      Sort1:sort1,
37
+      Sort2:sort2,
38
+    });
39
+  },
40
+  selecItem:function(e){
41
+    let index=e.currentTarget.dataset.index;
42
+    let list=this.data.List;
43
+    
44
+    for(let i=0;i<list.length;i++){
45
+      if (index=="all")
46
+        list[i].Selected=1;
47
+      else if (index==i) 
48
+        list[i].Selected=list[i].Selected==1?0:1;
49
+    }
50
+
51
+    let count=0;
52
+    for(let i=0;i<list.length;i++){
53
+      if (list[i].Selected==1)
54
+        count++;
55
+    }
56
+    
57
+    this.setData({
58
+      List:list,
59
+      Count:count, 
60
+    });
61
+  },
62
+  setDataBoolean:function(e){
63
+    if (this.data.IsShowSelect){
64
+      let list=this.data.List;
65
+      for(let i=0;i<list.length;i++)
66
+        list[i].Selected=0;
67
+      this.setData({
68
+        List:list,
69
+      });
70
+    }
71
+    this.setData({
72
+      IsShowSelect:!this.data.IsShowSelect,
73
+    });
74
+  },
75
+  goto: function (e) {
76
+    let that=this;
77
+    var url=e.currentTarget.dataset.url;
78
+    wx.navigateTo({
79
+      url: url,
80
+    });
81
+  },
82
+  onShareAppMessage: function () {
83
+    return {
84
+      title: app.globalData.ShareTitle,
85
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
86
+      imageUrl: app.globalData.ShareImage,
87
+    }
88
+  },
89
+})

+ 8 - 0
pages/main/mywords.json

@@ -0,0 +1,8 @@
1
+{
2
+  "navigationBarTitleText": "单词收藏",
3
+  "navigationBarBackgroundColor": "#E3E3E3",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColorTop":"#E3E3E3",
6
+  "backgroundColorBottom":"#E3E3E3",
7
+  "backgroundColor": "#E3E3E3"
8
+}

+ 52 - 0
pages/main/mywords.wxml

@@ -0,0 +1,52 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexRow">
3
+    <view wx:if="{{IsShowSelect}}" class="panel12 panel13 FlexRow" bind:tap="selecItem" data-index="all">全选</view>
4
+    <view class="panel11 FlexRow">
5
+      <view class="panel111 {{Sort1}} FlexRow" bind:tap="sortWord" data-issort="0">时间</view>
6
+      <view class="panel111 {{Sort2}} FlexRow" bind:tap="sortWord" data-issort="1">A - Z</view>
7
+    </view>
8
+    <view wx:if="{{!IsShowSelect}}" class="panel12 FlexRow" bind:tap="setDataBoolean" data-name="IsShowSelect">多选</view>
9
+    <view wx:if="{{IsShowSelect}}" class="panel12 FlexRow" bind:tap="setDataBoolean" data-name="IsShowSelect">取消</view>
10
+  </view>
11
+
12
+  <view class="panel2 FlexColumn">
13
+    <view style="height: 20rpx;"></view>
14
+    <view class="panel2Item FlexRow" wx:for="{{List}}" wx:key="index" bind:tap="selecItem" data-index="{{index}}">
15
+      <view class="panel2ItemSelect FlexRow" wx:if="{{IsShowSelect}}">
16
+        <view class="panel2ItemSelectNo" wx:if="{{!item.Selected}}" ></view>
17
+        <view class="panel2ItemSelectNo panel2ItemSelected FlexRow"  wx:if="{{item.Selected}}">
18
+          <image src="../images/sysIcon_a11.png" class="sysIcon_a11"></image>
19
+        </view>
20
+      </view>
21
+      <view class="panel2ItemLeft">{{item.Word}}</view>
22
+      <view class="panel2ItemRight FlexRow" wx:if="{{!IsShowSelect}}">
23
+        <view class="panel2ItemRight1 FlexRow">
24
+          <image src="../images/sysIcon_a39.png" class="sysIcon_a39"></image>
25
+        </view>
26
+      </view>
27
+    </view>
28
+  </view>
29
+
30
+  <view style="height: 150rpx;" hidden="{{!IsShowSelect}}"></view>
31
+
32
+  <view class="panelFooter FlexRow" wx:if="{{IsShowSelect}}">
33
+    <view class="panelFooter1 FlexRow">
34
+      <view class="panelFooter11 panelFooter10 FlexColumn" bindtap="" >
35
+        <view class="text03">{{Count}}</view>
36
+        <view class="text02">已选</view>
37
+      </view>
38
+      <view class="panelFooter12 panelFooter10 FlexColumn" bindtap="" >
39
+        <image src="../images/sysIcon_a14.png" class="sysIcon_a14"></image>
40
+        <view class="text02">删除</view>
41
+      </view>
42
+      <view class="panelFooter12 panelFooter10 FlexColumn" bindtap="" >
43
+        <image src="../images/sysIcon_a40.png" class="sysIcon_a14"></image>
44
+        <view class="text02">生成文章</view>
45
+      </view>
46
+      <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="">
47
+        <image src="../images/sysIcon_a41.png" class="sysIcon_a14"></image>
48
+        <view class="text02">导到秒过</view>
49
+      </view>
50
+    </view>
51
+  </view>
52
+</view>

+ 165 - 0
pages/main/mywords.wxss

@@ -0,0 +1,165 @@
1
+.container {
2
+  background: #E3E3E3;
3
+  color: #4D4D4D;
4
+}
5
+
6
+.panel1 {
7
+  width: 100%;
8
+  height:100rpx;
9
+  position: relative;
10
+}
11
+.panel11{
12
+  width: 290rpx;
13
+  height: 60rpx;
14
+  background: #4D4D4D;
15
+  border-radius: 10rpx;
16
+  color:#f0f0f0;
17
+  font-size:28rpx;
18
+}
19
+.panel111{
20
+  width: 140rpx;
21
+  height:50rpx;
22
+}
23
+.panel112{
24
+  background: #FFFFFF;
25
+  box-shadow: 0 4rpx 0 0 rgba(0,0,0,0.20);
26
+  border-radius: 5rpx;
27
+  color:#4D4D4D;
28
+}
29
+.panel12{
30
+  position: absolute;
31
+  right:30rpx;
32
+  top:20rpx;
33
+  width: 110rpx;
34
+  height:50rpx;
35
+  background: #F8F8F8;
36
+  border: 5rpx solid #4D4D4D;
37
+  border-radius: 10rpx;
38
+  font-size: 28rpx;
39
+  color: #4D4D4D;
40
+}
41
+
42
+.panel13{
43
+  left:30rpx;
44
+}
45
+.panel2{
46
+  width: 690rpx;
47
+  border-radius: 20rpx;
48
+  min-height: 100rpx;
49
+  background-color: #fff;
50
+  margin: 30rpx 0 100rpx 0;
51
+}
52
+.panel2Item{
53
+  width: 610rpx;
54
+  height:100rpx;
55
+  justify-content: space-between;
56
+}
57
+.panel2ItemLeft{
58
+  width: 580rpx;
59
+  line-height:100rpx;
60
+  text-align: left;
61
+  font-weight: 400;
62
+  border-bottom: 1rpx solid #E3E3E3;
63
+}
64
+.panel2ItemRight{
65
+  width: 110rpx;
66
+  margin-right: -40rpx;
67
+  justify-content: flex-start;
68
+}
69
+
70
+.panel2ItemRight1{
71
+  width: 70rpx;
72
+  height:100rpx;
73
+  justify-content: flex-end;
74
+  border-bottom: 1rpx solid #E3E3E3;
75
+}
76
+.sysIcon_a39{
77
+  width: 20rpx;
78
+  height: 22rpx;
79
+  margin-right:20rpx;
80
+}
81
+
82
+.panel2ItemSelect{
83
+  width:100rpx;
84
+  margin-left: -40rpx;
85
+}
86
+
87
+.panel2ItemSelectNo{
88
+  width: 34rpx;
89
+  height: 34rpx;
90
+  background: #F8F8F8;
91
+  border: 3rpx solid #787878;
92
+  border-radius: 50%;
93
+  margin-left: 10rpx;
94
+}
95
+
96
+.panel2ItemSelectNo{
97
+  width: 34rpx;
98
+  height: 34rpx;
99
+  background: #F8F8F8;
100
+  border: 3rpx solid #787878;
101
+  border-radius: 50%;
102
+  margin-left: 10rpx;
103
+}
104
+
105
+.panel2ItemSelected{
106
+  background: #009933;
107
+  border: 3rpx solid #009933;
108
+}
109
+
110
+.sysIcon_a11{
111
+  width: 20rpx;
112
+  height: 16rpx;
113
+}
114
+
115
+
116
+.panelFooter{
117
+  width: 100%;
118
+  height:180rpx;
119
+  background-image: linear-gradient(180deg, #004433 0%, #002C21 100%);
120
+  position: fixed;
121
+  bottom: 0rpx;
122
+  align-items: flex-start;
123
+  z-index: 10;
124
+}
125
+
126
+.panelFooter1{
127
+  width:730rpx;
128
+  height:140rpx;
129
+  color:#F2F2F2;
130
+  background: #1E1E1E;
131
+  box-shadow: 0 30rpx 0 0 #0C0C0C;
132
+  border-radius: 10rpx 10rpx 60rpx 60rpx;
133
+}
134
+.panelFooter10{
135
+  background-color: #303030;
136
+  font-size:24rpx;
137
+}
138
+.panelFooter11{
139
+  width:160rpx;
140
+  height:120rpx;
141
+  background: #1E1E1E;
142
+  border-radius: 0rpx 0rpx 10rpx 60rpx;
143
+}
144
+.panelFooter12{
145
+  width:180rpx;
146
+  height:120rpx;
147
+  border-radius: 10rpx 10rpx 10rpx 10rpx;
148
+  margin: 0 10rpx 0 0;
149
+}
150
+.panelFooter13{
151
+  width:180rpx;
152
+  height:120rpx;
153
+  border-radius: 10rpx 5rpx 50rpx 10rpx;
154
+}
155
+.text02{
156
+  font-size:24rpx;
157
+  margin-top: 10rpx;
158
+}
159
+.text03{
160
+  font-size:26rpx;
161
+}
162
+.sysIcon_a14{
163
+  width:20rpx;
164
+  height:20rpx;
165
+}

+ 0 - 1
pages/main/paste.js

@@ -128,5 +128,4 @@ Page({
128 128
       imageUrl: app.globalData.ShareImage,
129 129
     }
130 130
   },
131
-  
132 131
 })

+ 4 - 4
pages/main/wordsinput.wxml

@@ -131,8 +131,8 @@
131 131
 <!-- 显示示例面板 -->
132 132
 <template is="example-panel" data="{{IsShowExample, Containnerheight, exampleImagePath: '../images/pic_h01.png'}}"/>
133 133
 
134
-<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{remindAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
135
-  <view class="panelRemind FlexColumn">
134
+<view wx:if="{{IsShowRemind}}" class="panelRemindParent {{parentAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
135
+  <view class="panelRemind {{panelAnimation}} FlexColumn">
136 136
     <image src="../images/sysIcon_b10.png" class="sysIcon_b10"></image>
137 137
     <view class="panelRemind1 FlexRow">
138 138
       <image src="../images/sysIcon_b09.png" class="sysIcon_b09"></image>
@@ -149,8 +149,8 @@
149 149
 </view>
150 150
 
151 151
 <!-- 稍等片刻 -->
152
-<view wx:if="{{IsShowRemindWait}}" class="panelRemindParent {{remindAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
153
-  <view class="panelRemind FlexColumn">
152
+<view wx:if="{{IsShowRemindWait}}" class="panelRemindParent {{parentAnimation}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
153
+  <view class="panelRemind {{panelAnimation}} FlexColumn">
154 154
     <image src="../images/sysIcon_b10.png" class="sysIcon_b10"></image>
155 155
       
156 156
     <view class="panelRemind1 FlexRow">

+ 24 - 7
utils/animation.js

@@ -1,16 +1,23 @@
1 1
 function toggleRemindWithAnimation(page, {
2 2
   remindKey = 'IsShowRemind',
3
-  animationKey = 'remindAnimation',
4
-  duration = 300,
3
+  animationKey = 'parentAnimation',
4
+  panelAnimationKey = 'panelAnimation', // 新增:控制内容面板的动画类名
5
+  duration = 400,
5 6
   showAnimation = 'remind-slide-up',
6
-  hideAnimation = 'remind-slide-down'
7
+  hideAnimation = 'remind-slide-down',
8
+  vectorKey = 'VectorCSS',
9
+  hideColor = 'rgba(0,0,0,0)',
10
+  showColor = 'rgba(26,67,51,0.5)'
7 11
 } = {}) {
8 12
   // 获取当前显示状态
9 13
   const isCurrentlyShown = page.data[remindKey];
10 14
   if (isCurrentlyShown) {
11 15
     // 如果当前是显示状态,先播放隐藏动画,然后再隐藏
12 16
     const animationData = {};
13
-    animationData[animationKey] = hideAnimation;
17
+    // 只为内容面板设置滑动动画
18
+    animationData[panelAnimationKey] = hideAnimation;
19
+    // 设置蒙版透明度动画为渐变消失
20
+    animationData[vectorKey] = "background-color: " + hideColor + "; transition: background-color " + duration + "ms ease";
14 21
     page.setData(animationData);
15 22
     
16 23
     // 等待动画完成后再隐藏弹窗
@@ -23,11 +30,21 @@ function toggleRemindWithAnimation(page, {
23 30
     // 如果当前是隐藏状态,直接显示并播放显示动画
24 31
     const showData = {};
25 32
     showData[remindKey] = true;
26
-    showData[animationKey] = showAnimation;
33
+    // 只为内容面板设置滑动动画
34
+    showData[panelAnimationKey] = showAnimation;
35
+    // 设置蒙版透明度动画为渐变出现
36
+    showData[vectorKey] = "background-color: " + hideColor + "; transition: background-color " + duration + "ms ease";
27 37
     page.setData(showData);
38
+    
39
+    // 在下一帧设置最终的半透明状态,触发过渡动画
40
+    setTimeout(function() {
41
+      const updateData = {};
42
+      updateData[vectorKey] = "background-color: " + showColor + "; transition: background-color " + duration + "ms ease";
43
+      page.setData(updateData);
44
+    }, 50);
28 45
   }
29 46
 }
30 47
 
31
-module.exports = {
32
-  toggleRemindWithAnimation:toggleRemindWithAnimation,
48
+module.exports = { 
49
+  toggleRemindWithAnimation:toggleRemindWithAnimation, 
33 50
 }

+ 3 - 0
utils/main.js

@@ -186,6 +186,9 @@ function checkGenerating(){
186 186
                     }
187 187
                   })
188 188
                 }
189
+                else{
190
+                  app.globalData.UnReadCount=1;
191
+                }
189 192
               }
190 193
             });
191 194
           }