chengjie 6 年之前
父节点
当前提交
8c55b050c7

+ 4 - 0
pages/index/accredit.js

@@ -107,6 +107,10 @@ Page({
107 107
     wx.showLoading({
108 108
       title: '数据初始化',
109 109
     });
110
+    setTimeout(function () {
111
+      wx.hideLoading();
112
+    }, 5000);
113
+    
110 114
     main.getData('BuildInitData?UserID=' + app.globalData.userInfo.UserID, function (data) {
111 115
       wx.hideLoading();
112 116
       if (data) {

+ 1 - 1
pages/index/index.js

@@ -212,7 +212,7 @@ Page({
212 212
               });
213 213
             }, 2000);
214 214
 
215
-            main.UpdateMiaoguoCardTodayAll(function () {
215
+            main.UpdateMiaoguoCardTodayAll(false,function () {
216 216
               that.getTaskTodayList();
217 217
             });
218 218
           }

+ 40 - 25
pages/main/add.js

@@ -6,7 +6,7 @@ var field = [[], [], [], []];
6 6
 var arrTag = [];
7 7
 
8 8
 var tempCursor = 0,
9
-  btnName = "";
9
+  btnName = ""; 
10 10
 var arrSoundMark = [];
11 11
 var isUnload = true;
12 12
 var isEdit = true;
@@ -103,6 +103,7 @@ Page({
103 103
       app.globalData.CardList=list;
104 104
       wx.removeStorageSync("TempCardInfo");
105 105
     }
106
+    wx.removeStorageSync("TempCardInfoAddItem");
106 107
   },
107 108
   onClose: function () {
108 109
     wx.navigateBack({
@@ -120,6 +121,7 @@ Page({
120 121
         break;
121 122
       }
122 123
     }
124
+    wx.setStorageSync("TempCardInfoAddItem", content);
123 125
     that.setData({
124 126
       HiddenFieldEdit: false,
125 127
       Focus: true,
@@ -196,7 +198,7 @@ Page({
196 198
             var item = that.data.Field[i][key];
197 199
             var str = "";
198 200
             if (item.Type == "image") {
199
-              str = "[图]" + item.Content + "[/图]";
201
+              str = "[图 w='"+item.Width+"' h='"+item.Height+"']" + item.Content + "[/图]";
200 202
             }
201 203
             else if (item.Type == "line") {
202 204
               for (var j = 0; j < item.Content.length; j++) {
@@ -416,6 +418,9 @@ Page({
416 418
       wx.showLoading({
417 419
         title: '请稍候',
418 420
       });
421
+      setTimeout(function () {
422
+        wx.hideLoading();
423
+      }, 5000);
419 424
       var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID;
420 425
       main.getData(url, function (data) {
421 426
         wx.hideLoading();
@@ -444,7 +449,6 @@ Page({
444 449
     this.setData({
445 450
       FieldContent: e.detail.value,
446 451
     });
447
-    //this.updateField();
448 452
 
449 453
   },
450 454
   //加符号
@@ -577,9 +581,16 @@ Page({
577 581
     var isSave = e.currentTarget.dataset.idsave;
578 582
     if (isSave == "true") {
579 583
       isUnload = false;
580
-      wx.removeStorageSync("TempCardInfoAddItem");
581 584
       this.updateField();
582 585
     }
586
+    else if (isSave == "false") {
587
+      var content = wx.getStorageSync("TempCardInfoAddItem");
588
+      this.setData({
589
+        FieldContent:content,
590
+      })
591
+      this.updateField();
592
+    }
593
+    
583 594
     this.setData({
584 595
       HiddenFieldEdit:true,
585 596
     });
@@ -593,17 +604,13 @@ Page({
593 604
     });
594 605
   },
595 606
 
596
-  updateField: function (history) {
607
+  updateField: function () {
597 608
     var str = this.data.FieldContent;
598 609
     var list = app.globalData.CardList;
599 610
     var card={};
600 611
     for (var i = 0; i < list.length; i++) {
601 612
       if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
602
-        if (history != undefined)
603
-          list[i].Content[this.data.FieldNumber].Content = history;
604
-        else
605
-          list[i].Content[this.data.FieldNumber].Content = str;
606
-        
613
+        list[i].Content[this.data.FieldNumber].Content = str;
607 614
         card = main.changeStringToView(list[i].Content);
608 615
         break;
609 616
       }
@@ -630,26 +637,34 @@ Page({
630 637
         //console.log(tempFilePaths[0]);
631 638
         //that.data.FieldContent = that.data.FieldContent + "[图 url='" + tempFilePaths[0] + "']" + tempFilePaths[0] + "[/图]";
632 639
 
633
-        if (tempCursor == undefined)
634
-          tempCursor = that.data.FieldContent.length;
635
-        var str1 = "",
636
-          str2 = "";
637
-        if (that.data.FieldContent.length > 0) {
638
-          str1 = that.data.FieldContent.substr(0, tempCursor);
639
-          str2 = that.data.FieldContent.substring(tempCursor, that.data.FieldContent.length);
640
-        }
640
+        wx.getImageInfo({
641
+          src: res.tempFilePaths[0],
642
+          success(res) {
643
+            console.log(res.width)
644
+            console.log(res.height)
645
+            if (tempCursor == undefined)
646
+              tempCursor = that.data.FieldContent.length;
647
+            var str1 = "",
648
+              str2 = "";
649
+            if (that.data.FieldContent.length > 0) {
650
+              str1 = that.data.FieldContent.substr(0, tempCursor);
651
+              str2 = that.data.FieldContent.substring(tempCursor, that.data.FieldContent.length);
652
+            }
641 653
 
642
-        var str0 = "[图]" + tempFilePaths[0] + "[/图]";
654
+            var str0 = "[图 w='"+res.width+"' h='"+res.height+"']" + tempFilePaths[0]+ "[/图]";
643 655
 
644
-        that.data.FieldContent = str1 + str0 + str2;
656
+            that.data.FieldContent = str1 + str0 + str2;
645 657
 
646
-        //console.log("uploadImageEnd:" + that.data.FieldContent);
658
+            //console.log("uploadImageEnd:" + that.data.FieldContent);
647 659
 
648
-        that.setData({
649
-          FieldContent: that.data.FieldContent,
650
-          Focus: false,
660
+            that.setData({
661
+              FieldContent: that.data.FieldContent,
662
+              Focus: false,
663
+            });
664
+            that.updateField();
665
+
666
+          }
651 667
         });
652
-        that.updateField();
653 668
       },
654 669
       fail: function () {
655 670
 

+ 0 - 4
pages/main/add.wxss

@@ -130,10 +130,6 @@
130 130
   text-decoration: underline;
131 131
   margin-right: 10rpx;
132 132
 }
133
-.panelItem .imageBishun {
134
-  width:100rpx;
135
-  height:100rpx;
136
-}
137 133
 .panelItem .imageFree{
138 134
   width:100rpx;
139 135
 }

+ 13 - 7
pages/main/detail.js

@@ -50,6 +50,12 @@ Page({
50 50
 
51 51
     this.getMemoryLevel();
52 52
 
53
+    if (app.globalData.IsIPad) {
54
+      that.setData({
55
+        IsIPad: "_iPad",
56
+      });
57
+    }
58
+
53 59
   },
54 60
   onShow: function () {
55 61
     var that = this;
@@ -86,7 +92,7 @@ Page({
86 92
   },
87 93
   onUnload: function () {
88 94
     clearInterval(intervalSound);
89
-    main.UpdateMiaoguoCardTodayAll(function(){
95
+    main.UpdateMiaoguoCardTodayAll(false,function(){
90 96
       listTaskFinished = [];
91 97
     });
92 98
   },
@@ -303,7 +309,7 @@ Page({
303 309
     if (listTaskFinished.length > 0) {
304 310
       var card = listTaskFinished.pop();
305 311
       wx.setStorageSync("ListTaskFinished", listTaskFinished);
306
-
312
+      timeStart  =  new  Date();
307 313
 
308 314
       card.Card.Number0 = card.Number0Old;
309 315
       card.Card.Number0Str = card.Number0StrOld;
@@ -343,7 +349,6 @@ Page({
343 349
 
344 350
       wx.showToast({
345 351
         title: '回到上一张',
346
-        mask: true,
347 352
         image: "../images/universalpic_undo_white_120x90.png",
348 353
       });
349 354
       that.setSoundFile(2);
@@ -413,9 +418,6 @@ Page({
413 418
         finishCard.IsReviewOld = TaskList[0].IsReview;
414 419
 
415 420
         TaskList[0].IsReview = true;
416
-
417
-
418
-
419 421
         TaskList.push(TaskList[0]);
420 422
       }
421 423
       //若是天月年
@@ -451,6 +453,7 @@ Page({
451 453
     if (finishCard.btnnumber == 1)
452 454
       duration = 0;
453 455
     finishCard.Duration = duration;
456
+    timeStart  =  new  Date();
454 457
 
455 458
     //添加完成列表,去掉任务列表数据
456 459
     listTaskFinished.push(finishCard);
@@ -490,7 +493,7 @@ Page({
490 493
         CanUndo: 1,
491 494
       });
492 495
       that.setSoundFile(1);
493
-      main.UpdateMiaoguoCardTodayAll(function () {
496
+      main.UpdateMiaoguoCardTodayAll(true,function () {
494 497
         listTaskFinished = [];
495 498
         that.getTaskTime();
496 499
       });
@@ -677,6 +680,9 @@ Page({
677 680
     wx.showLoading({
678 681
       title: '生成中',
679 682
     });
683
+    setTimeout(function () {
684
+      wx.hideLoading();
685
+    }, 5000);
680 686
     //console.log(app.globalData.userInfo.AvatarUrl);
681 687
     var avatarUrl = app.globalData.userInfo.AvatarUrl;
682 688
     avatarUrl = avatarUrl.substring(0, avatarUrl.lastIndexOf("/") + 1);

+ 10 - 5
pages/main/detail.wxml

@@ -65,8 +65,10 @@
65 65
           </view>
66 66
 
67 67
           <view class="textPinyin" hover-class='panelSoundHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</view>
68
-          <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
69
-
68
+          
69
+          <view class="imageContainer FlexColumn" wx:if="{{item.Type=='image'}}" style='width:{{item.Width}}rpx;height:{{item.Height}}rpx;'>
70
+            <image class="imageFree" mode="widthFix" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
71
+          </view>
70 72
         </block>
71 73
       </view>
72 74
     </view>
@@ -102,8 +104,11 @@
102 104
           </view>
103 105
 
104 106
           <view class="textPinyin" hover-class='panelPinyinHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</view>
105
-          <image class="imageFree2" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
106
-          </block>
107
+          
108
+          <view class="imageContainer2 FlexColumn" wx:if="{{item.Type=='image'}}" style='width:{{item.Width}}rpx;height:{{item.Height}}rpx;'>
109
+            <image class="imageFree2" mode="widthFix" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
110
+          </view>
111
+        </block>
107 112
         </view>
108 113
       </view>
109 114
     </view>
@@ -154,7 +159,7 @@
154 159
   <!-- 最后一页 -->
155 160
   <block wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
156 161
     <view class='panelLast FlexColumn' style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};'>
157
-      <view class='text1'>做完了</view>
162
+      <view class='text1{{IsIPad}}' >做完了</view>
158 163
 
159 164
       <view class="panelLastTime FlexColumn">
160 165
         <view style='color:{{Color.FrontColor1}};'>今日练习总共用时</view>

+ 17 - 4
pages/main/detail.wxss

@@ -223,18 +223,25 @@
223 223
   margin-right: 10rpx;
224 224
 }
225 225
 
226
-.panelItem .imageBishun {
227
-  width: 360rpx;
228
-  height: 360rpx;
226
+
227
+.panelItem .imageContainer {
228
+  width: 650rpx;
229 229
   margin: 6rpx 0;
230
+  border-radius: 20rpx;
231
+  background-color: rgba(0,0,0,0.1);
230 232
 }
231 233
 
232 234
 .panelItem .imageFree {
233 235
   width: 650rpx;
234
-  margin: 6rpx 0;
235 236
   border-radius: 20rpx;
236 237
 }
237 238
 
239
+
240
+.panelItem .imageContainer2 {
241
+  width: 650rpx;
242
+  border-radius: 10rpx;
243
+  background-color: rgba(0,0,0,0.1);
244
+}
238 245
 .panelItem .imageFree2 {
239 246
   width: 650rpx;
240 247
   border-radius: 10rpx;
@@ -362,11 +369,17 @@
362 369
   z-index: 20;
363 370
 }
364 371
 
372
+
365 373
 .text1 {
366 374
   margin: 100rpx 0 60rpx 40rpx;
367 375
   font-size: 90rpx;
368 376
 }
369 377
 
378
+.text1_iPad {
379
+  margin: 20rpx 0 60rpx 40rpx;
380
+  font-size: 90rpx;
381
+}
382
+
370 383
 .panelLastTime {
371 384
   font-size: 28rpx;
372 385
   font-weight: 400;

+ 3 - 0
pages/main/preview.js

@@ -255,6 +255,9 @@ Page({
255 255
       wx.showLoading({
256 256
         title: '处理中',
257 257
       });
258
+      setTimeout(function () {
259
+        wx.hideLoading();
260
+      }, 5000);
258 261
       var that = this;
259 262
       var url = "CollectMiaoguoCard?";
260 263
       url += "MiaoguoCardID=" + that.data.MiaoguoCardID;

+ 8 - 3
pages/main/preview.wxml

@@ -44,8 +44,10 @@
44 44
       </view>
45 45
 
46 46
       <view class="textPinyin" hover-class='panelSoundHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</view>
47
-      <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
48
-
47
+      
48
+      <view class="imageContainer FlexColumn" wx:if="{{item.Type=='image'}}" style='width:{{item.Width}}rpx;height:{{item.Height}}rpx;'>
49
+        <image class="imageFree" mode="widthFix" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
50
+      </view>
49 51
       </block>
50 52
     </view>
51 53
   </view>
@@ -85,7 +87,10 @@
85 87
         </view>
86 88
 
87 89
         <view class="textPinyin" hover-class='panelPinyinHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</view>
88
-        <image class="imageFree2" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
90
+        
91
+        <view class="imageContainer2 FlexColumn" wx:if="{{item.Type=='image'}}" style='width:{{item.Width}}rpx;height:{{item.Height}}rpx;'>
92
+          <image class="imageFree2" mode="widthFix" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
93
+        </view>
89 94
         </block>
90 95
       </view>
91 96
     </view>

+ 10 - 4
pages/main/preview.wxss

@@ -232,18 +232,24 @@
232 232
   margin-right: 10rpx;
233 233
 }
234 234
 
235
-.panelItem .imageBishun {
236
-  width: 360rpx;
237
-  height: 360rpx;
235
+.panelItem .imageContainer {
236
+  width: 650rpx;
238 237
   margin: 6rpx 0;
238
+  border-radius: 20rpx;
239
+  background-color: rgba(0,0,0,0.1);
239 240
 }
240 241
 
241 242
 .panelItem .imageFree {
242 243
   width: 650rpx;
243
-  margin: 6rpx 0;
244 244
   border-radius: 20rpx;
245 245
 }
246 246
 
247
+
248
+.panelItem .imageContainer2 {
249
+  width: 650rpx;
250
+  border-radius: 10rpx;
251
+  background-color: rgba(0,0,0,0.1);
252
+}
247 253
 .panelItem .imageFree2 {
248 254
   width: 650rpx;
249 255
   border-radius: 10rpx;

+ 4 - 0
pages/main/searchCard.js

@@ -39,6 +39,10 @@ Page({
39 39
     wx.showLoading({
40 40
       title: '请稍候',
41 41
     });
42
+    setTimeout(function () {
43
+      wx.hideLoading();
44
+    }, 5000);
45
+    
42 46
     var IsToday=e.currentTarget.dataset.id;
43 47
     var that = this;
44 48
 

+ 6 - 1
pages/main/searchCardList.js

@@ -90,8 +90,9 @@ Page({
90 90
 
91 91
     function getImage(str) {
92 92
       var result = "";
93
-      if (str.indexOf("[图]") >= 0) {
93
+      if (str.indexOf("[图") >= 0) {
94 94
         result = str.substring(str.indexOf("[图]") + 3, str.indexOf("[/图]"));
95
+        result = result.substring(result.indexOf("]") + 1);
95 96
       }
96 97
       return result;
97 98
     }
@@ -158,6 +159,10 @@ Page({
158 159
     wx.showLoading({
159 160
       title: '请稍候',
160 161
     });
162
+    setTimeout(function () {
163
+      wx.hideLoading();
164
+    }, 5000);
165
+    
161 166
     var that = this;
162 167
     var id = e.currentTarget.dataset.id;
163 168
     var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID + "&IsToday=" + that.data.IsToday + "&PageID=" + id;

+ 4 - 0
pages/main/searchWeb1.js

@@ -118,6 +118,10 @@ Page({
118 118
     wx.showLoading({
119 119
       title: '查询中',
120 120
     });
121
+    setTimeout(function () {
122
+      wx.hideLoading();
123
+    }, 5000);
124
+    
121 125
     var that = this;
122 126
 
123 127
     var url = 'GetMiaoguoAISearch?UserID=' + app.globalData.userInfo.UserID;

+ 57 - 21
utils/main.js

@@ -339,8 +339,24 @@ function changeStringToView(field) {
339 339
           if (arr[k].indexOf("[图") >= 0 && arr[k].indexOf("[/图]") > 0) {
340 340
             var obj = {};
341 341
             obj.Type = "image";
342
-            if (arr[k].indexOf("[图]") >= 0) {
343
-              obj.ContentServer = arr[k].substring(arr[k].indexOf("[图]") + 3, arr[k].indexOf("[/图]"));
342
+            if (arr[k].indexOf("[图") >= 0) {
343
+              obj.ContentServer = arr[k].substring(arr[k].indexOf("[图") + 3, arr[k].indexOf("[/图]"));
344
+
345
+              const w = 650;
346
+              if (obj.ContentServer.indexOf("w='") >= 0 && obj.ContentServer.indexOf("h='") >= 0) {
347
+                obj.Width = obj.ContentServer.substring(obj.ContentServer.indexOf("w='") + 3, obj.ContentServer.indexOf("h='") - 2);
348
+                obj.Height = obj.ContentServer.substring(obj.ContentServer.indexOf("h='") + 3, obj.ContentServer.indexOf("']"));
349
+
350
+                obj.Height = Math.round((w * Number(obj.Height)) / Number(obj.Width));
351
+                obj.Width = w;
352
+
353
+              }
354
+              else {
355
+                obj.Width = "";
356
+                obj.Height = "";
357
+              }
358
+
359
+              obj.ContentServer = obj.ContentServer.substring(obj.ContentServer.indexOf("]") + 1);
344 360
               obj.Content = getTempImage(obj.ContentServer);
345 361
               result.Images.push(obj.Content);
346 362
             }
@@ -460,10 +476,19 @@ function changeStringToView(field) {
460 476
 
461 477
 //得到当天任务
462 478
 function getTaskTodayList(callback) {
463
-  wx.showLoading({
464
-    title: '请稍候',
465
-    mask: true,
466
-  })
479
+  var isNotData = true;
480
+  var intervalTask = setTimeout(function () {
481
+    if (isNotData) {
482
+      wx.showLoading({
483
+        title: '请稍候',
484
+        mask: true,
485
+      });
486
+      setTimeout(function(){
487
+        wx.hideLoading();
488
+      },5000);
489
+    }
490
+  }, 2000);
491
+
467 492
   var that = this;
468 493
   var CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
469 494
   if (!CardMaxNumberNew)
@@ -483,7 +508,11 @@ function getTaskTodayList(callback) {
483 508
   url += "&SortTypeIndex=" + SortTypeIndex;
484 509
 
485 510
   getData(url, function (data) {
486
-    wx.hideLoading();
511
+    clearTimeout(intervalTask);
512
+    if (isNotData) {
513
+      wx.hideLoading();
514
+    }
515
+    isNotData = false;
487 516
 
488 517
     if (data) {
489 518
       app.globalData.TaskToday = data;
@@ -531,17 +560,22 @@ function saveTempImage(serverUrl, tempUrl) {
531 560
   wx.setStorageSync("TempImageList", list);
532 561
 }
533 562
 
534
-function UpdateMiaoguoCardTodayAll(callback){
563
+function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
535 564
   var that = this;
536
-  wx.showLoading({
537
-    title: '请稍候',
538
-    mask: true,
539
-  });
565
+  if (isShowLoading) {
566
+    wx.showLoading({
567
+      title: '请稍候',
568
+      mask: true,
569
+    });
570
+    setTimeout(function () {
571
+      wx.hideLoading();
572
+    }, 10000);
573
+  }
540 574
   var list = wx.getStorageSync("ListTaskFinished");
541 575
   if (list && list.length > 0) {
542
-    var arr=[];
543
-    for(var i=0;i<list.length;i++){
544
-      var obj={};
576
+    var arr = [];
577
+    for (var i = 0; i < list.length; i++) {
578
+      var obj = {};
545 579
       obj.MiaoguoCardID = list[i].Card.MiaoguoCardID;
546 580
       obj.IntervalTime = list[i].IntervalTime;
547 581
       obj.BtnNumber = list[i].BtnNumber;
@@ -553,16 +587,18 @@ function UpdateMiaoguoCardTodayAll(callback){
553 587
     that.postData('UpdateMiaoguoCardTodayAll?UserID=' + app.globalData.userInfo.UserID, {
554 588
       List: arr,
555 589
     }, function (data) {
556
-      wx.hideLoading();
590
+      if (isShowLoading) {
591
+        wx.hideLoading();
592
+      }
557 593
       if (data) {
558 594
         wx.removeStorageSync("ListTaskFinished");
559 595
       }
560
-      if (callback){
596
+      if (callback) {
561 597
         callback();
562 598
       }
563 599
     });
564 600
   }
565
-  else{
601
+  else {
566 602
     if (callback) {
567 603
       callback();
568 604
     }
@@ -584,18 +620,18 @@ function updateSearchList(obj) {
584 620
       && arr[i].Author == obj.Author
585 621
     ) {
586 622
       if (obj.Type == "shici") {
587
-        if (arr[i].ShiciUrl==obj.ShiciUrl){
623
+        if (arr[i].ShiciUrl == obj.ShiciUrl) {
588 624
           obj.Value = arr[i].Value;
589 625
           arr.splice(i, 1);
590 626
           break;
591 627
         }
592 628
       }
593
-      else{
629
+      else {
594 630
         obj.Value = arr[i].Value;
595 631
         arr.splice(i, 1);
596 632
         break;
597 633
       }
598
-      
634
+
599 635
     }
600 636
   }
601 637
   arr.unshift(obj);