chengjie лет назад: 7
Родитель
Сommit
737f82475d
51 измененных файлов с 1435 добавлено и 142 удалено
  1. 4 3
      app.js
  2. 5 1
      app.json
  3. BIN
      images/02013.png
  4. BIN
      images/02022.png
  5. BIN
      images/02023.png
  6. BIN
      images/02024.png
  7. BIN
      images/02025.png
  8. BIN
      images/02026.png
  9. BIN
      images/02027.png
  10. BIN
      images/02028.png
  11. BIN
      images/04010.png
  12. BIN
      images/06001.png
  13. BIN
      images/06002.png
  14. BIN
      images/06003.png
  15. BIN
      images/06004.png
  16. BIN
      images/07001.png
  17. BIN
      images/Triangle.png
  18. BIN
      images/sharp.png
  19. 2 3
      pages/index/index.js
  20. 1 1
      pages/index/index.json
  21. 15 3
      pages/main/about.js
  22. 1 0
      pages/main/about.wxml
  23. 7 0
      pages/main/about.wxss
  24. 89 0
      pages/main/cooperation.js
  25. 6 0
      pages/main/cooperation.json
  26. 53 0
      pages/main/cooperation.wxml
  27. 151 0
      pages/main/cooperation.wxss
  28. 61 21
      pages/main/detail.js
  29. 43 42
      pages/main/detail.wxml
  30. 2 2
      pages/main/detail.wxss
  31. 79 11
      pages/main/index.js
  32. 50 7
      pages/main/index.wxml
  33. 125 2
      pages/main/index.wxss
  34. 68 32
      pages/main/list.js
  35. 32 8
      pages/main/list.wxml
  36. 76 1
      pages/main/list.wxss
  37. 56 0
      pages/main/newuserlist.js
  38. 7 0
      pages/main/newuserlist.json
  39. 26 0
      pages/main/newuserlist.wxml
  40. 121 0
      pages/main/newuserlist.wxss
  41. 45 0
      pages/main/payfinished.js
  42. 6 0
      pages/main/payfinished.json
  43. 20 0
      pages/main/payfinished.wxml
  44. 81 0
      pages/main/payfinished.wxss
  45. 51 0
      pages/main/paylist.js
  46. 6 0
      pages/main/paylist.json
  47. 31 0
      pages/main/paylist.wxml
  48. 88 0
      pages/main/paylist.wxss
  49. 16 0
      pages/main/search.js
  50. 6 0
      project.config.json
  51. 5 5
      utils/main.js

+ 4 - 3
app.js

@@ -12,7 +12,9 @@ App({
12
   },
12
   },
13
   globalData: {
13
   globalData: {
14
     Version: "1.0.0",
14
     Version: "1.0.0",
15
-    IsProduction: false,
15
+    IsProduction: true,
16
+    ProgramID: 106,
17
+    AppID: "wx313a8f2c0741efe1",
16
     userInfo: null,
18
     userInfo: null,
17
     fileUrl: "https://www.kylx365.com/",
19
     fileUrl: "https://www.kylx365.com/",
18
     serverUrl: "https://www.kylx365.com/apiData/",
20
     serverUrl: "https://www.kylx365.com/apiData/",
@@ -26,11 +28,10 @@ App({
26
     systemInfo: null,
28
     systemInfo: null,
27
     userInfo: null,
29
     userInfo: null,
28
     SourceID: 0,//来源ID
30
     SourceID: 0,//来源ID
29
-    IsRefreshFinished: true,
30
     DayNumber: 0,//使用天数
31
     DayNumber: 0,//使用天数
31
     PayMoney: 9.8,//产品销售价
32
     PayMoney: 9.8,//产品销售价
32
-    TestScoreMax: 0,//测试最高分
33
     BaiduToken:"",//百度开发平台token
33
     BaiduToken:"",//百度开发平台token
34
     IsShow: 0,
34
     IsShow: 0,
35
+    NewUserNumberMax:6,//邀请新用户最大值
35
   }
36
   }
36
 })
37
 })

+ 5 - 1
app.json

@@ -5,12 +5,16 @@
5
     "pages/main/detail",
5
     "pages/main/detail",
6
     "pages/main/search",
6
     "pages/main/search",
7
     "pages/main/about",
7
     "pages/main/about",
8
+    "pages/main/cooperation",
9
+    "pages/main/payfinished",
10
+    "pages/main/paylist",
11
+    "pages/main/newuserlist",
8
     "pages/main/index"
12
     "pages/main/index"
9
   ],
13
   ],
10
   "window": {
14
   "window": {
11
     "backgroundTextStyle": "light",
15
     "backgroundTextStyle": "light",
12
     "navigationBarBackgroundColor": "#F5E2BE",
16
     "navigationBarBackgroundColor": "#F5E2BE",
13
-    "navigationBarTitleText":"识字",
17
+    "navigationBarTitleText":"语文识字",
14
     "navigationBarTextStyle": "black",
18
     "navigationBarTextStyle": "black",
15
     "backgroundColor": "#F5E2BE"   
19
     "backgroundColor": "#F5E2BE"   
16
   }
20
   }

BIN
images/02013.png


BIN
images/02022.png


BIN
images/02023.png


BIN
images/02024.png


BIN
images/02025.png


BIN
images/02026.png


BIN
images/02027.png


BIN
images/02028.png


BIN
images/04010.png


BIN
images/06001.png


BIN
images/06002.png


BIN
images/06003.png


BIN
images/06004.png


BIN
images/07001.png


BIN
images/Triangle.png


BIN
images/sharp.png


+ 2 - 3
pages/index/index.js

@@ -39,7 +39,6 @@ Page({
39
     });
39
     });
40
 
40
 
41
     this.getUserInfo();
41
     this.getUserInfo();
42
-    
43
   },
42
   },
44
   //得到用户信息
43
   //得到用户信息
45
   getUserInfo: function (cb) {
44
   getUserInfo: function (cb) {
@@ -166,8 +165,8 @@ Page({
166
   },
165
   },
167
   onShareAppMessage: function () {
166
   onShareAppMessage: function () {
168
     return {
167
     return {
169
-      title: '',
170
-      path: 'pages/index/index',
168
+      title: '让阅读赢在起点',
169
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
171
       imageUrl: '../../images/07001.png',
170
       imageUrl: '../../images/07001.png',
172
       success: function (res) {
171
       success: function (res) {
173
 
172
 

+ 1 - 1
pages/index/index.json

@@ -1,4 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "语文识字认字",
2
+  "navigationBarTitleText": "语文识字",
3
   "enablePullDownRefresh": false
3
   "enablePullDownRefresh": false
4
 }
4
 }

+ 15 - 3
pages/main/about.js

@@ -10,7 +10,14 @@ Page({
10
   onLoad: function (options) {
10
   onLoad: function (options) {
11
     this.setData({
11
     this.setData({
12
       ListProgram: server.getProgramList(),
12
       ListProgram: server.getProgramList(),
13
-    })
13
+    });
14
+
15
+    if (options.id =="Cooperation"){
16
+      wx.pageScrollTo({
17
+        scrollTop: 905
18
+      });
19
+    }
20
+
14
   },
21
   },
15
   switchProgram: function (e) {
22
   switchProgram: function (e) {
16
     wx.navigateToMiniProgram({
23
     wx.navigateToMiniProgram({
@@ -23,10 +30,15 @@ Page({
23
       }
30
       }
24
     });
31
     });
25
   },
32
   },
33
+  getAppID: function (e) {
34
+    wx.navigateTo({
35
+      url: "./cooperation"
36
+    });
37
+  },
26
   onShareAppMessage: function () {
38
   onShareAppMessage: function () {
27
     return {
39
     return {
28
-      title: '识字练习——让阅读赢在起点',
29
-      path: 'pages/index/index',
40
+      title: '让阅读赢在起点',
41
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
30
       imageUrl: '../../images/07001.png',
42
       imageUrl: '../../images/07001.png',
31
       success: function (res) {
43
       success: function (res) {
32
 
44
 

+ 1 - 0
pages/main/about.wxml

@@ -2,4 +2,5 @@
2
   <image src="../../images/06001.png" class="bg" />
2
   <image src="../../images/06001.png" class="bg" />
3
 
3
 
4
   <view class="btn" wx:for="{{ListProgram}}" wx:key="index" style='left:{{item.left}}rpx;top:{{item.top}}rpx;' bindtap='switchProgram' data-appid="{{item.appId}}" data-path="{{item.path}}"></view>
4
   <view class="btn" wx:for="{{ListProgram}}" wx:key="index" style='left:{{item.left}}rpx;top:{{item.top}}rpx;' bindtap='switchProgram' data-appid="{{item.appId}}" data-path="{{item.path}}"></view>
5
+  <view class="getAppID" bindtap='getAppID' ></view>
5
 </view>
6
 </view>

+ 7 - 0
pages/main/about.wxss

@@ -15,3 +15,10 @@
15
   height:284rpx;
15
   height:284rpx;
16
   position: absolute;
16
   position: absolute;
17
 }
17
 }
18
+.getAppID{
19
+  width:630rpx;
20
+  height:130rpx;
21
+  position: absolute;
22
+  top:2163rpx;
23
+  left:60rpx;
24
+}

+ 89 - 0
pages/main/cooperation.js

@@ -0,0 +1,89 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    IsInput: true,
9
+    Name: "",
10
+    Contact: "",
11
+    ChannelID: 0,
12
+  },
13
+  onLoad: function (options) {
14
+    this.setData({
15
+      IsInput: true,
16
+      Name: "",
17
+      Contact: "",
18
+      AppID: app.globalData.AppID,
19
+      Height: common.getSystemHeight(),
20
+    });
21
+  },
22
+  bindKeyInput1: function (e) {
23
+    this.setData({
24
+      Name: e.detail.value
25
+    })
26
+  },
27
+  bindKeyInput2: function (e) {
28
+    this.setData({
29
+      Contact: e.detail.value
30
+    })
31
+  },
32
+  save: function () {
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
+        });
47
+    }
48
+    else {
49
+      wx.showToast({
50
+        title: '请输入有效信息',
51
+        icon: 'success',
52
+        duration: 2000
53
+      })
54
+    }
55
+  },
56
+  setClipboardData: function () {
57
+    wx.setClipboardData({
58
+      data: '小程序AppID:' + app.globalData.AppID+' 小程序启动Path:pages/index/index?SourceID=' + this.data.ChannelID,
59
+      success: function (res) {
60
+        wx.getClipboardData({
61
+          success: function (res) {
62
+            wx.showToast({
63
+              title: '存入剪贴板',
64
+              icon: 'success',
65
+              duration: 2000
66
+            })
67
+          }
68
+        })
69
+      }
70
+    })
71
+  },
72
+  onShareAppMessage: function () {
73
+    return {
74
+      title: '让阅读赢在起点',
75
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
76
+      imageUrl: '../../images/07001.png',
77
+      success: function (res) {
78
+
79
+      },
80
+      fail: function (err) {
81
+        console.log(err);
82
+      },
83
+      complete: function (res) {
84
+        console.log(res);
85
+      },
86
+    }
87
+  },
88
+
89
+});

+ 6 - 0
pages/main/cooperation.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarBackgroundColor": "#F5E2BE",
3
+  "navigationBarTitleText": "业务合作",
4
+  "backgroundColor": "#F5E2BE",
5
+  "enablePullDownRefresh": false
6
+}

+ 53 - 0
pages/main/cooperation.wxml

@@ -0,0 +1,53 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <view class="panel1"></view>
3
+  <view class="panel4 FlexRow">
4
+    <image class="image06002" src="../../images/06002.png" />
5
+  </view>
6
+
7
+
8
+  <view class="text1">关联你的公众号</view>
9
+  <view class="line"></view>
10
+  <view class="panel2 FlexColumn" wx:if="{{IsInput}}">
11
+    <view class="text2">请登记</view>
12
+    <view class="panel3 FlexColumn">
13
+      <view class="text3">您的公众号名称</view>
14
+      <view class="input1 FlexRow">
15
+        <input class="input1_1" placeholder="" maxlength="30" focus="true" bindinput='bindKeyInput1' />
16
+      </view>
17
+    </view>
18
+    <view class="panel3 FlexColumn">
19
+      <view class="text3">能够联络到您的微信号</view>
20
+      <view class="input1 FlexRow">
21
+        <input class="input1_1" placeholder="" maxlength="30" bindinput='bindKeyInput2' />
22
+      </view>
23
+    </view>
24
+    <view class="text4">请完整、正确填写,非公众号经营者请勿登记。</view>
25
+    <view class="btn" bindtap="save">
26
+      <view class="btn1">登记</view>
27
+    </view>
28
+    <view class="text5">以上信息保密,仅供合作联系之用。</view>
29
+
30
+  </view>
31
+
32
+  <view class="panel2 FlexColumn" wx:if="{{!IsInput}}">
33
+    <view class="text2">请记录</view>
34
+    <view class="panel3 FlexColumn">
35
+      <view class="text3">小程序APPID</view>
36
+      <text class="input2" bindtap='setClipboardData'>{{AppID}}</text>
37
+    </view>
38
+    <view class="panel3 FlexColumn">
39
+      <view class="text3">在path中填写</view>
40
+      <view class="input3 input2 FlexRow" bindtap='setClipboardData'>
41
+        <text>pages/index/index</text>
42
+        <text class="red">?SourceID={{ChannelID}}</text>
43
+      </view>
44
+    </view>
45
+
46
+    <view class="text6">红色部分请勿遗漏,便于了解相互转化</view>
47
+    <view class="line2"></view>
48
+    <text class="text7">由于微信规则限制,在满500个名额后,将为具有优质内容的或提供教育相关资源的公众号优先保留关联席位,敬请海涵。</text>
49
+
50
+  </view>
51
+
52
+
53
+</view>

+ 151 - 0
pages/main/cooperation.wxss

@@ -0,0 +1,151 @@
1
+.container {
2
+  background-color: #DFC7A4;
3
+  justify-content: flex-start;
4
+  color: #1E1E1E;
5
+  font-weight: 500;
6
+}
7
+
8
+.panel1{
9
+  width: 100%;
10
+  height:163rpx;
11
+  background-color: #F5E2BE;
12
+}
13
+
14
+.panel4{
15
+  width: 100%;
16
+  height:263rpx;
17
+  position: absolute;
18
+  top:0;
19
+}
20
+
21
+.image06002{
22
+  width:310rpx;
23
+  height:263rpx;
24
+}
25
+
26
+.text1{
27
+  font-size:36rpx;
28
+  margin-top:160rpx;
29
+  font-weight: 600;
30
+}
31
+
32
+.line{
33
+  width: 252rpx;
34
+  height:12rpx;
35
+  background-color: #1E1E1E;
36
+  margin-top:16rpx;
37
+}
38
+
39
+.panel2{
40
+  width: 100%;
41
+  margin-top:16rpx;
42
+  justify-content: flex-start;
43
+}
44
+
45
+.text2{
46
+  font-size:28rpx;
47
+  margin-top:0rpx;
48
+}
49
+
50
+.panel3{
51
+  width: 600rpx;
52
+  height:132rpx;
53
+  margin-top:40rpx;
54
+  justify-content: flex-start;
55
+  align-items: flex-start;
56
+}
57
+
58
+.text3{
59
+  font-size:24rpx;
60
+  margin-left:20rpx;
61
+  font-weight: 400;
62
+}
63
+.input1{
64
+  background-color: #fff;
65
+  border-radius: 14rpx;
66
+  width: 600rpx;
67
+  height:90rpx;
68
+  margin-top: 10rpx;
69
+}
70
+.input1_1{
71
+  font-size:36rpx;
72
+  font-weight: 400;
73
+  width: 540rpx;
74
+  height:90rpx;
75
+  line-height: 90rpx;
76
+}
77
+
78
+.text4{
79
+  font-size:24rpx;
80
+  color:#A20602;
81
+  margin-top:88rpx;
82
+}
83
+
84
+
85
+.btn {
86
+  width: 600rpx;
87
+  height: 104rpx;
88
+  background-color: #035834;
89
+  border-radius: 14rpx;
90
+  margin-top: 20rpx;
91
+}
92
+
93
+.btn1 {
94
+  width: 100%;
95
+  height: 90rpx;
96
+  background-color: #03AF69;
97
+  border-radius: 14rpx;
98
+  position:relative;
99
+  top:0;
100
+  font-size: 36rpx;
101
+  text-align: center;
102
+  line-height: 90rpx;
103
+  color:#fff;
104
+}
105
+
106
+.text5{
107
+  font-size:24rpx;
108
+  margin-top:20rpx;
109
+  font-weight: 400;
110
+}
111
+
112
+.input2{
113
+  background-color: #CDB797;
114
+  border-radius: 14rpx;
115
+  font-size:36rpx;
116
+  width: 600rpx;
117
+  height:90rpx;
118
+  line-height: 90rpx;
119
+  margin-top: 10rpx;
120
+  text-align: center;
121
+}
122
+
123
+.input3{
124
+  font-size:30rpx;
125
+}
126
+
127
+.red{
128
+  color:#A20602;
129
+}
130
+
131
+
132
+.text6{
133
+  font-size:20rpx;
134
+  margin-top:10rpx;
135
+  margin-left: 230rpx;
136
+}
137
+
138
+
139
+.line2{
140
+  width: 600rpx;
141
+  height:3rpx;
142
+  background-color: #593613;
143
+  margin-top:140rpx;
144
+}
145
+
146
+.text7{
147
+  font-size:24rpx;
148
+  margin-top:40rpx;
149
+  font-weight: 400;
150
+  width: 560rpx;
151
+}

+ 61 - 21
pages/main/detail.js

@@ -12,7 +12,7 @@ Page({
12
   data: {
12
   data: {
13
     IsAutoPlay: true,//是否自动播放
13
     IsAutoPlay: true,//是否自动播放
14
     IsAutoPage: false,//是否自动翻页
14
     IsAutoPage: false,//是否自动翻页
15
-    SortTitle: "课文顺序",//排序
15
+    SortTitle: "课本一致",//排序
16
     PlayChecked: "checked",
16
     PlayChecked: "checked",
17
     PageChecked: "",
17
     PageChecked: "",
18
     IsFinished: false,//是否练会了
18
     IsFinished: false,//是否练会了
@@ -124,9 +124,10 @@ Page({
124
           var item = arr[i].Units[j];
124
           var item = arr[i].Units[j];
125
           if (item.ID == this.data.UnitID) {
125
           if (item.ID == this.data.UnitID) {
126
             for (var k = 0; k < item.Words.length; k++) {
126
             for (var k = 0; k < item.Words.length; k++) {
127
+              item.Words[k].PinyinAll = item.Words[k].Pinyin;
127
               if (item.Words[k].Pinyin.indexOf(",") > 0)
128
               if (item.Words[k].Pinyin.indexOf(",") > 0)
128
                 item.Words[k].Pinyin = item.Words[k].Pinyin.substr(0, item.Words[k].Pinyin.indexOf(","));
129
                 item.Words[k].Pinyin = item.Words[k].Pinyin.substr(0, item.Words[k].Pinyin.indexOf(","));
129
-
130
+              
130
               item.Words[k].WordUrl = app.globalData.imageUrl + "/images/hanzi" + item.Words[k].Name + ".jpg";
131
               item.Words[k].WordUrl = app.globalData.imageUrl + "/images/hanzi" + item.Words[k].Name + ".jpg";
131
 
132
 
132
               item.Words[k].IsReview = false;
133
               item.Words[k].IsReview = false;
@@ -169,6 +170,10 @@ Page({
169
     var arrReview = wx.getStorageSync("ReviewList");
170
     var arrReview = wx.getStorageSync("ReviewList");
170
     for (var l = 0; l < arrReview.length; l++) {
171
     for (var l = 0; l < arrReview.length; l++) {
171
       var item = arrReview[l];
172
       var item = arrReview[l];
173
+      item.PinyinAll = item.Pinyin;
174
+      if (item.Pinyin.indexOf(",")>0)
175
+        item.Pinyin = item.Pinyin.substr(0, item.Pinyin.indexOf(","));
176
+
172
       item.WordUrl = app.globalData.imageUrl + "/images/hanzi" + item.Name + ".jpg";
177
       item.WordUrl = app.globalData.imageUrl + "/images/hanzi" + item.Name + ".jpg";
173
       item.IsReview = true;
178
       item.IsReview = true;
174
     }
179
     }
@@ -196,9 +201,16 @@ Page({
196
     });
201
     });
197
   },
202
   },
198
   initSearch: function () {
203
   initSearch: function () {
199
-    var arr = JSON.parse(wx.getStorageSync("HanziAll"));
204
+    var that = this;
205
+
200
     var result = wx.getStorageSync("CurrentSearchWord");
206
     var result = wx.getStorageSync("CurrentSearchWord");
201
     result.WordUrl += "?" + new Date().getTime();
207
     result.WordUrl += "?" + new Date().getTime();
208
+    result.PinyinAll = result.Pinyin;
209
+    if (result.Pinyin && result.Pinyin.indexOf(",")>0)
210
+      result.Pinyin = result.Pinyin.substr(0, result.Pinyin.indexOf(","));
211
+
212
+
213
+    var arr = JSON.parse(wx.getStorageSync("HanziAll"));
202
     var arrReview = wx.getStorageSync("ReviewList");
214
     var arrReview = wx.getStorageSync("ReviewList");
203
     var title = "汉字";
215
     var title = "汉字";
204
     for (var i = 0; i < arr.length; i++) {
216
     for (var i = 0; i < arr.length; i++) {
@@ -228,15 +240,30 @@ Page({
228
       IsEnd: true,
240
       IsEnd: true,
229
     }
241
     }
230
     resultArr.push(obj);
242
     resultArr.push(obj);
231
-    this.setData({
232
-      List: resultArr,
233
-    });
234
 
243
 
235
     wx.setNavigationBarTitle({
244
     wx.setNavigationBarTitle({
236
       title: title
245
       title: title
237
     });
246
     });
247
+    
248
+    if (result.IsNew) {
249
+      wx.showLoading({
250
+        title: '加载中',
251
+      })
252
+      setTimeout(function () {
253
+        wx.hideLoading();
254
+        that.setData({
255
+          List: resultArr,
256
+        });
257
+        that.restart(that.data.CurrentIndex);
258
+      }, 5000)
259
+    }
260
+    else{
261
+      that.setData({
262
+        List: resultArr,
263
+      });
264
+      that.restart(that.data.CurrentIndex);
265
+    }
238
 
266
 
239
-    this.restart(this.data.CurrentIndex);
240
   },
267
   },
241
   playAudio: function (e) {
268
   playAudio: function (e) {
242
     //console.log("playAudio");
269
     //console.log("playAudio");
@@ -258,24 +285,30 @@ Page({
258
       }
285
       }
259
       else {
286
       else {
260
 
287
 
261
-        var pinyinItem = this.data.List[this.data.CurrentIndex].Pinyin;
262
-        if (e && e.currentTarget.dataset.pinyin)
263
-          pinyinItem = e.currentTarget.dataset.pinyin;
288
+        var pinyinItem = this.data.List[this.data.CurrentIndex].PinyinAll;
289
+        
264
         if (pinyinItem) {
290
         if (pinyinItem) {
265
-          pinyinItem = pinyin.getPinyinName(pinyinItem);
291
+          var pinyinStr = "";
292
+          if (pinyinItem.indexOf(",")>0){
293
+            pinyinItem=pinyinItem.substr(0,pinyinItem.indexOf(","));
294
+            pinyinStr = "(" + pinyin.getPinyinName(pinyinItem)+")";
295
+          }
266
 
296
 
267
           var Name = this.data.List[this.data.CurrentIndex].Name;
297
           var Name = this.data.List[this.data.CurrentIndex].Name;
268
-          var CombineWords = this.data.List[this.data.CurrentIndex].CombineWords;
269
-          CombineWords = CombineWords.replace(Name, Name + "(" + pinyinItem + ")");
270
-          if ((e && e.currentTarget.dataset.pinyin) || !this.data.IsAudioLengthChecked) {
271
-            url = url.replace("[word]", Name + "(" + pinyinItem + ")");
298
+          if (!this.data.IsAudioLengthChecked) {
299
+            url = url.replace("[word]", Name + pinyinStr);
272
             url = url.replace("spd=3", "spd=1");
300
             url = url.replace("spd=3", "spd=1");
273
           }
301
           }
274
           else {
302
           else {
275
-            url = url.replace("[word]", Name + "(" + pinyinItem + ")," + CombineWords + "的" + Name + "(" + pinyinItem + ")");
303
+            var CombineWords = this.data.List[this.data.CurrentIndex].CombineWords;
304
+            if (CombineWords)
305
+              CombineWords = ","+CombineWords.replace(Name, Name + pinyinStr)+"的"+Name;
306
+
307
+            url = url.replace("[word]", Name + pinyinStr + CombineWords + pinyinStr);
276
           }
308
           }
277
         }
309
         }
278
       }
310
       }
311
+      url=encodeURI(url);
279
       this.audioCtx.setSrc(url);
312
       this.audioCtx.setSrc(url);
280
       this.audioCtx.play();
313
       this.audioCtx.play();
281
     }
314
     }
@@ -365,9 +398,16 @@ Page({
365
     });
398
     });
366
   },
399
   },
367
   getImageError: function () {
400
   getImageError: function () {
368
-    this.setData({
401
+    var that = this;
402
+    that.setData({
369
       IsImageError: true,
403
       IsImageError: true,
370
     });
404
     });
405
+    if (that.data.WordType == "normal")
406
+      that.init();
407
+    else if (that.data.WordType == "review")
408
+      that.initReview();
409
+    else if (that.data.WordType == "search")
410
+      that.initSearch();
371
   },
411
   },
372
   getImageDownload: function () {
412
   getImageDownload: function () {
373
     this.data.List[this.data.CurrentIndex].WordUrl += common.random(0, 9);
413
     this.data.List[this.data.CurrentIndex].WordUrl += common.random(0, 9);
@@ -484,11 +524,11 @@ Page({
484
     var title = "";
524
     var title = "";
485
     var selectedRandom = true;
525
     var selectedRandom = true;
486
     if (result == "false") {
526
     if (result == "false") {
487
-      title = "课文排序";
527
+      title = "课本一致";
488
       selectedRandom = false;
528
       selectedRandom = false;
489
     }
529
     }
490
     else {
530
     else {
491
-      title = "随机排序";
531
+      title = "随机";
492
     }
532
     }
493
     this.setData({
533
     this.setData({
494
       isShowSettingMenu: false,
534
       isShowSettingMenu: false,
@@ -685,8 +725,8 @@ Page({
685
   },
725
   },
686
   onShareAppMessage: function () {
726
   onShareAppMessage: function () {
687
     return {
727
     return {
688
-      title: '识字练习——让阅读赢在起点',
689
-      path: 'pages/index/index',
728
+      title: '让阅读赢在起点',
729
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
690
       imageUrl: '../../images/07001.png',
730
       imageUrl: '../../images/07001.png',
691
       success: function (res) {
731
       success: function (res) {
692
 
732
 

+ 43 - 42
pages/main/detail.wxml

@@ -112,7 +112,7 @@
112
       </view>
112
       </view>
113
       <view class="btn FlexColumn" bindtap='prevHandler' wx:if="{{!(IsShowPrev && !IsAutoPage) }}">
113
       <view class="btn FlexColumn" bindtap='prevHandler' wx:if="{{!(IsShowPrev && !IsAutoPage) }}">
114
       </view>
114
       </view>
115
-      
115
+
116
       <view class="btn FlexColumn" bindtap='reviewHandler'>
116
       <view class="btn FlexColumn" bindtap='reviewHandler'>
117
         <image wx:if="{{!List[CurrentIndex].IsReview && IsShowNext && !IsAutoPage}}" src='../../images/05002.png' class="btnImage05002" />
117
         <image wx:if="{{!List[CurrentIndex].IsReview && IsShowNext && !IsAutoPage}}" src='../../images/05002.png' class="btnImage05002" />
118
         <image wx:if="{{List[CurrentIndex].IsReview && IsShowNext && !IsAutoPage}}" src='../../images/05003.png' class="btnImage05002" />
118
         <image wx:if="{{List[CurrentIndex].IsReview && IsShowNext && !IsAutoPage}}" src='../../images/05003.png' class="btnImage05002" />
@@ -135,7 +135,7 @@
135
       </view>
135
       </view>
136
       <view class="btn FlexColumn" bindtap='nextHandler' data-status="click" wx:if="{{!(IsShowNext && !IsAutoPage && WordType!='search')}}">
136
       <view class="btn FlexColumn" bindtap='nextHandler' data-status="click" wx:if="{{!(IsShowNext && !IsAutoPage && WordType!='search')}}">
137
       </view>
137
       </view>
138
-      
138
+
139
     </view>
139
     </view>
140
   </view>
140
   </view>
141
 </view>
141
 </view>
@@ -144,29 +144,62 @@
144
 <view class="settingContainer container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowSetting}}">
144
 <view class="settingContainer container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowSetting}}">
145
 
145
 
146
   <view class="title1">
146
   <view class="title1">
147
-    <view class="title1_1">汉字显示</view>
147
+    <view class="title1_1">内容</view>
148
   </view>
148
   </view>
149
   <view class="line FlexColumn">
149
   <view class="line FlexColumn">
150
     <view class="line1"></view>
150
     <view class="line1"></view>
151
   </view>
151
   </view>
152
   <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="sort">
152
   <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="sort">
153
-    <view class="title2_1">序</view>
153
+    <view class="title2_1">汉字排序</view>
154
     <view class="title2_2 FlexRow">
154
     <view class="title2_2 FlexRow">
155
       <view>{{SortTitle}}</view>
155
       <view>{{SortTitle}}</view>
156
       <image src='../../images/Arrow.png' class="Arrow" />
156
       <image src='../../images/Arrow.png' class="Arrow" />
157
     </view>
157
     </view>
158
   </view>
158
   </view>
159
+  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
160
+    <view class="line1"></view>
161
+  </view>
162
+
163
+  <view class="title2 FlexRow">
164
+    <view class="title2_1 FlexColumn">
165
+      <view>拼音显示</view>
166
+    </view>
167
+    <switch class='title2_2' checked="{{ShowPinyin}}" bindchange="settingShowPinyin" />
168
+  </view>
159
 
169
 
160
   <view class="title1">
170
   <view class="title1">
161
-    <view class="title1_1">汉字朗读</view>
171
+    <view class="title1_1">读</view>
162
   </view>
172
   </view>
163
   <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="speaker">
173
   <view class="title2 FlexRow" bindtap='showSettingMenu' data-status="speaker">
164
-    <view class="title2_1">发音人</view>
174
+    <view class="title2_1">语音</view>
165
     <view class="title2_2 FlexRow">
175
     <view class="title2_2 FlexRow">
166
       <view>{{SpeakerTitle}}</view>
176
       <view>{{SpeakerTitle}}</view>
167
       <image src='../../images/Arrow.png' class="Arrow" />
177
       <image src='../../images/Arrow.png' class="Arrow" />
168
     </view>
178
     </view>
169
   </view>
179
   </view>
180
+
181
+  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
182
+    <view class="line1"></view>
183
+  </view>
184
+  <view class="title2 FlexRow" wx:if="{{!IsAutoPage}}">
185
+    <view class="title2_1 FlexColumn">
186
+      <view>自动播报</view>
187
+    </view>
188
+    <switch class='title2_2' checked="{{PlayChecked}}" bindchange="settingPlay" />
189
+  </view>
190
+
191
+  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
192
+    <view class="line1"></view>
193
+  </view>
194
+
195
+  <view class="title3 FlexRow">
196
+    <view class="title2_1 FlexColumn">
197
+      <view>组词播报</view>
198
+      <view class="title3_2">“中国的国”,以词语形式播报</view>
199
+
200
+    </view>
201
+    <switch class='title2_2' checked="{{IsAudioLengthChecked}}" bindchange="settingAudioLength" />
202
+  </view>
170
   <view class="line FlexColumn">
203
   <view class="line FlexColumn">
171
     <view class="line1"></view>
204
     <view class="line1"></view>
172
   </view>
205
   </view>
@@ -198,38 +231,6 @@
198
   </view>
231
   </view>
199
 
232
 
200
 
233
 
201
-  <view class="title3 FlexRow" wx:if="{{!IsAutoPage}}">
202
-    <view class="title2_1 FlexColumn">
203
-      <view>默认播放读音</view>
204
-    </view>
205
-    <switch class='title2_2' checked="{{PlayChecked}}" bindchange="settingPlay" />
206
-  </view>
207
-
208
-  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
209
-    <view class="line1"></view>
210
-  </view>
211
-
212
-  <view class="title3 FlexRow">
213
-    <view class="title2_1 FlexColumn">
214
-      <view>默认显示拼音</view>
215
-    </view>
216
-    <switch class='title2_2' checked="{{ShowPinyin}}" bindchange="settingShowPinyin" />
217
-  </view>
218
-
219
-  <view class="line FlexColumn" wx:if="{{!IsAutoPage}}">
220
-    <view class="line1"></view>
221
-  </view>
222
-
223
-  <view class="title3 FlexRow">
224
-    <view class="title2_1 FlexColumn">
225
-      <view>组词播报</view>
226
-      <view class="title3_2">“中国的国”,以组词形式播报</view>
227
-
228
-    </view>
229
-    <switch class='title2_2' checked="{{IsAudioLengthChecked}}" bindchange="settingAudioLength" />
230
-  </view>
231
-
232
-
233
   <view class="bottom FlexColumn" bindtap='closeSetting'>
234
   <view class="bottom FlexColumn" bindtap='closeSetting'>
234
     <view class="bottom1 FlexRow">
235
     <view class="bottom1 FlexRow">
235
       返回
236
       返回
@@ -244,15 +245,15 @@
244
     <block wx:if="{{ShowMenu=='sort'}}">
245
     <block wx:if="{{ShowMenu=='sort'}}">
245
       <view class="settingMenuBasic2 FlexColumn">
246
       <view class="settingMenuBasic2 FlexColumn">
246
         <image class="settingMenuIcon" src="../../images/303.png" />
247
         <image class="settingMenuIcon" src="../../images/303.png" />
247
-        <view class="word2">选择汉字显示顺序</view>
248
+        <view class="word2">选择章节内汉字的排列顺序</view>
248
       </view>
249
       </view>
249
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="false">
250
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="false">
250
-        <view class="word">按课文顺序排序</view>
251
+        <view class="word">课本一致</view>
251
         <image class="SelectLogo" src="../../images/012.png" hidden="{{selectedRandom}}" />
252
         <image class="SelectLogo" src="../../images/012.png" hidden="{{selectedRandom}}" />
252
       </view>
253
       </view>
253
       <view style='height:2rpx'></view>
254
       <view style='height:2rpx'></view>
254
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="true">
255
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="true">
255
-        <view class="word">随机排序</view>
256
+        <view class="word">随机</view>
256
         <image class="SelectLogo" src="../../images/012.png" hidden="{{!selectedRandom}}" />
257
         <image class="SelectLogo" src="../../images/012.png" hidden="{{!selectedRandom}}" />
257
       </view>
258
       </view>
258
     </block>
259
     </block>
@@ -260,7 +261,7 @@
260
     <block wx:if="{{ShowMenu=='speaker'}}">
261
     <block wx:if="{{ShowMenu=='speaker'}}">
261
       <view class="settingMenuBasic2 FlexColumn">
262
       <view class="settingMenuBasic2 FlexColumn">
262
         <image class="settingMenuIcon" src="../../images/130.png" />
263
         <image class="settingMenuIcon" src="../../images/130.png" />
263
-        <view class="word2">选择发音人</view>
264
+        <view class="word2">选择语音风格</view>
264
       </view>
265
       </view>
265
       <block wx:for="{{SpeakerArray}}" wx:key="index">
266
       <block wx:for="{{SpeakerArray}}" wx:key="index">
266
         <view style='height:2rpx'></view>
267
         <view style='height:2rpx'></view>

+ 2 - 2
pages/main/detail.wxss

@@ -233,7 +233,7 @@
233
 
233
 
234
 .settingContainer .title2 {
234
 .settingContainer .title2 {
235
   width: 100%;
235
   width: 100%;
236
-  background-color: #F8F8F8;
236
+  background-color: #FFFFFF;
237
   font-size: 28rpx;
237
   font-size: 28rpx;
238
   height: 100rpx;
238
   height: 100rpx;
239
   justify-content: space-between;
239
   justify-content: space-between;
@@ -257,7 +257,7 @@
257
 
257
 
258
 .settingContainer .title3 {
258
 .settingContainer .title3 {
259
   width: 100%;
259
   width: 100%;
260
-  background-color: #F8F8F8;
260
+  background-color: #FFFFFF;
261
   font-size: 28rpx;
261
   font-size: 28rpx;
262
   height: 139rpx;
262
   height: 139rpx;
263
   justify-content: space-between;
263
   justify-content: space-between;

+ 79 - 11
pages/main/index.js

@@ -11,7 +11,8 @@ Page({
11
     Version: app.globalData.Version,
11
     Version: app.globalData.Version,
12
     ListProgram: server.getProgramList(),
12
     ListProgram: server.getProgramList(),
13
     NickName: "陌生用户",
13
     NickName: "陌生用户",
14
-    IsMember: false,
14
+    IsMember: 0,
15
+    NewUserNumber: 2,
15
     AvatarUrl: "",
16
     AvatarUrl: "",
16
     DayNumber: "0",
17
     DayNumber: "0",
17
     ReviewCount: "0",
18
     ReviewCount: "0",
@@ -20,10 +21,11 @@ Page({
20
     NavClass1: "",
21
     NavClass1: "",
21
     NavClass2: "nav2",
22
     NavClass2: "nav2",
22
     IsRemind: false,
23
     IsRemind: false,
24
+    IsMemberForeverRemind:false,
23
   },
25
   },
24
   onReady: function (e) {
26
   onReady: function (e) {
25
   },
27
   },
26
-  onLoad: function () {
28
+  onLoad: function (options) {
27
     this.setData({
29
     this.setData({
28
       Height: common.getSystemHeight(),
30
       Height: common.getSystemHeight(),
29
       NickName: app.globalData.userInfo.NickName,
31
       NickName: app.globalData.userInfo.NickName,
@@ -35,14 +37,12 @@ Page({
35
         IsAccredit: true,
37
         IsAccredit: true,
36
       });
38
       });
37
     }
39
     }
40
+
41
+    this.updateProgram();
38
   },
42
   },
39
   onShow: function () {
43
   onShow: function () {
40
     this.getData();
44
     this.getData();
41
-    if (app.globalData.userInfo.IsMember == 1) {
42
-      this.setData({
43
-        IsMember: true,
44
-      });
45
-    }
45
+    
46
     if (!this.data.IsAccredit) {
46
     if (!this.data.IsAccredit) {
47
       var IsRemindAccredit = wx.getStorageSync("IsRemindAccredit");
47
       var IsRemindAccredit = wx.getStorageSync("IsRemindAccredit");
48
       if (IsRemindAccredit == 1) {
48
       if (IsRemindAccredit == 1) {
@@ -192,12 +192,25 @@ Page({
192
           HanziNumber: hanziNumber,
192
           HanziNumber: hanziNumber,
193
           FinishedCount: finishedCount,
193
           FinishedCount: finishedCount,
194
           ReviewCount: reviewCount,
194
           ReviewCount: reviewCount,
195
+          IsFirstDay: data.IsFirstDay,
196
+          NewUserNumber: data.NewUserNumber,
197
+          NewUserNumberMax: app.globalData.NewUserNumberMax,
198
+          IsMember: data.IsMember,
195
           IsShow: data.IsShow,
199
           IsShow: data.IsShow,
196
         });
200
         });
197
 
201
 
198
         wx.setStorageSync("FinishedList", data.FinishedList);
202
         wx.setStorageSync("FinishedList", data.FinishedList);
199
         wx.setStorageSync("ReviewList", data.ReviewList);
203
         wx.setStorageSync("ReviewList", data.ReviewList);
200
 
204
 
205
+        common.getStorageValue(that, "IsMemberForeverRemind", 0, function () {
206
+          if (that.data.IsMemberForeverRemind==0 && that.data.NewUserNumber >= app.globalData.NewUserNumberMax){
207
+            that.setData({
208
+              IsMemberForeverRemind: 1,
209
+            });
210
+            wx.setStorageSync("IsMemberForeverRemind", 2);
211
+          }
212
+        });
213
+
201
         if (data.DayNumber2)
214
         if (data.DayNumber2)
202
           app.globalData.DayNumber = data.DayNumber2;
215
           app.globalData.DayNumber = data.DayNumber2;
203
         else
216
         else
@@ -205,6 +218,8 @@ Page({
205
 
218
 
206
         if (data.IsShow)
219
         if (data.IsShow)
207
           app.globalData.IsShow = data.IsShow;
220
           app.globalData.IsShow = data.IsShow;
221
+        
222
+        app.globalData.userInfo.IsMember = data.IsMember;
208
 
223
 
209
       }
224
       }
210
     });
225
     });
@@ -239,9 +254,10 @@ Page({
239
       url: "./search",
254
       url: "./search",
240
     });
255
     });
241
   },
256
   },
242
-  gotoAbout: function () {
257
+  gotoAbout: function (e) {
258
+    var id=e.currentTarget.dataset.id;
243
     wx.navigateTo({
259
     wx.navigateTo({
244
-      url: "./about"
260
+      url: "./about?id="+id
245
     });
261
     });
246
   },
262
   },
247
   gotoReview: function () {
263
   gotoReview: function () {
@@ -250,6 +266,36 @@ Page({
250
       url: './detail?Type=' + id,
266
       url: './detail?Type=' + id,
251
     });
267
     });
252
   },
268
   },
269
+  gotoNewUser: function () {
270
+    wx.navigateTo({
271
+      url: './newuserlist',
272
+    });
273
+  },
274
+  gotoPayList: function () {
275
+    wx.navigateTo({
276
+      url: './paylist',
277
+    });
278
+  }, 
279
+  close: function () {
280
+    this.setData({
281
+      IsMemberForeverRemind: 2,
282
+    });
283
+  },
284
+  getPay: function (e) {
285
+    if (!isPaying) {
286
+      isPaying = true;
287
+      var that = this;
288
+      var money = app.globalData.PayMoney;
289
+      server.payMoney(3, money, function () {
290
+        wx.navigateTo({
291
+          url: './payfinished',
292
+        });
293
+      });
294
+      setTimeout(function () {
295
+        isPaying = false;
296
+      }, 10000);
297
+    }
298
+  },
253
   switchProgram: function (e) {
299
   switchProgram: function (e) {
254
     wx.navigateToMiniProgram({
300
     wx.navigateToMiniProgram({
255
       appId: e.currentTarget.dataset.appid,
301
       appId: e.currentTarget.dataset.appid,
@@ -261,10 +307,32 @@ Page({
261
       }
307
       }
262
     });
308
     });
263
   },
309
   },
310
+  updateProgram: function () {
311
+    const updateManager = wx.getUpdateManager();
312
+
313
+    updateManager.onCheckForUpdate(function (res) {
314
+      // 请求完新版本信息的回调
315
+      console.log(res.hasUpdate)
316
+    });
317
+
318
+    updateManager.onUpdateReady(function () {
319
+      wx.showModal({
320
+        title: '更新提示',
321
+        content: '新版本已经准备好,是否重启应用?',
322
+        success: function (res) {
323
+          if (res.confirm) {
324
+            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
325
+            updateManager.applyUpdate()
326
+          }
327
+        }
328
+      });
329
+
330
+    });
331
+  },
264
   onShareAppMessage: function () {
332
   onShareAppMessage: function () {
265
     return {
333
     return {
266
-      title: '识字练习——让阅读赢在起点',
267
-      path: 'pages/index/index',
334
+      title: '让阅读赢在起点',
335
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
268
       imageUrl: '../../images/07001.png',
336
       imageUrl: '../../images/07001.png',
269
       success: function (res) {
337
       success: function (res) {
270
 
338
 

+ 50 - 7
pages/main/index.wxml

@@ -65,10 +65,12 @@
65
     </view>
65
     </view>
66
 
66
 
67
     <view class="index3 FlexColumn">
67
     <view class="index3 FlexColumn">
68
-      <image src='{{AvatarUrl}}' class="Avatar" bindtap="getAccredit" />
68
+      <image src='{{AvatarUrl}}' class="Avatar" bindtap="gotoPayList">
69
+        <view class="gear FlexRow"><image src='../../images/02022.png' class="img" /></view>
70
+      </image>
69
       <view class="NickName">{{NickName}}</view>
71
       <view class="NickName">{{NickName}}</view>
70
-      <view class="Member2 Member" wx:if="{{!IsMember}}">非会员</view>
71
-      <view class="Member" wx:if="{{IsMember}}">付费会员</view>
72
+      <view class="Member2 Member" wx:if="{{IsMember==0}}">非会员</view>
73
+      <view class="Member" wx:if="{{IsMember==1}}">付费会员</view>
72
       <view class="index3_0 FlexRow">
74
       <view class="index3_0 FlexRow">
73
         <view class="index3_1 FlexColumn">
75
         <view class="index3_1 FlexColumn">
74
           <view class="index3_1_1 FlexRow">
76
           <view class="index3_1_1 FlexRow">
@@ -113,20 +115,42 @@
113
         <image src='../../images/02015.png' class="Share" />
115
         <image src='../../images/02015.png' class="Share" />
114
         <view class="">分享</view>
116
         <view class="">分享</view>
115
       </button>
117
       </button>
118
+    </view>
119
+
120
+    <view class="payInfo FlexColumn" wx:if="{{IsShow==1 && (IsMember==0 || NewUserNumber<NewUserNumberMax)}}">
121
+      <!-- 首日 -->
122
+      <image src='../../images/02025.png' class="img02025" wx:if="{{IsMember==0 && IsFirstDay}}">
123
+        <view class="payButton" bindtap='getPay'></view>
124
+      </image>
125
+      <!-- 次日 -->
126
+      <image src='../../images/02026.png' class="img02026 img02025" wx:if="{{IsMember==0 && !IsFirstDay && NewUserNumber<NewUserNumberMax}}">
127
+        <view class="payButton2 payButton" bindtap='getPay'></view>
128
+        <view class="getNewUser" bindtap='gotoNewUser'></view>
129
+      </image>
130
+      <!-- 满员 -->
131
+      <image src='../../images/02027.png' class="img02027 img02025" wx:if="{{IsMember==0 && !IsFirstDay && NewUserNumber>=NewUserNumberMax}}">
132
+        <view class="payButton2 payButton" bindtap='getPay'></view>
133
+      </image>
134
+      <!-- 已付 -->
135
+      <image src='../../images/02028.png' class="img02028 img02025" wx:if="{{IsMember==1 && !IsFirstDay && NewUserNumber<NewUserNumberMax}}">
136
+        <view class="getNewUser2 getNewUser" bindtap='gotoNewUser'></view>
137
+      </image>
116
 
138
 
139
+      <view class="index10 index9 FlexRow">
140
+        <image src='../../images/02016.png' class="imgWave" />
141
+      </view>
117
     </view>
142
     </view>
118
 
143
 
119
-    <view class="index9 FlexRow">
144
+    <view class="index9 FlexRow" wx:if="{{IsMember==1 && NewUserNumber>=NewUserNumberMax}}">
120
       <image src='../../images/02016.png' class="imgWave" />
145
       <image src='../../images/02016.png' class="imgWave" />
121
     </view>
146
     </view>
122
   </block>
147
   </block>
123
-  
148
+
124
   <block wx:if="{{NavClass1=='nav2'}}">
149
   <block wx:if="{{NavClass1=='nav2'}}">
125
     <view class="index6 FlexColumn">
150
     <view class="index6 FlexColumn">
126
       <image src='../../images/{{item.ImageUrl}}' class="btn2" wx:for="{{ListProgram}}" wx:key="index" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}' />
151
       <image src='../../images/{{item.ImageUrl}}' class="btn2" wx:for="{{ListProgram}}" wx:key="index" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}' />
127
     </view>
152
     </view>
128
   </block>
153
   </block>
129
-
130
   <view class="index5 FlexColumn">
154
   <view class="index5 FlexColumn">
131
 
155
 
132
     <view class="FooterDescription_1">©2014-2018 语文识字 - 小学生素质练习系列产品</view>
156
     <view class="FooterDescription_1">©2014-2018 语文识字 - 小学生素质练习系列产品</view>
@@ -136,7 +160,7 @@
136
         <view class="index5_1_1">意见反馈</view>
160
         <view class="index5_1_1">意见反馈</view>
137
       </button>
161
       </button>
138
       <view class="line"></view>
162
       <view class="line"></view>
139
-      <view class="feedback1 feedback" bindtap='gotoAbout'>关联您的公众号</view>
163
+      <view class="feedback1 feedback" bindtap='gotoAbout' data-id='Cooperation'>关联您的公众号</view>
140
       <view class="line"></view>
164
       <view class="line"></view>
141
       <view class="feedback" bindtap='gotoAbout'>业务合作</view>
165
       <view class="feedback" bindtap='gotoAbout'>业务合作</view>
142
     </view>
166
     </view>
@@ -149,4 +173,23 @@
149
 
173
 
150
   </view>
174
   </view>
151
 
175
 
176
+</view>
177
+
178
+<view class="IsMemberForever container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsMemberForeverRemind==1}}">
179
+  <view class="btn">
180
+    <view class="btn1 FlexColumn" catchtap="gotoPayList">
181
+      <view class="panel1 FlexColumn">
182
+        <image src='../../images/02023.png' class="img" />
183
+        <view class="text1">恭喜你</view>
184
+        <view class="text2">已获得永久有效期</view>
185
+      </view>
186
+      <view class="panel2 FlexColumn">
187
+        查看记录
188
+      </view>
189
+    </view>
190
+  </view>
191
+  <view class="close FlexColumn" catchtap='close'>
192
+    <image src='../../images/02024.png' class="closeImage" />
193
+  </view>
194
+
152
 </view>
195
 </view>

+ 125 - 2
pages/main/index.wxss

@@ -134,8 +134,8 @@
134
 }
134
 }
135
 
135
 
136
 .index8 .img{
136
 .index8 .img{
137
-  width:314rpx;
138
-  height:39rpx;
137
+  width:198rpx;
138
+  height:37rpx;
139
   margin-top: 102rpx;
139
   margin-top: 102rpx;
140
 }
140
 }
141
 
141
 
@@ -167,6 +167,22 @@
167
   background-color: #9B9B9B;
167
   background-color: #9B9B9B;
168
   border-radius: 20rpx;
168
   border-radius: 20rpx;
169
   margin-top: 120rpx;
169
   margin-top: 120rpx;
170
+  position: relative;
171
+}
172
+
173
+.index3 .Avatar .gear{
174
+  width:40rpx;
175
+  height:40rpx;
176
+  position: absolute;
177
+  top:0;
178
+  right:0;
179
+  border-bottom-left-radius: 10rpx;
180
+  border-top-right-radius: 10rpx;
181
+  background-color: #593613;
182
+}
183
+.index3 .Avatar .img{
184
+  width:24rpx;
185
+  height:24rpx;
170
 }
186
 }
171
 
187
 
172
 .index3 .NickName{
188
 .index3 .NickName{
@@ -318,6 +334,9 @@
318
   background-color: #F0F0F0;
334
   background-color: #F0F0F0;
319
   
335
   
320
 }
336
 }
337
+.index10{
338
+  background-color: #fff;
339
+}
321
 
340
 
322
 .index4{
341
 .index4{
323
   width:100%;
342
   width:100%;
@@ -392,3 +411,107 @@
392
   height:88rpx;
411
   height:88rpx;
393
   margin-bottom: 20rpx;
412
   margin-bottom: 20rpx;
394
 }
413
 }
414
+
415
+.payInfo{
416
+  width:100%;
417
+}
418
+.payInfo .img02025{
419
+  width:100%;
420
+  height:953rpx;
421
+  position: relative;
422
+}
423
+.payInfo .img02026{
424
+  height:1024rpx;
425
+}
426
+.payInfo .img02027{
427
+  height:696rpx;
428
+}
429
+.payInfo .img02028{
430
+  height:586rpx;
431
+}
432
+.payInfo .payButton{
433
+  width:600rpx;
434
+  height:104rpx;
435
+  position: absolute;
436
+  top:690rpx;
437
+  left:75rpx;
438
+}
439
+.payInfo .payButton2{
440
+  top:512rpx;
441
+}
442
+
443
+.payInfo .getNewUser{
444
+  width:380rpx;
445
+  height:180rpx;
446
+  position: absolute;
447
+  top:830rpx;
448
+  left:188rpx;
449
+}
450
+.payInfo .getNewUser2{
451
+  top:370rpx;
452
+}
453
+
454
+.IsMemberForever{
455
+  z-index: 100;
456
+  position: fixed;
457
+  width: 100%;
458
+  left:0;
459
+  top:0;
460
+  background-color: rgba(245,226,190,0.95);
461
+}
462
+
463
+.IsMemberForever .btn {
464
+  width: 600rpx;
465
+  height: 640rpx;
466
+  background-color: #D2D2D2;
467
+  border-radius: 40rpx;
468
+  margin-top: 230rpx;
469
+  box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
470
+}
471
+.IsMemberForever .btn1 {
472
+  width: 100%;
473
+  height: 620rpx;
474
+  background-color: #F0F0F0;
475
+  border-radius: 40rpx;
476
+  position:relative;
477
+  top:0;
478
+  justify-content: flex-start;
479
+}
480
+.IsMemberForever .panel1 {
481
+  width: 100%;
482
+  height: 500rpx;
483
+  background-color: #B3443B;
484
+  border-top-left-radius: 40rpx;
485
+  border-top-right-radius: 40rpx;
486
+}
487
+.IsMemberForever .img {
488
+  width: 190rpx;
489
+  height: 190rpx;
490
+}
491
+.IsMemberForever .text1 {
492
+  font-size:60rpx;
493
+  color:#fff;
494
+  margin-top: 30rpx;
495
+}
496
+.IsMemberForever .text2 {
497
+  font-size:36rpx;
498
+  color:#fff;
499
+}
500
+.IsMemberForever .panel2 {
501
+  width: 100%;
502
+  height: 120rpx;
503
+  font-size:48rpx;
504
+}
505
+
506
+.IsMemberForever .close {
507
+  width: 100%;
508
+  height: 235rpx;
509
+  position: fixed;
510
+  bottom: 0;
511
+}
512
+
513
+.IsMemberForever .closeImage {
514
+  width: 33rpx;
515
+  height: 33rpx;
516
+}
517
+

+ 68 - 32
pages/main/list.js

@@ -2,41 +2,44 @@ import common from '../../utils/util';
2
 import server from '../../utils/main';
2
 import server from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
+var isPaying = false;
5
 
6
 
6
 Page({
7
 Page({
7
   data: {
8
   data: {
8
-  
9
+
9
   },
10
   },
10
   onLoad: function (options) {
11
   onLoad: function (options) {
11
-    var bookID=options.id;
12
+    var bookID = options.id;
12
     this.setData({
13
     this.setData({
13
       Height: common.getSystemHeight(),
14
       Height: common.getSystemHeight(),
14
       NavClass1: "nav1",
15
       NavClass1: "nav1",
15
       NavClass2: "nav2",
16
       NavClass2: "nav2",
16
-      IsShowNav1:true,
17
-      BookID:bookID,
17
+      IsShowNav1: true,
18
+      BookID: bookID,
19
+      IsShowPayInfo:false,
18
     });
20
     });
19
-    
20
   },
21
   },
21
-  onShow:function(){
22
+  onShow: function () {
22
     this.init();
23
     this.init();
23
   },
24
   },
24
-  init:function(){
25
-    var arr=JSON.parse(wx.getStorageSync("HanziAll"));
25
+  init: function () {
26
+    var arr = JSON.parse(wx.getStorageSync("HanziAll"));
26
     var arrReview = wx.getStorageSync("ReviewList");
27
     var arrReview = wx.getStorageSync("ReviewList");
27
     var arrFinished = wx.getStorageSync("FinishedList");
28
     var arrFinished = wx.getStorageSync("FinishedList");
28
 
29
 
29
     var result;
30
     var result;
30
     for (var i = 0; i < arr.length; i++) {
31
     for (var i = 0; i < arr.length; i++) {
31
       if (arr[i].ID == this.data.BookID) {
32
       if (arr[i].ID == this.data.BookID) {
32
-        result=arr[i];
33
-        for(var j=0;j<result.Units.length;j++){
33
+        result = arr[i];
34
+        for (var j = 0; j < result.Units.length; j++) {
34
           var item = result.Units[j];
35
           var item = result.Units[j];
35
-          var rnd=common.random(2,5);
36
-          item.Example ="";
37
-          for(var k=0;k<rnd;k++)
36
+          if (app.globalData.userInfo.IsMember == 1)
37
+            item.IsLocked = 0;
38
+          var rnd = common.random(2, 5);
39
+          item.Example = "";
40
+          for (var k = 0; k < rnd; k++)
38
             item.Example += item.Words[k].Name;
41
             item.Example += item.Words[k].Name;
39
-          
42
+
40
           item.IsFinished = false;
43
           item.IsFinished = false;
41
           for (var k = 0; k < arrFinished.length; k++) {
44
           for (var k = 0; k < arrFinished.length; k++) {
42
             if (item.ID == arrFinished[k].UnitID) {
45
             if (item.ID == arrFinished[k].UnitID) {
@@ -59,13 +62,13 @@ Page({
59
       }
62
       }
60
     }
63
     }
61
     this.setData({
64
     this.setData({
62
-      List:result.Units,
63
-      topImage: "../../images/0400" + this.data.BookID+".png"
65
+      List: result.Units,
66
+      topImage: "../../images/0400" + this.data.BookID + ".png"
64
     });
67
     });
65
     wx.setNavigationBarTitle({
68
     wx.setNavigationBarTitle({
66
       title: result.Name,
69
       title: result.Name,
67
     });
70
     });
68
-    
71
+
69
   },
72
   },
70
   selectNav: function (e) {
73
   selectNav: function (e) {
71
     var id = e.currentTarget.dataset.id;
74
     var id = e.currentTarget.dataset.id;
@@ -74,7 +77,7 @@ Page({
74
       this.setData({
77
       this.setData({
75
         NavClass1: "nav1",
78
         NavClass1: "nav1",
76
         NavClass2: "nav2",
79
         NavClass2: "nav2",
77
-        IsShowNav1:true,
80
+        IsShowNav1: true,
78
       })
81
       })
79
     }
82
     }
80
     else if (id == "2") {
83
     else if (id == "2") {
@@ -86,18 +89,26 @@ Page({
86
     }
89
     }
87
   },
90
   },
88
   goto: function (e) {
91
   goto: function (e) {
89
-    var bookid = e.currentTarget.dataset.bookid;
90
-    var unitid = e.currentTarget.dataset.unitid;
91
-    var wordid = e.currentTarget.dataset.wordid;
92
-    var isfinished = e.currentTarget.dataset.isfinished;
93
-    if (!wordid)
94
-      wordid=0
95
-    else{
96
-      wx.setStorageSync('selectedRandom', false);
92
+    var islocked = e.currentTarget.dataset.islocked;
93
+    if (islocked == 1 && app.globalData.IsShow == 1) {
94
+      this.setData({
95
+        IsShowPayInfo: true,
96
+      });
97
+    }
98
+    else {
99
+      var bookid = e.currentTarget.dataset.bookid;
100
+      var unitid = e.currentTarget.dataset.unitid;
101
+      var wordid = e.currentTarget.dataset.wordid;
102
+      var isfinished = e.currentTarget.dataset.isfinished;
103
+      if (!wordid)
104
+        wordid = 0
105
+      else {
106
+        wx.setStorageSync('selectedRandom', false);
107
+      }
108
+      wx.navigateTo({
109
+        url: "./detail?bookid=" + bookid + "&unitid=" + unitid + "&wordid=" + wordid + "&isfinished=" + isfinished,
110
+      });
97
     }
111
     }
98
-    wx.navigateTo({
99
-      url: "./detail?bookid=" + bookid + "&unitid=" + unitid + "&wordid=" + wordid + "&isfinished=" + isfinished,
100
-    });
101
   },
112
   },
102
   getFinished: function () {
113
   getFinished: function () {
103
     var that = this;
114
     var that = this;
@@ -115,7 +126,7 @@ Page({
115
             }
126
             }
116
           }
127
           }
117
 
128
 
118
-          var item=list[i];
129
+          var item = list[i];
119
           for (var k = 0; k < item.Words.length; k++) {
130
           for (var k = 0; k < item.Words.length; k++) {
120
             item.Words[k].ReviewCss = "";
131
             item.Words[k].ReviewCss = "";
121
             for (var l = 0; l < arrReview.length; l++) {
132
             for (var l = 0; l < arrReview.length; l++) {
@@ -132,10 +143,35 @@ Page({
132
       }
143
       }
133
     });
144
     });
134
   },
145
   },
146
+  getPay: function (e) {
147
+    if (!isPaying) {
148
+      isPaying = true;
149
+      var that = this;
150
+      var money = app.globalData.PayMoney;
151
+      server.payMoney(3, money, function () {
152
+        wx.navigateTo({
153
+          url: './payfinished',
154
+        });
155
+      });
156
+      setTimeout(function () {
157
+        isPaying = false;
158
+      }, 10000);
159
+    }
160
+  },
161
+  gotoNewUser: function () {
162
+    wx.navigateTo({
163
+      url: './newuserlist',
164
+    });
165
+  },
166
+  close: function () {
167
+    this.setData({
168
+      IsShowPayInfo: false,
169
+    });
170
+  },
135
   onShareAppMessage: function () {
171
   onShareAppMessage: function () {
136
     return {
172
     return {
137
-      title: '识字练习——让阅读赢在起点',
138
-      path: 'pages/index/index',
173
+      title: '让阅读赢在起点',
174
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
139
       imageUrl: '../../images/07001.png',
175
       imageUrl: '../../images/07001.png',
140
       success: function (res) {
176
       success: function (res) {
141
 
177
 

+ 32 - 8
pages/main/list.wxml

@@ -18,11 +18,12 @@
18
     <view class="line2 line">
18
     <view class="line2 line">
19
     </view>
19
     </view>
20
     <view class="list2 FlexColumn">
20
     <view class="list2 FlexColumn">
21
-      <view class="btn" bindtap="goto" data-bookid='{{BookID}}' 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.IsFinished}}" src='../../images/04007.png' class="img04007" />
25
-            <image wx:if="{{item.IsFinished}}" src='../../images/04006.png' class="img04007" />
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" />
26
             <view class="title">{{item.Example}}</view>
27
             <view class="title">{{item.Example}}</view>
27
           </view>
28
           </view>
28
           <view class="right FlexColumn">
29
           <view class="right FlexColumn">
@@ -37,10 +38,10 @@
37
           </view>
38
           </view>
38
         </view>
39
         </view>
39
       </view>
40
       </view>
40
-      
41
+
41
     </view>
42
     </view>
42
     <view class="line3 line">
43
     <view class="line3 line">
43
-  </view>
44
+    </view>
44
   </block>
45
   </block>
45
 
46
 
46
   <block wx:if="{{!IsShowNav1}}">
47
   <block wx:if="{{!IsShowNav1}}">
@@ -49,12 +50,35 @@
49
         <view class="title1">{{item.Name}}</view>
50
         <view class="title1">{{item.Name}}</view>
50
       </view>
51
       </view>
51
       <view class="table FlexRow">
52
       <view class="table FlexRow">
52
-      <view class="{{itemChild.ReviewCss}} box" wx:for="{{item.Words}}" wx:key="i" wx:for-item="itemChild" wx:for-index="i" bindtap="goto" data-bookid='{{BookID}}' data-unitid='{{item.ID}}' data-wordid='{{i}}' data-isfinished='{{item.IsFinished}}'>{{itemChild.Name}}</view>
53
+        <view class="{{itemChild.ReviewCss}} box" wx:for="{{item.Words}}" wx:key="i" wx:for-item="itemChild" wx:for-index="i" bindtap="goto" data-islocked='{{item.IsLocked}}' data-bookid='{{BookID}}' data-unitid='{{item.ID}}' data-wordid='{{i}}' data-isfinished='{{item.IsFinished}}'>{{itemChild.Name}}</view>
53
       </view>
54
       </view>
54
     </view>
55
     </view>
55
-    
56
+
56
     <view class="line4 line">
57
     <view class="line4 line">
57
-  </view>
58
+    </view>
58
   </block>
59
   </block>
60
+
61
+</view>
62
+
63
+<view class="PayInfo container FlexColumn" style='height:{{Height}}rpx;' wx:if="{{IsShowPayInfo}}">
64
+  <view class="btn">
65
+    <view class="btn1 FlexColumn" catchtap="getPay">
66
+      <view class="panel1 FlexColumn">
67
+        <image src='../../images/04010.png' class="img" />
68
+      </view>
69
+      <view class="panel2 FlexColumn">
70
+        购买
71
+      </view>
72
+    </view>
73
+  </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>
59
   
80
   
81
+  <view class="close FlexColumn" catchtap='close'>
82
+    <image src='../../images/02024.png' class="closeImage" />
83
+  </view>
60
 </view>
84
 </view>

+ 76 - 1
pages/main/list.wxss

@@ -177,4 +177,79 @@
177
   border:1rpx solid #593613;
177
   border:1rpx solid #593613;
178
   width:106rpx;
178
   width:106rpx;
179
   height:106rpx;
179
   height:106rpx;
180
-}
180
+}
181
+
182
+
183
+.PayInfo{
184
+  z-index: 100;
185
+  position: fixed;
186
+  width: 100%;
187
+  left:0;
188
+  top:0;
189
+  background-color: rgba(240,240,240,0.95);
190
+}
191
+
192
+.PayInfo .btn {
193
+  width: 600rpx;
194
+  height: 420rpx;
195
+  background-color: #F19805;
196
+  border-radius: 40rpx;
197
+  margin-top: 242rpx;
198
+  box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
199
+}
200
+.PayInfo .btn1 {
201
+  width: 100%;
202
+  height: 400rpx;
203
+  background-color: #FFDD0C;
204
+  border-radius: 40rpx;
205
+  position:relative;
206
+  top:0;
207
+  justify-content: flex-start;
208
+}
209
+.PayInfo .panel1 {
210
+  width: 100%;
211
+  height: 280rpx;
212
+  background-color: #F9676C;
213
+  border-top-left-radius: 40rpx;
214
+  border-top-right-radius: 40rpx;
215
+}
216
+.PayInfo .img {
217
+  width: 518rpx;
218
+  height: 167rpx;
219
+}
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 {
234
+  width: 100%;
235
+  height: 120rpx;
236
+  font-size:48rpx;
237
+}
238
+
239
+.PayInfo .Triangle{
240
+  width: 16rpx;
241
+  height:22rpx;
242
+  margin-right: 22rpx;
243
+}
244
+.PayInfo .close {
245
+  width: 100%;
246
+  height: 235rpx;
247
+  position: fixed;
248
+  bottom: 0;
249
+}
250
+
251
+.PayInfo .closeImage {
252
+  width: 33rpx;
253
+  height: 33rpx;
254
+}
255
+

+ 56 - 0
pages/main/newuserlist.js

@@ -0,0 +1,56 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    UserList: [],
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Height: common.getSystemHeight(),
13
+    });
14
+    this.init();
15
+  },
16
+  init: function () {
17
+    var that = this;
18
+    server.getData('GetHanziUserListByIntroducer?UserID=' + app.globalData.userInfo.UserID, function (data) {
19
+      if (data) {
20
+        if (data.length >= 6) {
21
+          wx.removeStorageSync("IsMemberForeverRemind");
22
+          wx.reLaunch({
23
+            url: '../index/index'
24
+          })
25
+        }
26
+        else {
27
+          for (var i = 0; i < data.length; i++) {
28
+            if (data[i].NickName == "陌生用户")
29
+              data[i].NickName = "未授权";
30
+            if (data[i].NickName.length > 4)
31
+              data[i].NickName = data[i].NickName.substr(0, 3) + "...";
32
+          }
33
+          that.setData({
34
+            UserList: data,
35
+          });
36
+        }
37
+      }
38
+    });
39
+  },
40
+  onShareAppMessage: function () {
41
+    return {
42
+      title: '让阅读赢在起点',
43
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
44
+      imageUrl: '../../images/07001.png',
45
+      success: function (res) {
46
+
47
+      },
48
+      fail: function (err) {
49
+        console.log(err);
50
+      },
51
+      complete: function (res) {
52
+        console.log(res);
53
+      },
54
+    }
55
+  },
56
+})

+ 7 - 0
pages/main/newuserlist.json

@@ -0,0 +1,7 @@
1
+{
2
+  "navigationBarBackgroundColor": "#036536",
3
+  "navigationBarTextStyle": "white",
4
+  "navigationBarTitleText": "活动",
5
+  "backgroundColor": "#036536",
6
+  "enablePullDownRefresh": false
7
+}

+ 26 - 0
pages/main/newuserlist.wxml

@@ -0,0 +1,26 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <view class="text1">已成功邀请 {{UserList.length}}人</view>
3
+  <view class="line"></view>
4
+  <view class="panel1 FlexRow">
5
+    <view class="box FlexColumn" wx:for="{{[1,2,3,4,5,6]}}" wx:key="index">
6
+      <view class="box1">
7
+        {{item}}
8
+        <image src='{{UserList[index].AvatarUrl}}' class="imgAvatarUrl" wx:if="{{UserList.length>=item}}" />
9
+      </view>
10
+      <view class="NickName">{{UserList[index].NickName}}</view>
11
+    </view>
12
+  </view>
13
+  <view class="text2">满6位新用户</view>
14
+  <view class="text3">升级到永久有效期</view>
15
+  <view class="text4">技巧:转发到家长群,又快又有效率。</view>
16
+  <button class="btnParent FlexRow" open-type="share">
17
+    <view class="btn" bindtap="">
18
+      <view class="btn1">转发到群</view>
19
+    </view>
20
+  </button>
21
+  <view class="text5">活动细则</view>
22
+  <text class="text6">* 购买产品并参加本活动,达到要求后有效期将升级为永久有效。</text>
23
+  <text class="text7 text6">* 购买前的邀请同样有效;购买前已达到,将在购买后自动生效。</text>
24
+  <text class="text7 text6">* “新用户”是指:从未打开过本小程序的微信帐号,经由您通过转发使对方打开小程序。</text>
25
+
26
+</view>

+ 121 - 0
pages/main/newuserlist.wxss

@@ -0,0 +1,121 @@
1
+.container {
2
+  background-color: #036536;
3
+  justify-content: flex-start;
4
+  color: #fff;
5
+  font-weight: 500;
6
+}
7
+
8
+.text1 {
9
+  font-size: 48rpx;
10
+  margin-top: 32rpx;
11
+}
12
+.line {
13
+  width: 560rpx;
14
+  height:10rpx;
15
+  background-color: #fff;
16
+  margin-top: 20rpx;
17
+}
18
+
19
+.panel1 {
20
+  width: 560rpx;
21
+  margin-top: 50rpx;
22
+  flex-wrap: wrap;
23
+}
24
+.panel1 .box{
25
+  width: 100rpx;
26
+  height:147rpx;
27
+  margin: 0 20rpx 40rpx 20rpx;
28
+  color:#fff;
29
+  font-weight: 400;
30
+  font-size:24rpx;
31
+}
32
+.panel1 .box1{
33
+  width: 100rpx;
34
+  height:100rpx;
35
+  background-color: #035834;
36
+  border-radius: 16rpx;
37
+  color:#329468;
38
+  font-size:64rpx;
39
+  text-align: center;
40
+  line-height: 100rpx;
41
+  font-family: 'SF UI Display Light';
42
+  font-weight: 200;
43
+  font-style: normal;
44
+  margin-bottom: 14rpx;
45
+  position: relative;
46
+}
47
+.panel1 .NickName{
48
+  width: 100rpx;
49
+  height:33rpx;
50
+  text-align: center;
51
+}
52
+
53
+.text2 {
54
+  font-size: 26rpx;
55
+  margin-top: 10rpx;
56
+}
57
+.text3 {
58
+  font-size: 36rpx;
59
+  margin-top: 0rpx;
60
+}
61
+.text4 {
62
+  font-size: 26rpx;
63
+  margin-top: 60rpx;
64
+  color:#B9DD00;
65
+}
66
+
67
+.btnParent{
68
+  padding-left: 0;
69
+  padding-right: 0;
70
+  width: 100%;
71
+  background-color: #036536;
72
+  height:160rpx;
73
+}
74
+
75
+.btnParent::after {
76
+  border: 0px;
77
+}
78
+
79
+.btn {
80
+  width: 600rpx;
81
+  height: 104rpx;
82
+  background-color: #A63917;
83
+  border-radius: 14rpx;
84
+  margin-top: 20rpx;
85
+}
86
+
87
+.btn1 {
88
+  width: 100%;
89
+  height: 90rpx;
90
+  background-color: #EA413A;
91
+  border-radius: 14rpx;
92
+  position:relative;
93
+  top:0;
94
+  font-size: 36rpx;
95
+  text-align: center;
96
+  line-height: 90rpx;
97
+  color:#fff;
98
+}
99
+
100
+
101
+.text5 {
102
+  font-size: 20rpx;
103
+  margin-top: 30rpx;
104
+}
105
+.text6 {
106
+  font-size: 20rpx;
107
+  margin-top: 20rpx;
108
+  width:600rpx;
109
+}
110
+.text7 {
111
+  margin-top: 10rpx;
112
+}
113
+
114
+.imgAvatarUrl{
115
+  width:100rpx;
116
+  height:100rpx;
117
+  border-radius: 16rpx;
118
+  position: absolute;
119
+  left:0;
120
+  top:0;
121
+}

+ 45 - 0
pages/main/payfinished.js

@@ -0,0 +1,45 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+  },
9
+  onLoad: function (options) {
10
+    this.setData({
11
+      Height: common.getSystemHeight(),
12
+    });
13
+  },
14
+  deblocking: function () {
15
+    wx.reLaunch({
16
+      url: '../index/index'
17
+    });
18
+  },
19
+  gotoPayList: function () {
20
+    wx.navigateTo({
21
+      url: './paylist',
22
+    });
23
+  },
24
+  gotoNewUserList: function () {
25
+    wx.navigateTo({
26
+      url: './newuserlist',
27
+    });
28
+  },
29
+  onShareAppMessage: function () {
30
+    return {
31
+      title: '让阅读赢在起点',
32
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
33
+      imageUrl: '../../images/07001.png',
34
+      success: function (res) {
35
+
36
+      },
37
+      fail: function (err) {
38
+        console.log(err);
39
+      },
40
+      complete: function (res) {
41
+        console.log(res);
42
+      },
43
+    }
44
+  },
45
+})

+ 6 - 0
pages/main/payfinished.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarBackgroundColor": "#F5E2BE",
3
+  "navigationBarTitleText": "订单",
4
+  "backgroundColor": "#F5E2BE",
5
+  "enablePullDownRefresh": false
6
+}

+ 20 - 0
pages/main/payfinished.wxml

@@ -0,0 +1,20 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <image src="../../images/06003.png" class="bg" />
3
+  <text class="text1">感谢购买\n直接解锁小程序或看看别的 ^_^</text>
4
+  <view class="btn" bindtap="deblocking">
5
+    <view class="btn1">直接解锁</view>
6
+  </view>
7
+  <text class="text2">注意:如遇网络问题未能解锁,请清理手机内存并重新打开微信小程序,一般即可恢复正常。如仍未解决,可通过首页底部“意见反馈”联系我们为您处理。</text>
8
+  <view class="line2"></view>
9
+  <view class="text3 FlexRow" bindtap="gotoPayList">
10
+    <image src="../../images/Triangle.png" class="Triangle" />
11
+    <view>查看购买记录</view>
12
+  </view>
13
+  <view class="text4">
14
+    想要获得永久有效期?
15
+  </view>
16
+  <view class="text5 text3 FlexRow"  bindtap="gotoNewUserList">
17
+    <image src="../../images/Triangle.png" class="Triangle" />
18
+    <view>告诉我怎么做</view>
19
+  </view>
20
+</view>

+ 81 - 0
pages/main/payfinished.wxss

@@ -0,0 +1,81 @@
1
+.container {
2
+  background-color: #F5E2BE;
3
+  justify-content: flex-start;
4
+  color: #1E1E1E;
5
+  font-weight: 500;
6
+}
7
+
8
+.bg{
9
+  width: 639rpx;
10
+  height:521rpx;
11
+  position: fixed;
12
+  bottom: 0;
13
+  left:0;
14
+}
15
+
16
+.text1{
17
+  font-size:36rpx;
18
+  text-align: center;
19
+  margin-top: 132rpx;
20
+}
21
+
22
+
23
+.btn {
24
+  width: 600rpx;
25
+  height: 104rpx;
26
+  background-color: #035834;
27
+  border-radius: 14rpx;
28
+  margin-top: 110rpx;
29
+}
30
+
31
+.btn1 {
32
+  width: 100%;
33
+  height: 90rpx;
34
+  background-color: #03AF69;
35
+  border-radius: 14rpx;
36
+  position:relative;
37
+  top:0;
38
+  font-size: 36rpx;
39
+  text-align: center;
40
+  line-height: 90rpx;
41
+  color:#fff;
42
+}
43
+
44
+.text2{
45
+  font-size:22rpx;
46
+  width:560rpx; 
47
+  margin-top: 50rpx;
48
+}
49
+
50
+.line2{
51
+  width: 600rpx;
52
+  height:3rpx;
53
+  background-color: #593613;
54
+  margin-top:80rpx;
55
+}
56
+
57
+
58
+.text3{
59
+  font-size:36rpx;
60
+  color:#A20602;
61
+  margin-top: 90rpx;
62
+  z-index: 10;
63
+}
64
+
65
+.Triangle{
66
+  width: 16rpx;
67
+  height:22rpx;
68
+  margin-right: 22rpx;
69
+}
70
+
71
+.text4{
72
+  font-size:28rpx;
73
+  margin-top: 60rpx;
74
+  z-index: 10;
75
+}
76
+
77
+.text5{
78
+  margin-top: 20rpx;
79
+  z-index: 10;
80
+}
81
+

+ 51 - 0
pages/main/paylist.js

@@ -0,0 +1,51 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    PayList:[],
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Height: common.getSystemHeight(),
13
+    });
14
+    this.init();
15
+  },
16
+  init: function () {
17
+    var that = this;
18
+    server.getData('GetHanziUserPayInfoList?UserID=' + app.globalData.userInfo.UserID, function (data) {
19
+      if (data) {
20
+        var list=[];
21
+        for(var i=data.List.length-1;i>=0;i--){
22
+          list.push(data.List[i]);
23
+        }
24
+        var serviceTime = data.ProductServiceTime;
25
+        if (serviceTime == "2099年12月31日")
26
+          serviceTime = "永久有效";
27
+
28
+        that.setData({
29
+          ProductServiceTime: serviceTime,
30
+          PayList: list,
31
+        });
32
+      }
33
+    });
34
+  },
35
+  onShareAppMessage: function () {
36
+    return {
37
+      title: '让阅读赢在起点',
38
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
39
+      imageUrl: '../../images/07001.png',
40
+      success: function (res) {
41
+
42
+      },
43
+      fail: function (err) {
44
+        console.log(err);
45
+      },
46
+      complete: function (res) {
47
+        console.log(res);
48
+      },
49
+    }
50
+  },
51
+})

+ 6 - 0
pages/main/paylist.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarBackgroundColor": "#F5E2BE",
3
+  "navigationBarTitleText": "购买记录",
4
+  "backgroundColor": "#F5E2BE",
5
+  "enablePullDownRefresh": false
6
+}

+ 31 - 0
pages/main/paylist.wxml

@@ -0,0 +1,31 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <block wx:if="{{PayList.length>0}}">
3
+    <view class="text2 text1">购买后如不能正常使用,请清理内存后重启微信并打开小程序,</view>
4
+    <button class="contact" open-type="contact">
5
+      <view class="text1 FlexRow">
6
+        <view>一般问题即可解决。也可通过“</view>
7
+        <view class="red">意见反馈</view>
8
+        <view>”联系我们为您处理。</view>
9
+      </view>
10
+    </button>
11
+    <view class="text3">有效期</view>
12
+    <view class="text4">{{ProductServiceTime}}</view>
13
+    <view class="panel1">
14
+      <view class="item FlexRow" wx:for="{{PayList}}" wx:key="index">
15
+        <view class="left FlowColumn">
16
+          <view class="title1">
17
+            {{item.Title}}
18
+          </view>
19
+          <view class="title2">
20
+            {{item.Time}}
21
+          </view>
22
+        </view>
23
+        <view class="right">{{item.PayMoney}}</view>
24
+      </view>
25
+    </view>
26
+  </block>
27
+  <block wx:if="{{PayList.length==0}}">
28
+    <view class="title0">无记录</view>
29
+  </block>
30
+  
31
+</view>

+ 88 - 0
pages/main/paylist.wxss

@@ -0,0 +1,88 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  justify-content: flex-start;
4
+  color: #1e1e1e;
5
+  font-weight: 500;
6
+}
7
+
8
+.contact {
9
+  padding-left: 0;
10
+  padding-right: 0;
11
+  background-color: #f0f0f0;
12
+}
13
+
14
+.contact::after {
15
+  border: 0px;
16
+}
17
+
18
+.text1 {
19
+  font-size: 24rpx;
20
+  font-weight: 400;
21
+  width: 690rpx;
22
+  text-align: left;
23
+  justify-content: flex-start;
24
+}
25
+
26
+.text2 {
27
+  margin-top: 50rpx;
28
+}
29
+
30
+.text1 .red {
31
+  color: #a20602;
32
+  font-weight: 500;
33
+  text-decoration: underline;
34
+}
35
+
36
+.text3 {
37
+  font-size: 32rpx;
38
+  width: 690rpx;
39
+  text-align: left;
40
+  margin-top: 40rpx;
41
+}
42
+
43
+.text4 {
44
+  font-size: 56rpx;
45
+  width: 690rpx;
46
+  text-align: left;
47
+  font-weight: 400;
48
+}
49
+
50
+.panel1 {
51
+  width: 100%;
52
+  margin-top: 40rpx;
53
+  background-color: #fff;
54
+}
55
+
56
+.item {
57
+  width: 100%;
58
+  justify-content: space-between;
59
+  height: 132rpx;
60
+  border-bottom: 1rpx solid #f0f0f0;
61
+}
62
+
63
+.left {
64
+  margin-left: 30rpx;
65
+}
66
+
67
+.right {
68
+  margin-right: 30rpx;
69
+  font-size: 32rpx;
70
+}
71
+
72
+.title1 {
73
+  font-size: 28rpx;
74
+  text-align: left;
75
+}
76
+
77
+.title2 {
78
+  font-size: 24rpx;
79
+  text-align: left;
80
+  color: #787878;
81
+  font-weight: 400;
82
+}
83
+
84
+.title0 {
85
+  font-size: 36rpx;
86
+  color: #787878;
87
+  margin-top: 522rpx;
88
+}

+ 16 - 0
pages/main/search.js

@@ -76,4 +76,20 @@ Page({
76
       url: "./detail?Type=search&bookid=" + bookid + "&unitid=" + unitid + "&wordid=" + wordid + "&isfinished=" + isfinished,
76
       url: "./detail?Type=search&bookid=" + bookid + "&unitid=" + unitid + "&wordid=" + wordid + "&isfinished=" + isfinished,
77
     });
77
     });
78
   },
78
   },
79
+  onShareAppMessage: function () {
80
+    return {
81
+      title: '让阅读赢在起点',
82
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
83
+      imageUrl: '../../images/07001.png',
84
+      success: function (res) {
85
+
86
+      },
87
+      fail: function (err) {
88
+        console.log(err);
89
+      },
90
+      complete: function (res) {
91
+        console.log(res);
92
+      },
93
+    }
94
+  },
79
 })
95
 })

+ 6 - 0
project.config.json

@@ -61,6 +61,12 @@
61
 					"name": "\b关于",
61
 					"name": "\b关于",
62
 					"pathName": "pages/main/about",
62
 					"pathName": "pages/main/about",
63
 					"query": ""
63
 					"query": ""
64
+				},
65
+				{
66
+					"id": 5,
67
+					"name": "\b活动",
68
+					"pathName": "pages/main/paylist",
69
+					"query": ""
64
 				}
70
 				}
65
 			]
71
 			]
66
 		}
72
 		}

+ 5 - 5
utils/main.js

@@ -77,7 +77,7 @@ function payMoney(payType, money, callback) {
77
       if (res.code) {
77
       if (res.code) {
78
         console.log('获取用户登录态成功!' + res.code);
78
         console.log('获取用户登录态成功!' + res.code);
79
         //预支付
79
         //预支付
80
-        getData('PhonicsPayLogin?code=' + res.code + '&payType=' + payType + '&money=' + money, function (data) {
80
+        getData('HanziPayLogin?code=' + res.code + '&payType=' + payType + '&money=' + money, function (data) {
81
           if (data && data.timeStamp) {
81
           if (data && data.timeStamp) {
82
             //微信支付
82
             //微信支付
83
             wx.requestPayment({
83
             wx.requestPayment({
@@ -124,7 +124,7 @@ function getProgramList(){
124
       ImageUrl: "03001.png",
124
       ImageUrl: "03001.png",
125
       ImageUrl2: "02018.png",
125
       ImageUrl2: "02018.png",
126
       appId: 'wx46a7b4c420e6d38f',
126
       appId: 'wx46a7b4c420e6d38f',
127
-      path: 'pages/index/start?SourceID=106',
127
+      path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
128
       left: 117,
128
       left: 117,
129
       top: 837,
129
       top: 837,
130
     },
130
     },
@@ -132,7 +132,7 @@ function getProgramList(){
132
       ImageUrl: "03002.png",
132
       ImageUrl: "03002.png",
133
       ImageUrl2: "02020.png",
133
       ImageUrl2: "02020.png",
134
       appId: 'wxb54a6d5aff836ee3',
134
       appId: 'wxb54a6d5aff836ee3',
135
-      path: 'pages/index/index?SourceID=106',
135
+      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
136
       left: 117,
136
       left: 117,
137
       top: 1181,
137
       top: 1181,
138
     },
138
     },
@@ -140,7 +140,7 @@ function getProgramList(){
140
       ImageUrl: "03003.png",
140
       ImageUrl: "03003.png",
141
       ImageUrl2: "02019.png",
141
       ImageUrl2: "02019.png",
142
       appId: 'wx331e8dd070f01d0e',
142
       appId: 'wx331e8dd070f01d0e',
143
-      path: 'pages/index/index?SourceID=106',
143
+      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
144
       left: 425,
144
       left: 425,
145
       top: 837,
145
       top: 837,
146
     },
146
     },
@@ -148,7 +148,7 @@ function getProgramList(){
148
       ImageUrl: "03004.png",
148
       ImageUrl: "03004.png",
149
       ImageUrl2: "02021.png",
149
       ImageUrl2: "02021.png",
150
       appId: 'wxa5e33c61fe37dd01',
150
       appId: 'wxa5e33c61fe37dd01',
151
-      path: 'pages/index/index?SourceID=106',
151
+      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
152
       left: 117,
152
       left: 117,
153
       top: 1525,
153
       top: 1525,
154
     },
154
     },