chengjie 7 years ago
parent
commit
8adc6f226c

+ 1 - 1
app.js

@@ -15,7 +15,7 @@ App({
15
     IsProduction: true,
15
     IsProduction: true,
16
     ProgramID: 106,
16
     ProgramID: 106,
17
     AppID: "wx313a8f2c0741efe1",
17
     AppID: "wx313a8f2c0741efe1",
18
-    ShareTitle:"识字,让阅读赢在起点",
18
+    ShareTitle:"赢在阅读起跑线",
19
     userInfo: null,
19
     userInfo: null,
20
     fileUrl: "https://www.kylx365.com/",
20
     fileUrl: "https://www.kylx365.com/",
21
     serverUrl: "https://www.kylx365.com/apiData/",
21
     serverUrl: "https://www.kylx365.com/apiData/",

BIN
images/02004.gif


BIN
images/02025.png


BIN
images/02026.png


BIN
images/07001.png


+ 23 - 14
pages/main/cooperation.js

@@ -31,19 +31,28 @@ Page({
31
   },
31
   },
32
   save: function () {
32
   save: function () {
33
     if (this.data.Name.length > 0 && this.data.Contact.length > 0) {
33
     if (this.data.Name.length > 0 && this.data.Contact.length > 0) {
34
-      var that = this;
35
-      server.getData('AddChannel?Name='
36
-        + this.data.Name + '&Contact='
37
-        + this.data.Contact + '&ProgramID='
38
-        + app.globalData.ProgramID + '&UserID='
39
-        + app.globalData.userInfo.UserID, function (data) {
40
-          if (data) {
41
-            that.setData({
42
-              IsInput: false,
43
-              ChannelID: data.insertId,
44
-            });
45
-          }
46
-        });
34
+      if (common.IsChinese(this.data.Contact)) {
35
+        wx.showToast({
36
+          title: '请输入有效信息',
37
+          icon: 'success',
38
+          duration: 2000
39
+        })
40
+      }
41
+      else {
42
+        var that = this;
43
+        server.getData('AddChannel?Name='
44
+          + this.data.Name + '&Contact='
45
+          + this.data.Contact + '&ProgramID='
46
+          + app.globalData.ProgramID + '&UserID='
47
+          + app.globalData.userInfo.UserID, function (data) {
48
+            if (data) {
49
+              that.setData({
50
+                IsInput: false,
51
+                ChannelID: data.insertId,
52
+              });
53
+            }
54
+          });
55
+      }
47
     }
56
     }
48
     else {
57
     else {
49
       wx.showToast({
58
       wx.showToast({
@@ -55,7 +64,7 @@ Page({
55
   },
64
   },
56
   setClipboardData: function () {
65
   setClipboardData: function () {
57
     wx.setClipboardData({
66
     wx.setClipboardData({
58
-      data: '小程序AppID:' + app.globalData.AppID+' 小程序启动Path:pages/index/index?SourceID=' + this.data.ChannelID,
67
+      data: '小程序AppID:' + app.globalData.AppID + ' 小程序启动Path:pages/index/index?SourceID=' + this.data.ChannelID,
59
       success: function (res) {
68
       success: function (res) {
60
         wx.getClipboardData({
69
         wx.getClipboardData({
61
           success: function (res) {
70
           success: function (res) {

+ 1 - 0
pages/main/cooperation.wxml

@@ -44,6 +44,7 @@
44
     </view>
44
     </view>
45
 
45
 
46
     <view class="text6">红色部分请勿遗漏,便于了解相互转化</view>
46
     <view class="text6">红色部分请勿遗漏,便于了解相互转化</view>
47
+    <view class="text8" bindtap='setClipboardData'>复制到剪贴板</view>
47
     <view class="line2"></view>
48
     <view class="line2"></view>
48
     <text class="text7">由于微信规则限制,在满500个名额后,将为具有优质内容的或提供教育相关资源的公众号优先保留关联席位,敬请海涵。</text>
49
     <text class="text7">由于微信规则限制,在满500个名额后,将为具有优质内容的或提供教育相关资源的公众号优先保留关联席位,敬请海涵。</text>
49
 
50
 

+ 7 - 1
pages/main/cooperation.wxss

@@ -136,11 +136,17 @@
136
 }
136
 }
137
 
137
 
138
 
138
 
139
+.text8{
140
+  font-size:28rpx;
141
+  margin-top:70rpx;
142
+  color:#A20602;
143
+}
144
+
139
 .line2{
145
 .line2{
140
   width: 600rpx;
146
   width: 600rpx;
141
   height:3rpx;
147
   height:3rpx;
142
   background-color: #593613;
148
   background-color: #593613;
143
-  margin-top:140rpx;
149
+  margin-top:30rpx;
144
 }
150
 }
145
 
151
 
146
 .text7{
152
 .text7{

+ 28 - 11
pages/main/detail.js

@@ -20,7 +20,7 @@ Page({
20
     audioPer: [0, 1, 3, 4],//音色
20
     audioPer: [0, 1, 3, 4],//音色
21
     IntervalSecondIndex: 2,//播放间隔秒数索引
21
     IntervalSecondIndex: 2,//播放间隔秒数索引
22
     IsImageError: false,
22
     IsImageError: false,
23
-    SpeakerArray: [{ name: "温柔姐姐", value: "woman", isShow: true }, { name: "爽朗哥哥", value: "man", isShow: false }, { name: "激情叔叔", value: "oldman", isShow: false }, { name: "搞怪妹妹", value: "sister", isShow: false }],
23
+    SpeakerArray: [{ name: "温柔姐姐(推荐)", value: "woman", isShow: true }, { name: "爽朗哥哥", value: "man", isShow: false }, { name: "古韵叔叔", value: "oldman", isShow: false }, { name: "可爱妹妹", value: "sister", isShow: false }],
24
 
24
 
25
   },
25
   },
26
   onLoad: function (options) {
26
   onLoad: function (options) {
@@ -49,7 +49,6 @@ Page({
49
       CurrentIndex: wordID,
49
       CurrentIndex: wordID,
50
       IsFinished: isfinished,
50
       IsFinished: isfinished,
51
       IsHelpPosition1: 0,
51
       IsHelpPosition1: 0,
52
-      IsHelpPosition2: 0,
53
       IsReview: false,
52
       IsReview: false,
54
       IsShowWordDetail: false,
53
       IsShowWordDetail: false,
55
       ShowMenu: "sort",
54
       ShowMenu: "sort",
@@ -91,6 +90,8 @@ Page({
91
       });
90
       });
92
     });
91
     });
93
 
92
 
93
+    common.getStorageValue(that, "IsHelpPosition1", 1, function () {});
94
+
94
     if (this.data.WordType == "normal")
95
     if (this.data.WordType == "normal")
95
       this.submitData();
96
       this.submitData();
96
 
97
 
@@ -102,6 +103,13 @@ Page({
102
       RecordID: insertID,
103
       RecordID: insertID,
103
       HanziNumber: hanziNumber,
104
       HanziNumber: hanziNumber,
104
     }, function (data) { });
105
     }, function (data) { });
106
+
107
+    if (this.data.IsHelpPosition1 == 1) {
108
+      this.setData({
109
+        IsHelpPosition1: 2,
110
+      });
111
+      wx.setStorageSync('IsHelpPosition1', 2);
112
+    }
105
   },
113
   },
106
   submitData: function (content) {
114
   submitData: function (content) {
107
     if (app.globalData.userInfo && app.globalData.userInfo.UserID) {
115
     if (app.globalData.userInfo && app.globalData.userInfo.UserID) {
@@ -226,7 +234,7 @@ Page({
226
           result.IsReview = false;
234
           result.IsReview = false;
227
 
235
 
228
           for (var l = 0; l < arrReview.length; l++) {
236
           for (var l = 0; l < arrReview.length; l++) {
229
-            if (arrReview[l].Word == result.Name) {
237
+            if (arrReview[l].Name == result.Name) {
230
               result.IsReview = true;
238
               result.IsReview = true;
231
               break;
239
               break;
232
             }
240
             }
@@ -272,6 +280,13 @@ Page({
272
     if (e && e.currentTarget.dataset.click)
280
     if (e && e.currentTarget.dataset.click)
273
       click = e.currentTarget.dataset.click;
281
       click = e.currentTarget.dataset.click;
274
 
282
 
283
+    if (click && this.data.IsHelpPosition1 == 1) {
284
+      this.setData({
285
+        IsHelpPosition1: 2,
286
+      });
287
+      wx.setStorageSync('IsHelpPosition1', 2);
288
+    }
289
+
275
     var url = app.globalData.audioUrlBaidu;
290
     var url = app.globalData.audioUrlBaidu;
276
     url = url.replace("[token]", app.globalData.BaiduToken);
291
     url = url.replace("[token]", app.globalData.BaiduToken);
277
     url = url.replace("per=0", "per=" + this.data.audioPer[this.data.SpeakerMan]);
292
     url = url.replace("per=0", "per=" + this.data.audioPer[this.data.SpeakerMan]);
@@ -282,7 +297,7 @@ Page({
282
           url = url.replace("[word]", "本次复习" + this.data.List[this.data.CurrentIndex].Title2);
297
           url = url.replace("[word]", "本次复习" + this.data.List[this.data.CurrentIndex].Title2);
283
         else
298
         else
284
           url = url.replace("[word]", "本章节" + this.data.List[this.data.CurrentIndex].Title2);
299
           url = url.replace("[word]", "本章节" + this.data.List[this.data.CurrentIndex].Title2);
285
-        url = url.replace("spd=3", "spd=6");
300
+        url = url.replace("spd=3", "spd=4");
286
       }
301
       }
287
       else {
302
       else {
288
 
303
 
@@ -405,20 +420,22 @@ Page({
405
   },
420
   },
406
   getImageError: function () {
421
   getImageError: function () {
407
     var that = this;
422
     var that = this;
408
-    that.data.List[that.data.CurrentIndex].WordUrl = "";
409
-
410
     that.setData({
423
     that.setData({
411
-      List: that.data.List,
412
       IsImageError: true,
424
       IsImageError: true,
413
     });
425
     });
414
-
415
   },
426
   },
416
   getImageDownload: function () {
427
   getImageDownload: function () {
417
     var that = this;
428
     var that = this;
429
+    wx.showLoading({
430
+      title: '请稍等',
431
+    })
418
     server.getData('SearchHanzi?Word=' + that.data.List[that.data.CurrentIndex].Name, function (data) {
432
     server.getData('SearchHanzi?Word=' + that.data.List[that.data.CurrentIndex].Name, function (data) {
419
-      wx.redirectTo({
420
-        url: "./detail?Type=" + that.data.WordType + "&bookid=" + that.data.BookID + "&unitid=" + that.data.UnitID + "&wordid=" + that.data.CurrentIndex + "&isfinished=" + that.data.IsFinished,
421
-      });
433
+      setTimeout(function () {
434
+        wx.hideLoading();
435
+        wx.redirectTo({
436
+          url: "./detail?Type=" + that.data.WordType + "&bookid=" + that.data.BookID + "&unitid=" + that.data.UnitID + "&wordid=" + that.data.CurrentIndex + "&isfinished=" + that.data.IsFinished,
437
+        });
438
+      }, 5000);
422
     });
439
     });
423
   },
440
   },
424
   showWordDetailHandler: function (e) {
441
   showWordDetailHandler: function (e) {

+ 11 - 5
pages/main/detail.wxml

@@ -140,6 +140,12 @@
140
   </view>
140
   </view>
141
 </view>
141
 </view>
142
 
142
 
143
+<!-- 帮助 -->
144
+<view class="help container FlexColumn" style="height:{{Height}}rpx;" wx:if="{{IsHelpPosition1==1}}">
145
+  <view wx:if="{{IsHelpPosition1==1}}" class="help1" bindtap='playAudio' data-click="true" ></view>
146
+  <image wx:if="{{IsHelpPosition1==1}}" src='../../images/05012.gif' class="helpPosition1 helpGif" bindtap='playAudio' data-click="true"  />
147
+</view>
148
+
143
 <!-- 设置 -->
149
 <!-- 设置 -->
144
 <view class="settingContainer container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowSetting}}">
150
 <view class="settingContainer container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowSetting}}">
145
 
151
 
@@ -170,7 +176,7 @@
170
   <view class="title1">
176
   <view class="title1">
171
     <view class="title1_1">点读</view>
177
     <view class="title1_1">点读</view>
172
   </view>
178
   </view>
173
-  <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="speaker">
179
+  <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="speaker" wx:if="{{!IsAutoPage}}">
174
     <view class="title2_1">语音</view>
180
     <view class="title2_1">语音</view>
175
     <view class="title2_2 FlexRow">
181
     <view class="title2_2 FlexRow">
176
       <view>{{SpeakerTitle}}</view>
182
       <view>{{SpeakerTitle}}</view>
@@ -192,7 +198,7 @@
192
     <view class="line1"></view>
198
     <view class="line1"></view>
193
   </view>
199
   </view>
194
 
200
 
195
-  <view class="title3 FlexRow">
201
+  <view class="title3 FlexRow" wx:if="{{!IsAutoPage}}">
196
     <view class="title2_1 FlexColumn">
202
     <view class="title2_1 FlexColumn">
197
       <view>组词播报</view>
203
       <view>组词播报</view>
198
       <view class="title3_2">“中国的国”,以词语形式播报</view>
204
       <view class="title3_2">“中国的国”,以词语形式播报</view>
@@ -200,7 +206,7 @@
200
     </view>
206
     </view>
201
     <switch class='title2_2' checked="{{IsAudioLengthChecked}}" bindchange="settingAudioLength" />
207
     <switch class='title2_2' checked="{{IsAudioLengthChecked}}" bindchange="settingAudioLength" />
202
   </view>
208
   </view>
203
-  <view class="line FlexColumn">
209
+  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
204
     <view class="line1"></view>
210
     <view class="line1"></view>
205
   </view>
211
   </view>
206
   <view class="title3 FlexRow">
212
   <view class="title3 FlexRow">
@@ -214,13 +220,13 @@
214
     <view class="line1"></view>
220
     <view class="line1"></view>
215
   </view>
221
   </view>
216
 
222
 
217
-  <view class="title3 FlexRow" wx:if="{{IsAutoPage}}">
223
+  <view class="title2 FlexRow" wx:if="{{IsAutoPage}}">
218
     <view class="title2_1 FlexColumn">
224
     <view class="title2_1 FlexColumn">
219
       <view>播放间隔秒数</view>
225
       <view>播放间隔秒数</view>
220
     </view>
226
     </view>
221
 
227
 
222
     <view class="title2_2 FlexRow">
228
     <view class="title2_2 FlexRow">
223
-      <picker bindchange="bindPickerChange" value="{{IntervalSecondIndex}}" range="{{arrIntervalSecond}}">
229
+      <picker class="picker" bindchange="bindPickerChange" value="{{IntervalSecondIndex}}" range="{{arrIntervalSecond}}">
224
         <view>
230
         <view>
225
           {{arrIntervalSecond[IntervalSecondIndex]}} 秒
231
           {{arrIntervalSecond[IntervalSecondIndex]}} 秒
226
         </view>
232
         </view>

+ 36 - 2
pages/main/detail.wxss

@@ -73,6 +73,7 @@
73
   font-family: 'GB Pinyinok-C';
73
   font-family: 'GB Pinyinok-C';
74
   font-weight: normal;
74
   font-weight: normal;
75
   font-style: normal;
75
   font-style: normal;
76
+  height:88rpx;
76
 }
77
 }
77
 
78
 
78
 .main .wordImage{
79
 .main .wordImage{
@@ -159,7 +160,7 @@
159
 }
160
 }
160
 
161
 
161
 .detail .right{
162
 .detail .right{
162
-  margin: 30rpx;
163
+  margin: 60rpx;
163
 }
164
 }
164
 
165
 
165
 .detail .line2{
166
 .detail .line2{
@@ -177,7 +178,7 @@
177
 
178
 
178
 
179
 
179
 .detail .content2{
180
 .detail .content2{
180
-  margin: 30rpx 20rpx 30rpx 40rpx;
181
+  margin: 30rpx 20rpx 30rpx 30rpx;
181
   background-color: #fff;
182
   background-color: #fff;
182
   align-items: flex-start;
183
   align-items: flex-start;
183
   flex-wrap: wrap;
184
   flex-wrap: wrap;
@@ -298,6 +299,12 @@
298
   font-size: 48rpx;
299
   font-size: 48rpx;
299
   color: #f0f0f0;
300
   color: #f0f0f0;
300
 }
301
 }
302
+.settingContainer .picker{
303
+  text-align: right;
304
+  width:200rpx;
305
+  height:100rpx;
306
+  line-height: 100rpx;
307
+}
301
 
308
 
302
 .settingMenu {
309
 .settingMenu {
303
   position: fixed;
310
   position: fixed;
@@ -428,4 +435,31 @@
428
 }
435
 }
429
 
436
 
430
 
437
 
438
+.help {
439
+  position: fixed;
440
+  top: 0;
441
+  background-color: rgba(0, 0, 0, 0);  
442
+  z-index: 100;
443
+}
444
+
445
+.help .help1 {
446
+  margin-top: 350rpx;
447
+  /* background-color: rgba(255, 255, 255, 0.3);  */
448
+  width: 100%;
449
+  height: 300rpx;
450
+  z-index: 100;
451
+}
452
+
453
+.helpGif {
454
+  width: 114rpx;
455
+  height: 170rpx;
456
+  position: fixed;
457
+  z-index: 100;
458
+}
459
+
460
+.helpPosition1 {
461
+  left: 327rpx;
462
+  top: 588rpx;
463
+}
464
+
431
 
465
 

+ 2 - 0
pages/main/index.js

@@ -38,6 +38,8 @@ Page({
38
       });
38
       });
39
     }
39
     }
40
 
40
 
41
+    common.getStorageValue(this, "IsRemind", true, function () {});
42
+
41
     this.updateProgram();
43
     this.updateProgram();
42
   },
44
   },
43
   onShow: function () {
45
   onShow: function () {

+ 1 - 1
pages/main/index.wxml

@@ -141,7 +141,7 @@
141
       </view>
141
       </view>
142
     </view>
142
     </view>
143
 
143
 
144
-    <view class="index9 FlexRow" wx:if="{{IsMember==0 || (IsMember==1 && NewUserNumber>=NewUserNumberMax)}}">
144
+    <view class="index9 FlexRow" wx:if="{{(IsMember==0 && IsShow==0) || (IsMember==1 && NewUserNumber>=NewUserNumberMax)}}">
145
       <image src='../../images/02016.png' class="imgWave" />
145
       <image src='../../images/02016.png' class="imgWave" />
146
     </view>
146
     </view>
147
   </block>
147
   </block>

+ 5 - 4
pages/main/list.js

@@ -17,6 +17,7 @@ Page({
17
       IsShowNav1: true,
17
       IsShowNav1: true,
18
       BookID: bookID,
18
       BookID: bookID,
19
       IsShowPayInfo:false,
19
       IsShowPayInfo:false,
20
+      IsShow: app.globalData.IsShow,
20
     });
21
     });
21
   },
22
   },
22
   onShow: function () {
23
   onShow: function () {
@@ -35,10 +36,10 @@ Page({
35
           var item = result.Units[j];
36
           var item = result.Units[j];
36
           if (app.globalData.userInfo.IsMember == 1)
37
           if (app.globalData.userInfo.IsMember == 1)
37
             item.IsLocked = 0;
38
             item.IsLocked = 0;
38
-          var rnd = common.random(2, 5);
39
-          item.Example = "";
40
-          for (var k = 0; k < rnd; k++)
41
-            item.Example += item.Words[k].Name;
39
+          // var rnd = common.random(2, 5);
40
+          // item.Example = "";
41
+          // for (var k = 0; k < rnd; k++)
42
+          //   item.Example += item.Words[k].Name;
42
 
43
 
43
           item.IsFinished = false;
44
           item.IsFinished = false;
44
           for (var k = 0; k < arrFinished.length; k++) {
45
           for (var k = 0; k < arrFinished.length; k++) {

+ 5 - 10
pages/main/list.wxml

@@ -21,9 +21,11 @@
21
       <view class="btn" bindtap="goto" data-bookid='{{BookID}}' data-islocked='{{item.IsLocked}}' data-unitid='{{item.ID}}' data-isfinished='{{item.IsFinished}}' wx:for="{{List}}" wx:key="index">
21
       <view class="btn" bindtap="goto" data-bookid='{{BookID}}' data-islocked='{{item.IsLocked}}' data-unitid='{{item.ID}}' data-isfinished='{{item.IsFinished}}' wx:for="{{List}}" wx:key="index">
22
         <view class="btn1 FlexRow">
22
         <view class="btn1 FlexRow">
23
           <view class="left FlexRow">
23
           <view class="left FlexRow">
24
-            <image wx:if="{{item.IsLocked==0 && !item.IsFinished}}" src='../../images/04007.png' class="img04007" />
25
-            <image wx:if="{{item.IsLocked==0 && item.IsFinished}}" src='../../images/04006.png' class="img04007" />
26
-            <image wx:if="{{item.IsLocked==1}}" src='../../images/04005.png' class="img04005" />
24
+            <image wx:if="{{IsShow==1 && item.IsLocked==0 && !item.IsFinished}}" src='../../images/04007.png' class="img04007" />
25
+            <image wx:if="{{IsShow==1 && item.IsLocked==0 && item.IsFinished}}" src='../../images/04006.png' class="img04007" />
26
+            <image wx:if="{{IsShow==1 && item.IsLocked==1}}" src='../../images/04005.png' class="img04005" />
27
+            <image wx:if="{{IsShow==0 && item.IsLocked==0 && !item.IsFinished}}" src='../../images/04007.png' class="img04007" />
28
+            <image wx:if="{{IsShow==0 && item.IsLocked==0 && item.IsFinished}}" src='../../images/04006.png' class="img04007" />
27
             <view class="title">{{item.Example}}</view>
29
             <view class="title">{{item.Example}}</view>
28
           </view>
30
           </view>
29
           <view class="right FlexColumn">
31
           <view class="right FlexColumn">
@@ -71,13 +73,6 @@
71
       </view>
73
       </view>
72
     </view>
74
     </view>
73
   </view>
75
   </view>
74
-  <view class="text1">邀请6位新用户可获得永久有效期</view>
75
-  <text class="text2">* 购买前后均可获得,\n如在购买前已满额,在购买后立即生效。</text>
76
-  <view class="text3 FlexRow" catchtap="gotoNewUser">
77
-    <image src="../../images/Triangle.png" class="Triangle" />
78
-    <view>试试看</view>
79
-  </view>
80
-  
81
   <view class="close FlexColumn" catchtap='close'>
76
   <view class="close FlexColumn" catchtap='close'>
82
     <image src='../../images/02024.png' class="closeImage" />
77
     <image src='../../images/02024.png' class="closeImage" />
83
   </view>
78
   </view>

+ 2 - 14
pages/main/list.wxss

@@ -108,6 +108,7 @@
108
 .list2 .title {
108
 .list2 .title {
109
   margin-left: 30rpx;
109
   margin-left: 30rpx;
110
   font-size:58rpx;
110
   font-size:58rpx;
111
+  font-weight: 450;
111
 }
112
 }
112
 
113
 
113
 .list2 .line {
114
 .list2 .line {
@@ -194,7 +195,7 @@
194
   height: 420rpx;
195
   height: 420rpx;
195
   background-color: #F19805;
196
   background-color: #F19805;
196
   border-radius: 40rpx;
197
   border-radius: 40rpx;
197
-  margin-top: 242rpx;
198
+  margin-top: 352rpx;
198
   box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
199
   box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
199
 }
200
 }
200
 .PayInfo .btn1 {
201
 .PayInfo .btn1 {
@@ -217,19 +218,6 @@
217
   width: 518rpx;
218
   width: 518rpx;
218
   height: 167rpx;
219
   height: 167rpx;
219
 }
220
 }
220
-.PayInfo .text1 {
221
-  font-size:32rpx;
222
-  margin-top: 80rpx;
223
-}
224
-.PayInfo .text2 {
225
-  font-size:20rpx;
226
-  margin-top: 20rpx;
227
-  text-align: center;
228
-}
229
-.PayInfo .text3 {
230
-  font-size:36rpx;
231
-  margin-top: 30rpx;
232
-}
233
 .PayInfo .panel2 {
221
 .PayInfo .panel2 {
234
   width: 100%;
222
   width: 100%;
235
   height: 120rpx;
223
   height: 120rpx;

+ 2 - 13
pages/main/search.js

@@ -69,19 +69,8 @@ Page({
69
     }
69
     }
70
   },
70
   },
71
   goto: function (e) {
71
   goto: function (e) {
72
-    var bookid = e.currentTarget.dataset.bookid;
73
-    var unitid = e.currentTarget.dataset.unitid;
74
-    var wordid = e.currentTarget.dataset.wordid;
75
-    var isfinished = e.currentTarget.dataset.isfinished;
76
-    if (!wordid)
77
-      wordid = 0
78
-   
79
-    wx.setStorageSync('SelectedRandom', false);
80
-    wx.setStorageSync('IsAutoPage', false);
81
-    
82
-    wx.navigateTo({
83
-      url: "./detail?Type=search&bookid=" + bookid + "&unitid=" + unitid + "&wordid=" + wordid + "&isfinished=" + isfinished,
84
-    });
72
+    var word = e.currentTarget.dataset.word;
73
+    this.researchWord({detail:{value:word}});
85
   },
74
   },
86
   onShareAppMessage: function () {
75
   onShareAppMessage: function () {
87
     return {
76
     return {

+ 1 - 1
pages/main/search.wxml

@@ -9,7 +9,7 @@
9
     <view class="line"></view>
9
     <view class="line"></view>
10
     <view class="search4">推荐几个常用字</view>
10
     <view class="search4">推荐几个常用字</view>
11
     <view class="search5 FlexRow">
11
     <view class="search5 FlexRow">
12
-      <view class="box" wx:for="{{ExampleArray}}" wx:key="index" bindtap="goto" data-bookid='{{item.BookID}}' data-unitid='{{item.UnitID}}' data-wordid='{{item.WordID}}' data-isfinished='{{item.IsFinished}}'>{{item.Name}}</view>
12
+      <view class="box" wx:for="{{ExampleArray}}" wx:key="index" bindtap="goto" data-word='{{item.Name}}' >{{item.Name}}</view>
13
     </view>
13
     </view>
14
   </block>
14
   </block>
15
 </view>
15
 </view>

+ 4 - 6
utils/main.js

@@ -14,8 +14,9 @@ function getData(url, callback) {
14
       callback(data);
14
       callback(data);
15
     },
15
     },
16
     fail: function () {
16
     fail: function () {
17
-      wx.redirectTo({
18
-        url: './error',
17
+      wx.showToast({
18
+        title: '网络故障,请稍候再试!',
19
+        duration: 3000
19
       });
20
       });
20
     },
21
     },
21
   });
22
   });
@@ -36,12 +37,9 @@ function postData(url, postData, callback) {
36
     },
37
     },
37
     fail: function () {
38
     fail: function () {
38
       wx.showToast({
39
       wx.showToast({
39
-        title: '服务器忙,请稍候再试!',
40
+        title: '网络故障,请稍候再试!',
40
         duration: 3000
41
         duration: 3000
41
       });
42
       });
42
-      wx.redirectTo({
43
-        url: './error',
44
-      });
45
     },
43
     },
46
   });
44
   });
47
 }
45
 }

+ 4 - 3
utils/util.js

@@ -232,9 +232,10 @@ function checkError(err) {
232
       wx.navigateTo({
232
       wx.navigateTo({
233
         url: '../About/ErrorPage',
233
         url: '../About/ErrorPage',
234
         fail: function (e) {
234
         fail: function (e) {
235
-          wx.reLaunch({
236
-            url: '../index/start',
237
-          })
235
+          wx.showToast({
236
+            title: '网络故障,请稍候再试!',
237
+            duration: 3000
238
+          });
238
         }
239
         }
239
       });
240
       });
240
       break;
241
       break;