chengjie 7 vuotta sitten
vanhempi
commit
8adc6f226c

+ 1 - 1
app.js

@@ -15,7 +15,7 @@ App({
15 15
     IsProduction: true,
16 16
     ProgramID: 106,
17 17
     AppID: "wx313a8f2c0741efe1",
18
-    ShareTitle:"识字,让阅读赢在起点",
18
+    ShareTitle:"赢在阅读起跑线",
19 19
     userInfo: null,
20 20
     fileUrl: "https://www.kylx365.com/",
21 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 32
   save: function () {
33 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 57
     else {
49 58
       wx.showToast({
@@ -55,7 +64,7 @@ Page({
55 64
   },
56 65
   setClipboardData: function () {
57 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 68
       success: function (res) {
60 69
         wx.getClipboardData({
61 70
           success: function (res) {

+ 1 - 0
pages/main/cooperation.wxml

@@ -44,6 +44,7 @@
44 44
     </view>
45 45
 
46 46
     <view class="text6">红色部分请勿遗漏,便于了解相互转化</view>
47
+    <view class="text8" bindtap='setClipboardData'>复制到剪贴板</view>
47 48
     <view class="line2"></view>
48 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 145
 .line2{
140 146
   width: 600rpx;
141 147
   height:3rpx;
142 148
   background-color: #593613;
143
-  margin-top:140rpx;
149
+  margin-top:30rpx;
144 150
 }
145 151
 
146 152
 .text7{

+ 28 - 11
pages/main/detail.js

@@ -20,7 +20,7 @@ Page({
20 20
     audioPer: [0, 1, 3, 4],//音色
21 21
     IntervalSecondIndex: 2,//播放间隔秒数索引
22 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 26
   onLoad: function (options) {
@@ -49,7 +49,6 @@ Page({
49 49
       CurrentIndex: wordID,
50 50
       IsFinished: isfinished,
51 51
       IsHelpPosition1: 0,
52
-      IsHelpPosition2: 0,
53 52
       IsReview: false,
54 53
       IsShowWordDetail: false,
55 54
       ShowMenu: "sort",
@@ -91,6 +90,8 @@ Page({
91 90
       });
92 91
     });
93 92
 
93
+    common.getStorageValue(that, "IsHelpPosition1", 1, function () {});
94
+
94 95
     if (this.data.WordType == "normal")
95 96
       this.submitData();
96 97
 
@@ -102,6 +103,13 @@ Page({
102 103
       RecordID: insertID,
103 104
       HanziNumber: hanziNumber,
104 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 114
   submitData: function (content) {
107 115
     if (app.globalData.userInfo && app.globalData.userInfo.UserID) {
@@ -226,7 +234,7 @@ Page({
226 234
           result.IsReview = false;
227 235
 
228 236
           for (var l = 0; l < arrReview.length; l++) {
229
-            if (arrReview[l].Word == result.Name) {
237
+            if (arrReview[l].Name == result.Name) {
230 238
               result.IsReview = true;
231 239
               break;
232 240
             }
@@ -272,6 +280,13 @@ Page({
272 280
     if (e && e.currentTarget.dataset.click)
273 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 290
     var url = app.globalData.audioUrlBaidu;
276 291
     url = url.replace("[token]", app.globalData.BaiduToken);
277 292
     url = url.replace("per=0", "per=" + this.data.audioPer[this.data.SpeakerMan]);
@@ -282,7 +297,7 @@ Page({
282 297
           url = url.replace("[word]", "本次复习" + this.data.List[this.data.CurrentIndex].Title2);
283 298
         else
284 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 302
       else {
288 303
 
@@ -405,20 +420,22 @@ Page({
405 420
   },
406 421
   getImageError: function () {
407 422
     var that = this;
408
-    that.data.List[that.data.CurrentIndex].WordUrl = "";
409
-
410 423
     that.setData({
411
-      List: that.data.List,
412 424
       IsImageError: true,
413 425
     });
414
-
415 426
   },
416 427
   getImageDownload: function () {
417 428
     var that = this;
429
+    wx.showLoading({
430
+      title: '请稍等',
431
+    })
418 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 441
   showWordDetailHandler: function (e) {

+ 11 - 5
pages/main/detail.wxml

@@ -140,6 +140,12 @@
140 140
   </view>
141 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 150
 <view class="settingContainer container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowSetting}}">
145 151
 
@@ -170,7 +176,7 @@
170 176
   <view class="title1">
171 177
     <view class="title1_1">点读</view>
172 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 180
     <view class="title2_1">语音</view>
175 181
     <view class="title2_2 FlexRow">
176 182
       <view>{{SpeakerTitle}}</view>
@@ -192,7 +198,7 @@
192 198
     <view class="line1"></view>
193 199
   </view>
194 200
 
195
-  <view class="title3 FlexRow">
201
+  <view class="title3 FlexRow" wx:if="{{!IsAutoPage}}">
196 202
     <view class="title2_1 FlexColumn">
197 203
       <view>组词播报</view>
198 204
       <view class="title3_2">“中国的国”,以词语形式播报</view>
@@ -200,7 +206,7 @@
200 206
     </view>
201 207
     <switch class='title2_2' checked="{{IsAudioLengthChecked}}" bindchange="settingAudioLength" />
202 208
   </view>
203
-  <view class="line FlexColumn">
209
+  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
204 210
     <view class="line1"></view>
205 211
   </view>
206 212
   <view class="title3 FlexRow">
@@ -214,13 +220,13 @@
214 220
     <view class="line1"></view>
215 221
   </view>
216 222
 
217
-  <view class="title3 FlexRow" wx:if="{{IsAutoPage}}">
223
+  <view class="title2 FlexRow" wx:if="{{IsAutoPage}}">
218 224
     <view class="title2_1 FlexColumn">
219 225
       <view>播放间隔秒数</view>
220 226
     </view>
221 227
 
222 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 230
         <view>
225 231
           {{arrIntervalSecond[IntervalSecondIndex]}} 秒
226 232
         </view>

+ 36 - 2
pages/main/detail.wxss

@@ -73,6 +73,7 @@
73 73
   font-family: 'GB Pinyinok-C';
74 74
   font-weight: normal;
75 75
   font-style: normal;
76
+  height:88rpx;
76 77
 }
77 78
 
78 79
 .main .wordImage{
@@ -159,7 +160,7 @@
159 160
 }
160 161
 
161 162
 .detail .right{
162
-  margin: 30rpx;
163
+  margin: 60rpx;
163 164
 }
164 165
 
165 166
 .detail .line2{
@@ -177,7 +178,7 @@
177 178
 
178 179
 
179 180
 .detail .content2{
180
-  margin: 30rpx 20rpx 30rpx 40rpx;
181
+  margin: 30rpx 20rpx 30rpx 30rpx;
181 182
   background-color: #fff;
182 183
   align-items: flex-start;
183 184
   flex-wrap: wrap;
@@ -298,6 +299,12 @@
298 299
   font-size: 48rpx;
299 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 309
 .settingMenu {
303 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 43
     this.updateProgram();
42 44
   },
43 45
   onShow: function () {

+ 1 - 1
pages/main/index.wxml

@@ -141,7 +141,7 @@
141 141
       </view>
142 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 145
       <image src='../../images/02016.png' class="imgWave" />
146 146
     </view>
147 147
   </block>

+ 5 - 4
pages/main/list.js

@@ -17,6 +17,7 @@ Page({
17 17
       IsShowNav1: true,
18 18
       BookID: bookID,
19 19
       IsShowPayInfo:false,
20
+      IsShow: app.globalData.IsShow,
20 21
     });
21 22
   },
22 23
   onShow: function () {
@@ -35,10 +36,10 @@ Page({
35 36
           var item = result.Units[j];
36 37
           if (app.globalData.userInfo.IsMember == 1)
37 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 44
           item.IsFinished = false;
44 45
           for (var k = 0; k < arrFinished.length; k++) {

+ 5 - 10
pages/main/list.wxml

@@ -21,9 +21,11 @@
21 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 22
         <view class="btn1 FlexRow">
23 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 29
             <view class="title">{{item.Example}}</view>
28 30
           </view>
29 31
           <view class="right FlexColumn">
@@ -71,13 +73,6 @@
71 73
       </view>
72 74
     </view>
73 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 76
   <view class="close FlexColumn" catchtap='close'>
82 77
     <image src='../../images/02024.png' class="closeImage" />
83 78
   </view>

+ 2 - 14
pages/main/list.wxss

@@ -108,6 +108,7 @@
108 108
 .list2 .title {
109 109
   margin-left: 30rpx;
110 110
   font-size:58rpx;
111
+  font-weight: 450;
111 112
 }
112 113
 
113 114
 .list2 .line {
@@ -194,7 +195,7 @@
194 195
   height: 420rpx;
195 196
   background-color: #F19805;
196 197
   border-radius: 40rpx;
197
-  margin-top: 242rpx;
198
+  margin-top: 352rpx;
198 199
   box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
199 200
 }
200 201
 .PayInfo .btn1 {
@@ -217,19 +218,6 @@
217 218
   width: 518rpx;
218 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 221
 .PayInfo .panel2 {
234 222
   width: 100%;
235 223
   height: 120rpx;

+ 2 - 13
pages/main/search.js

@@ -69,19 +69,8 @@ Page({
69 69
     }
70 70
   },
71 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 75
   onShareAppMessage: function () {
87 76
     return {

+ 1 - 1
pages/main/search.wxml

@@ -9,7 +9,7 @@
9 9
     <view class="line"></view>
10 10
     <view class="search4">推荐几个常用字</view>
11 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 13
     </view>
14 14
   </block>
15 15
 </view>

+ 4 - 6
utils/main.js

@@ -14,8 +14,9 @@ function getData(url, callback) {
14 14
       callback(data);
15 15
     },
16 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 38
     fail: function () {
38 39
       wx.showToast({
39
-        title: '服务器忙,请稍候再试!',
40
+        title: '网络故障,请稍候再试!',
40 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 232
       wx.navigateTo({
233 233
         url: '../About/ErrorPage',
234 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 241
       break;