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

+ 5 - 5
pages/about/orderlist.js

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

+ 4 - 3
pages/about/orderlist.wxml

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

+ 13 - 14
pages/about/orderlist.wxss

@@ -1,7 +1,7 @@
1 1
 .container {
2 2
   background-color: #F0F0F0;
3 3
   justify-content: flex-start;
4
-  color: #872439;
4
+  color: #1e1e1e;
5 5
   font-weight:500;
6 6
 }
7 7
 
@@ -71,6 +71,18 @@
71 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 86
 .container .bottom{
75 87
   width:100%;
76 88
   position: fixed;
@@ -92,19 +104,6 @@
92 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 107
 .bottom .left{
109 108
   margin-left: 50rpx;
110 109
   align-items: flex-start;

+ 1 - 1
pages/about/payfinished.js

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

+ 37 - 20
pages/about/paylist.js

@@ -5,38 +5,52 @@ const app = getApp();
5 5
 
6 6
 Page({
7 7
   data: {
8
-    PayList: [],
9
-    IsActive: false,
8
+    PayList: null,
9
+    IsShowActivty: false,
10 10
   },
11 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 16
     this.setData({
17 17
       Height: common.getSystemHeight(),
18
+      UnloadType: options.type,
18 19
     });
19 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 29
   init: function () {
22 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 56
   gotoActive: function (e) {
@@ -55,7 +69,7 @@ Page({
55 69
           appId: list[i].appId,
56 70
           path: path,
57 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 95
   refresh: function () {
79 96
     var that = this;
80 97
     wx.showLoading({
81 98
       title: '加载中',
82 99
     });
83
-    
100
+
84 101
     setTimeout(function () {
85 102
       wx.hideLoading();
86 103
       that.init();

+ 3 - 3
pages/about/paylist.wxml

@@ -3,8 +3,8 @@
3 3
     <view class="text0" wx:if="{{IsShowActivty}}">
4 4
       您购买的产品未激活,请尽快处理!
5 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 8
       <view>一般问题即可解决。也可通过“</view>
9 9
       <view class="red">意见反馈</view>
10 10
       <view>”联系我们为您处理。</view>
@@ -50,7 +50,7 @@
50 50
       </view>
51 51
     </view>
52 52
   </block>
53
-  <block wx:if="{{PayList.length==0}}">
53
+  <block wx:if="{{PayList && PayList.length==0}}">
54 54
     <view class="titleNull">无记录</view>
55 55
   </block>
56 56
 

+ 8 - 5
pages/index/index.js

@@ -157,16 +157,19 @@ Page({
157 157
           }
158 158
           else {
159 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 174
   getHanzi: function (callback) {
172 175
     var that = this;

+ 10 - 2
pages/main/index.js

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

+ 3 - 3
pages/main/index.wxml

@@ -70,9 +70,9 @@
70 70
           <image src='../../images/02022.png' class="img" />
71 71
         </view>
72 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 76
       <view class="index3_0 FlexRow">
77 77
         <view class="index3_1 FlexColumn">
78 78
           <view class="index3_1_1 FlexRow">

+ 2 - 0
utils/main.js

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