chengjie před 3 roky
rodič
revize
d17e5051e0
4 změnil soubory, kde provedl 49 přidání a 4 odebrání
  1. 3 3
      app.js
  2. 27 0
      pages/main/addInfomationDetail.wxml
  3. 15 1
      pages/main/detail.js
  4. 4 0
      utils/main.js

+ 3 - 3
app.js

@@ -1,8 +1,8 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.3.38",
4
-    IsProduction: true,
5
-    //IsProduction: false,
3
+    Version: "2.3.40",
4
+    //IsProduction: true,
5
+    IsProduction: false,
6 6
     ShareTitle: "高效学习从秒过开始",
7 7
     SharePath: "pages/index/index",
8 8
     ShareImage: '../images/program_screenshot_main.png',

+ 27 - 0
pages/main/addInfomationDetail.wxml

@@ -508,6 +508,33 @@
508 508
 
509 509
   </block>
510 510
 
511
+  <!-- 英英翻译 -->
512
+  <block wx:if="{{Result.ENG.ParaphraseEng && Result.ENG.ParaphraseEng.length>0}}">
513
+    <view class="panelTitle FlexColumn">
514
+      <view class="panelTitle1 FlexRow">
515
+        <view class="panelTitle11">英英翻译</view>
516
+      </view>
517
+      <view class="panelTitle2" wx:if="{{Result.CHN}}">翻译结果来自网络,仅供参考,正确程度自行评估</view>
518
+    </view>
519
+    <view class="panelItem0 FlexRow">
520
+      <block wx:for="{{Result.ENG.ParaphraseEng}}" wx:key="ParaphraseList" wx:if="{{item.ParaphraseList}}">
521
+        <view class="{{CSS['ENG_ParaphraseEngList_'+index+'_'+indexChild].Css1}} panelItemHeight panelItem FlexRow"
522
+          wx:for="{{item.ParaphraseList}}" wx:key="*this" wx:for-item="itemChild" wx:for-index="indexChild"
523
+          bindtap='getInputData' data-type="normal" data-content="{{item.PartOfSpeech}} {{itemChild}}"
524
+          data-css="ENG_ParaphraseEngList_{{index}}_{{indexChild}}" data-tag="翻译">
525
+          <view class="FlexRow">
526
+            <view class="{{CSS['ENG_ParaphraseEngList_'+index+'_'+indexChild].Css2}} panelSelect0">
527
+              {{CSS['ENG_ParaphraseEngList_'+index+'_'+indexChild].Number}}</view>
528
+            <text class="panelItemText2 panelItemText">{{item.PartOfSpeech}} {{itemChild}}</text>
529
+          </view>
530
+          <view>
531
+            
532
+          </view>
533
+        </view>
534
+      </block>
535
+    </view>
536
+  </block>
537
+
511 538
   <!-- 翻译 -->
512 539
   <block wx:if="{{Result.ENG.Paraphrase && Result.ENG.Paraphrase.length>0}}">
513 540
     <view class="panelTitle FlexColumn">

+ 15 - 1
pages/main/detail.js

@@ -167,8 +167,22 @@ Page({
167 167
     //console.log("显示");
168 168
   },
169 169
   startTask: function () {
170
+    var that=this;
170 171
     var url = 'StartMiaoguoTask?UserID=' + app.globalData.userInfo.UserID;
171
-    main.getData(url, function (data) {});
172
+    main.getData(url, function (data,err) {
173
+      //console.log(err);
174
+      if (err && err.errCode==100){
175
+        wx.showModal({
176
+          title: '提醒',
177
+          showCancel: false,
178
+          content: '您的网络可能不稳定,请切换到4/5G网络或稍候片刻再试一次。',
179
+          confirmText: '知道了',
180
+          success(res) {
181
+            that.onClose();
182
+          }
183
+        });
184
+      }
185
+    });
172 186
   },
173 187
   onUnload: function () {
174 188
     var that=this;

+ 4 - 0
utils/main.js

@@ -23,6 +23,10 @@ function getData(url, callback) {
23 23
         // image: "../images/universalpic_warning_white_126x120.png",
24 24
         duration: 3000
25 25
       });
26
+      var err={};
27
+      err.errCode=100;
28
+      err.errMsg="网络错误";
29
+      callback(null,err);
26 30
     },
27 31
   });
28 32
 }