chengjie лет назад: 7
Родитель
Сommit
33fe03c51d

+ 5 - 5
pages/about/orderlist.js

@@ -10,7 +10,7 @@ Page({
10
       {
10
       {
11
         ID: 89,
11
         ID: 89,
12
         Name: "数学口算练习",
12
         Name: "数学口算练习",
13
-        Remark: "一款原价19.90元,有效期6个月",
13
+        Remark: "原价19.90元,有效期6个月",
14
         Price: 1990,
14
         Price: 1990,
15
         Remark2: "",
15
         Remark2: "",
16
         Image: "06009",
16
         Image: "06009",
@@ -18,7 +18,7 @@ Page({
18
       }, {
18
       }, {
19
         ID: 99,
19
         ID: 99,
20
         Name: "英语自然拼读",
20
         Name: "英语自然拼读",
21
-        Remark: "一款原价19.80元,有效期6个月",
21
+        Remark: "原价19.80元,有效期6个月",
22
         Price: 1980,
22
         Price: 1980,
23
         Remark2: "成套购买赠永久有效期",
23
         Remark2: "成套购买赠永久有效期",
24
         Image: "06006",
24
         Image: "06006",
@@ -26,7 +26,7 @@ Page({
26
       }, {
26
       }, {
27
         ID: 98,
27
         ID: 98,
28
         Name: "语文汉语拼音",
28
         Name: "语文汉语拼音",
29
-        Remark: "一款原价9.90元,有效期6个月",
29
+        Remark: "原价9.90元,有效期6个月",
30
         Price: 990,
30
         Price: 990,
31
         Remark2: "成套购买赠永久有效期",
31
         Remark2: "成套购买赠永久有效期",
32
         Image: "06007",
32
         Image: "06007",
@@ -34,7 +34,7 @@ Page({
34
       }, {
34
       }, {
35
         ID: 106,
35
         ID: 106,
36
         Name: "语文识字",
36
         Name: "语文识字",
37
-        Remark: "一款原价9.80元,有效期6个月",
37
+        Remark: "原价9.80元,有效期6个月",
38
         Price: 980,
38
         Price: 980,
39
         Remark2: "成套购买赠永久有效期",
39
         Remark2: "成套购买赠永久有效期",
40
         Image: "06008",
40
         Image: "06008",
@@ -108,7 +108,7 @@ Page({
108
       detail=detail.substr(1);
108
       detail=detail.substr(1);
109
       server.payMoney(4,money,detail, function (data) {
109
       server.payMoney(4,money,detail, function (data) {
110
         wx.navigateTo({
110
         wx.navigateTo({
111
-          url: '../about/payfinished',
111
+          url: '../about/payfinished?type=all',
112
         });
112
         });
113
       });
113
       });
114
       setTimeout(function () {
114
       setTimeout(function () {

+ 4 - 3
pages/about/orderlist.wxml

@@ -14,14 +14,15 @@
14
         <view class="text3" wx:if="{{item.Remark2}}">{{item.Remark2}}</view>
14
         <view class="text3" wx:if="{{item.Remark2}}">{{item.Remark2}}</view>
15
       </view>
15
       </view>
16
     </view>
16
     </view>
17
-  </view>
18
-
19
-  <view class="bottom FlexColumn">
20
     <view class="text0 FlexRow" bindtap='gotoFeedback'>
17
     <view class="text0 FlexRow" bindtap='gotoFeedback'>
21
       <view>如遇支付问题请</view>
18
       <view>如遇支付问题请</view>
22
       <view class="red">联系客服</view>
19
       <view class="red">联系客服</view>
23
       <view>为您处理</view>
20
       <view>为您处理</view>
24
     </view>
21
     </view>
22
+  </view>
23
+
24
+  <view class="bottom FlexColumn">
25
+    
25
     <view class="bottom1 FlexColumn">
26
     <view class="bottom1 FlexColumn">
26
       <view class="top FlexRow" wx:if="{{Total>0}}">
27
       <view class="top FlexRow" wx:if="{{Total>0}}">
27
         <view class="left">
28
         <view class="left">

+ 13 - 14
pages/about/orderlist.wxss

@@ -1,7 +1,7 @@
1
 .container {
1
 .container {
2
   background-color: #F0F0F0;
2
   background-color: #F0F0F0;
3
   justify-content: flex-start;
3
   justify-content: flex-start;
4
-  color: #872439;
4
+  color: #1e1e1e;
5
   font-weight:500;
5
   font-weight:500;
6
 }
6
 }
7
 
7
 
@@ -71,6 +71,18 @@
71
   margin-bottom: 40rpx;
71
   margin-bottom: 40rpx;
72
 }
72
 }
73
 
73
 
74
+.panel2 .text0 {
75
+  font-size: 22rpx;
76
+  font-weight: 400;
77
+  height:80rpx;
78
+}
79
+
80
+.panel2 .text0 .red {
81
+  color: #a20602;
82
+  font-weight: 600;
83
+  text-decoration: underline;
84
+}
85
+
74
 .container .bottom{
86
 .container .bottom{
75
   width:100%;
87
   width:100%;
76
   position: fixed;
88
   position: fixed;
@@ -92,19 +104,6 @@
92
   border: 0px;
104
   border: 0px;
93
 }
105
 }
94
 
106
 
95
-.bottom .text0 {
96
-  font-size: 22rpx;
97
-  font-weight: 400;
98
-  height:80rpx;
99
-}
100
-
101
-.bottom .text0 .red {
102
-  color: #a20602;
103
-  font-weight: 600;
104
-  text-decoration: underline;
105
-}
106
-
107
-
108
 .bottom .left{
107
 .bottom .left{
109
   margin-left: 50rpx;
108
   margin-left: 50rpx;
110
   align-items: flex-start;
109
   align-items: flex-start;

+ 1 - 1
pages/about/payfinished.js

@@ -28,7 +28,7 @@ Page({
28
   },
28
   },
29
   gotoPayList: function () {
29
   gotoPayList: function () {
30
     wx.navigateTo({
30
     wx.navigateTo({
31
-      url: '../about/paylist',
31
+      url: '../about/paylist?type=finished',
32
     });
32
     });
33
   },
33
   },
34
   gotoNewUserList: function () {
34
   gotoNewUserList: function () {

+ 37 - 20
pages/about/paylist.js

@@ -5,38 +5,52 @@ const app = getApp();
5
 
5
 
6
 Page({
6
 Page({
7
   data: {
7
   data: {
8
-    PayList: [],
9
-    IsActive: false,
8
+    PayList: null,
9
+    IsShowActivty: false,
10
   },
10
   },
11
   onLoad: function (options) {
11
   onLoad: function (options) {
12
     //测试*****************
12
     //测试*****************
13
-    if (!app.globalData.userInfo)
14
-      app.globalData.userInfo = { UserID: 4 };
13
+    // if (!app.globalData.userInfo)
14
+    //   app.globalData.userInfo = { UserID: 4 };
15
 
15
 
16
     this.setData({
16
     this.setData({
17
       Height: common.getSystemHeight(),
17
       Height: common.getSystemHeight(),
18
+      UnloadType: options.type,
18
     });
19
     });
19
     this.init();
20
     this.init();
20
   },
21
   },
22
+  onUnload: function () {
23
+    if (this.data.UnloadType == "finished") {
24
+      wx.reLaunch({
25
+        url: '../main/index'
26
+      });
27
+    }
28
+  },
21
   init: function () {
29
   init: function () {
22
     var that = this;
30
     var that = this;
23
-    server.getLocalHost(function () {
24
-      server.getData('GetWXUsersAllPayInfo?UserID=' + app.globalData.userInfo.UserID, function (data) {
25
-        if (data) {
26
-          
27
-          for (var i = 0; i < data.length; i++) {
28
-            for (var j = 0; j < data[i].List.length; j++) {
29
-              data[i].List[j].isShowActivty = false;
30
-              if (data[i].List[j].Status == 0) {
31
-                data[i].List[j].isShowActivty = true;
32
-              }
31
+
32
+    server.getData('GetWXUsersAllPayInfo?UserID=' + app.globalData.userInfo.UserID + "&ProductID=" + app.globalData.ProgramID, function (data) {
33
+      if (data) {
34
+        var isShowActivty = false;
35
+        for (var i = 0; i < data.length; i++) {
36
+          for (var j = 0; j < data[i].List.length; j++) {
37
+            data[i].List[j].isShowActivty = false;
38
+            if (data[i].List[j].Status == 0) {
39
+              data[i].List[j].isShowActivty = true;
40
+              isShowActivty = true;
33
             }
41
             }
34
           }
42
           }
35
-          that.setData({
36
-            PayList: data,
37
-          });
38
         }
43
         }
39
-      });
44
+        that.setData({
45
+          PayList: data,
46
+          IsShowActivty: isShowActivty,
47
+        });
48
+      }
49
+      else {
50
+        that.setData({
51
+          PayList: [],
52
+        });
53
+      }
40
     });
54
     });
41
   },
55
   },
42
   gotoActive: function (e) {
56
   gotoActive: function (e) {
@@ -55,7 +69,7 @@ Page({
55
           appId: list[i].appId,
69
           appId: list[i].appId,
56
           path: path,
70
           path: path,
57
           success(res) {
71
           success(res) {
58
-            
72
+
59
           }
73
           }
60
         });
74
         });
61
 
75
 
@@ -75,12 +89,15 @@ Page({
75
       }
89
       }
76
     }
90
     }
77
   },
91
   },
92
+  gotoFeedback: function () {
93
+    server.gotoFeedback();
94
+  },
78
   refresh: function () {
95
   refresh: function () {
79
     var that = this;
96
     var that = this;
80
     wx.showLoading({
97
     wx.showLoading({
81
       title: '加载中',
98
       title: '加载中',
82
     });
99
     });
83
-    
100
+
84
     setTimeout(function () {
101
     setTimeout(function () {
85
       wx.hideLoading();
102
       wx.hideLoading();
86
       that.init();
103
       that.init();

+ 3 - 3
pages/about/paylist.wxml

@@ -3,8 +3,8 @@
3
     <view class="text0" wx:if="{{IsShowActivty}}">
3
     <view class="text0" wx:if="{{IsShowActivty}}">
4
       您购买的产品未激活,请尽快处理!
4
       您购买的产品未激活,请尽快处理!
5
     </view>
5
     </view>
6
-    <view class="text1">购买后如不能正常使用,请清理内存后重启微信并打开小程序,</view>
7
-    <view class="text2 FlexRow">
6
+    <view class="text1" bindtap='gotoFeedback'>购买后如不能正常使用,请清理内存后重启微信并打开小程序,</view>
7
+    <view class="text2 FlexRow" bindtap='gotoFeedback'>
8
       <view>一般问题即可解决。也可通过“</view>
8
       <view>一般问题即可解决。也可通过“</view>
9
       <view class="red">意见反馈</view>
9
       <view class="red">意见反馈</view>
10
       <view>”联系我们为您处理。</view>
10
       <view>”联系我们为您处理。</view>
@@ -50,7 +50,7 @@
50
       </view>
50
       </view>
51
     </view>
51
     </view>
52
   </block>
52
   </block>
53
-  <block wx:if="{{PayList.length==0}}">
53
+  <block wx:if="{{PayList && PayList.length==0}}">
54
     <view class="titleNull">无记录</view>
54
     <view class="titleNull">无记录</view>
55
   </block>
55
   </block>
56
 
56
 

+ 8 - 5
pages/index/index.js

@@ -157,16 +157,19 @@ Page({
157
           }
157
           }
158
           else {
158
           else {
159
             //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
159
             //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
160
-            setTimeout(function () {
161
-              wx.redirectTo({
162
-                url: '../main/index'
163
-              })
164
-            }, 2000);
160
+            that.getHanzi(function(){
161
+              setTimeout(function () {
162
+                wx.redirectTo({
163
+                  url: '../main/index'
164
+                })
165
+              }, 2000);
166
+            });
165
           }
167
           }
166
         }
168
         }
167
       });
169
       });
168
 
170
 
169
     });
171
     });
172
+    
170
   },
173
   },
171
   getHanzi: function (callback) {
174
   getHanzi: function (callback) {
172
     var that = this;
175
     var that = this;

+ 10 - 2
pages/main/index.js

@@ -26,6 +26,7 @@ Page({
26
   onReady: function (e) {
26
   onReady: function (e) {
27
   },
27
   },
28
   onLoad: function (options) {
28
   onLoad: function (options) {
29
+    //app.globalData.userInfo.UserID=5;
29
     this.setData({
30
     this.setData({
30
       Height: common.getSystemHeight(),
31
       Height: common.getSystemHeight(),
31
       NickName: app.globalData.userInfo.NickName,
32
       NickName: app.globalData.userInfo.NickName,
@@ -91,6 +92,9 @@ Page({
91
               }
92
               }
92
             })
93
             })
93
           }
94
           }
95
+          else{
96
+            that.getUserInfo();
97
+          }
94
         }
98
         }
95
       })
99
       })
96
     }
100
     }
@@ -171,6 +175,8 @@ Page({
171
   getData: function () {
175
   getData: function () {
172
     var that = this;
176
     var that = this;
173
     server.getData('GetHanziRecordData?UserID=' + app.globalData.userInfo.UserID + "&Version=" + app.globalData.Version, function (data) {
177
     server.getData('GetHanziRecordData?UserID=' + app.globalData.userInfo.UserID + "&Version=" + app.globalData.Version, function (data) {
178
+      
179
+
174
       if (data) {
180
       if (data) {
175
 
181
 
176
         if (!data.DayNumber)
182
         if (!data.DayNumber)
@@ -181,7 +187,7 @@ Page({
181
         var reviewCount = 0;
187
         var reviewCount = 0;
182
         if (data.ReviewList)
188
         if (data.ReviewList)
183
           reviewCount = data.ReviewList.length;
189
           reviewCount = data.ReviewList.length;
184
-
190
+        
185
         hanziNumber = 0;
191
         hanziNumber = 0;
186
         var arr = JSON.parse(wx.getStorageSync("HanziAll"));
192
         var arr = JSON.parse(wx.getStorageSync("HanziAll"));
187
         for (var k = 0; k < data.FinishedList.length; k++) {
193
         for (var k = 0; k < data.FinishedList.length; k++) {
@@ -209,7 +215,9 @@ Page({
209
               break;
215
               break;
210
           }
216
           }
211
         }
217
         }
212
-
218
+        if (!hanziNumber){
219
+          hanziNumber=0;
220
+        }
213
         that.setData({
221
         that.setData({
214
           DayNumber: data.DayNumber,
222
           DayNumber: data.DayNumber,
215
           HanziNumber: hanziNumber,
223
           HanziNumber: hanziNumber,

+ 3 - 3
pages/main/index.wxml

@@ -70,9 +70,9 @@
70
           <image src='../../images/02022.png' class="img" />
70
           <image src='../../images/02022.png' class="img" />
71
         </view>
71
         </view>
72
       </image>
72
       </image>
73
-      <view class="NickName">{{NickName}}</view>
74
-      <view class="Member2 Member" wx:if="{{IsMember==0}}">非会员</view>
75
-      <view class="Member" wx:if="{{IsMember==1}}">付费会员</view>
73
+      <view class="NickName" bindtap="gotoMemberCenter">{{NickName}}</view>
74
+      <view class="Member2 Member" wx:if="{{IsMember==0}}"  bindtap="gotoMemberCenter">非会员</view>
75
+      <view class="Member" wx:if="{{IsMember==1}}"  bindtap="gotoMemberCenter">付费会员</view>
76
       <view class="index3_0 FlexRow">
76
       <view class="index3_0 FlexRow">
77
         <view class="index3_1 FlexColumn">
77
         <view class="index3_1 FlexColumn">
78
           <view class="index3_1_1 FlexRow">
78
           <view class="index3_1_1 FlexRow">

+ 2 - 0
utils/main.js

@@ -69,6 +69,8 @@ function payMoney(payType, money, detail, callback) {
69
   console.log(money);
69
   console.log(money);
70
   if (app.globalData.userInfo.UserID == 1)
70
   if (app.globalData.userInfo.UserID == 1)
71
     money = 0.01;
71
     money = 0.01;
72
+  else if (app.globalData.userInfo.UserID == 5)
73
+    money = 0.01;
72
   //登录认证
74
   //登录认证
73
   wx.login({
75
   wx.login({
74
     success: function (res) {
76
     success: function (res) {