chengjie 7 年之前
父节点
当前提交
f255024854

+ 1 - 1
app.js

@@ -11,7 +11,7 @@ App({
11 11
     this.globalData.systemInfo = wx.getSystemInfoSync();
12 12
   },
13 13
   globalData: {
14
-    Version: "1.0.1",
14
+    Version: "1.1.0",
15 15
     IsProduction: false,
16 16
     ProgramID: 106,
17 17
     AppID: "wx313a8f2c0741efe1",

+ 3 - 0
app.json

@@ -1,6 +1,7 @@
1 1
 {
2 2
   "pages": [
3 3
     "pages/index/index",
4
+    "pages/index/activate",
4 5
     "pages/main/list",
5 6
     "pages/main/detail",
6 7
     "pages/main/search",
@@ -10,6 +11,8 @@
10 11
     "pages/about/payfinished",
11 12
     "pages/about/paylist",
12 13
     "pages/about/newuserlist",
14
+    "pages/about/orderlist",
15
+    "pages/about/membercenter",
13 16
     "pages/main/index"
14 17
   ],
15 18
   "window": {

二进制
images/02022.png


二进制
images/06001.png


二进制
images/06003.png


二进制
images/06005.png


二进制
images/06010.png


二进制
images/06011.gif


二进制
images/06012.png


二进制
images/07001.png


二进制
images/SelectNo.png


images/012.png → images/SelectYes.png


+ 132 - 0
pages/about/membercenter.js

@@ -0,0 +1,132 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    IsAccredit:false,
9
+  },
10
+  onLoad: function (options) {
11
+
12
+    var member="非会员";
13
+    if (app.globalData.userInfo.IsMember==1)
14
+      member = "付费会员";
15
+
16
+    this.setData({
17
+      Height: common.getSystemHeight(),
18
+      Member:member,
19
+    });
20
+    
21
+    
22
+
23
+    this.init();
24
+  },
25
+  init:function(){
26
+    var that = this;
27
+    server.getData('GetWXUsersAllTime?ProductID=' + app.globalData.ProgramID+'&UserID=' + app.globalData.userInfo.UserID, function (data) {
28
+      if (data) {
29
+        that.setData({
30
+          ProductList: data,
31
+        });
32
+      }
33
+    });
34
+
35
+    wx.getSetting({
36
+      success(res) {
37
+        if (res.authSetting['scope.userInfo']) {
38
+          that.setData({
39
+            IsAccredit: true,
40
+          });
41
+        }
42
+      }
43
+    });
44
+  },
45
+  gotoPaylist:function(){
46
+    wx.navigateTo({
47
+      url: '../about/paylist',
48
+    });
49
+  },
50
+  getAccredit: function () {
51
+    if (!this.data.IsAccredit) {
52
+      var that = this;
53
+      wx.getSetting({
54
+        success(res) {
55
+          if (!res.authSetting['scope.userInfo']) {
56
+            wx.authorize({
57
+              scope: 'scope.userInfo',
58
+              success() {
59
+                that.getUserInfo();
60
+              },
61
+              fail() {
62
+                wx.openSetting({
63
+                  success(res) {
64
+                    that.getUserInfo();
65
+                  }
66
+                });
67
+              }
68
+            })
69
+          }
70
+        }
71
+      })
72
+    }
73
+  },
74
+  //得到用户信息
75
+  getUserInfo: function () {
76
+    var that = this
77
+    //调用登录接口
78
+    wx.login({
79
+      success: function (res0) {
80
+        wx.getUserInfo({
81
+          withCredentials: true,
82
+          success: function (res) {
83
+            app.globalData.userInfo = res.userInfo;
84
+
85
+            app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
86
+            app.globalData.userInfo.AvatarUrl = app.globalData.userInfo.avatarUrl;
87
+
88
+            // that.hasGetShareInfo(app.globalData.userInfo);
89
+            that.setData({
90
+              IsAccredit: true,
91
+              NickName: app.globalData.userInfo.NickName,
92
+              AvatarUrl: app.globalData.userInfo.AvatarUrl
93
+            });
94
+
95
+            app.globalData.userInfo.Code = res0.code;
96
+            app.globalData.userInfo.iv = res.iv;
97
+            app.globalData.userInfo.encryptedData = res.encryptedData;
98
+            that.login(app.globalData.userInfo);
99
+          },
100
+          fail: function (res) {
101
+            
102
+          }
103
+        });
104
+      },
105
+      fail: function () {
106
+      }
107
+    });
108
+  },
109
+  login: function (param) {
110
+    var that = this;
111
+    server.postData('HanziLogin', {
112
+      Code: param.Code,
113
+      NickName: param.nickName,
114
+      Language: param.language,
115
+      Gender: param.gender,
116
+      City: param.city,
117
+      Province: param.province,
118
+      Country: param.country,
119
+      AvatarUrl: param.avatarUrl,
120
+      ProgramVersion: app.globalData.Version,
121
+      Introducer: app.globalData.introducer,
122
+      UserSource: app.globalData.userSource,
123
+      SourceID: app.globalData.SourceID,
124
+      LastUserSource: app.globalData.userSource,
125
+      iv: param.iv,
126
+      encryptedData: param.encryptedData,
127
+    }, function (data) {
128
+
129
+    });
130
+    
131
+  },
132
+})

+ 5 - 0
pages/about/membercenter.json

@@ -0,0 +1,5 @@
1
+{
2
+  "navigationBarTitleText": "会员中心",
3
+  "backgroundColor": "#F0F0F0",
4
+  "enablePullDownRefresh": false
5
+}

+ 81 - 0
pages/about/membercenter.wxml

@@ -0,0 +1,81 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <view class="title0" bindtap="getAccredit" wx:if="{{!IsAccredit}}">
3
+    为保障您的消费权益,在购买后请尽快授权用户信息!
4
+  </view>
5
+  <view class="title1">
6
+    <view class="title1_1">会员信息</view>
7
+  </view>
8
+  <view class="title3 FlexRow" bindtap="getAccredit" wx:if="{{!IsAccredit}}">
9
+    <view class="title2_1 FlexColumn">
10
+      <view class="red">授权用户信息</view>
11
+      <view class="title3_2">授权后才能正常使用统计、套装、礼品卡等功能</view>
12
+    </view>
13
+    <view class="title2_2 FlexRow">
14
+      <image src='../../images/Arrow.png' class="Arrow" />
15
+    </view>
16
+  </view>
17
+  <view class="line FlexColumn">
18
+    <view class="line1"></view>
19
+  </view>
20
+  <view class="title2 FlexRow">
21
+    <view class="title2_1 FlexColumn">
22
+      <view>用户身份</view>
23
+    </view>
24
+    <view class="title2_2 FlexRow">
25
+      {{Member}}
26
+    </view>
27
+  </view>
28
+  <view class="line FlexColumn">
29
+    <view class="line1"></view>
30
+  </view>
31
+  <view class="title2_5 title2 FlexRow">
32
+    <view class="title2_4 title2_1 FlexColumn">产品有效期</view>
33
+  </view>
34
+  <view class="title2_3 title2 FlexRow" wx:for="{{ProductList}}" wx:key="index">
35
+    <view class="title2_1">
36
+      {{item.Name}}
37
+    </view>
38
+    <view class="title2_2">
39
+      {{item.Time}}
40
+    </view>
41
+  </view>
42
+  <view class="line2"></view>
43
+
44
+  <view class="title1">
45
+    <view class="title1_1">消费记录</view>
46
+  </view>
47
+
48
+  <view class="title2 FlexRow" bindtap='gotoPaylist'>
49
+    <view class="title2_1 FlexColumn">
50
+      <view>我的订单</view>
51
+    </view>
52
+    <view class="title2_2 FlexRow">
53
+      <image src='../../images/Arrow.png' class="Arrow" />
54
+    </view>
55
+  </view>
56
+  <view class="line FlexColumn">
57
+    <view class="line1"></view>
58
+  </view>
59
+
60
+  <!-- <view class="title2 FlexRow">
61
+    <view class="title2_1 FlexColumn">
62
+      <view>优惠券</view>
63
+    </view>
64
+    <view class="title2_2 FlexRow">
65
+      <view class="number">1</view>
66
+      <image src='../../images/Arrow.png' class="Arrow" />
67
+    </view>
68
+  </view>
69
+  <view class="line FlexColumn">
70
+    <view class="line1"></view>
71
+  </view>
72
+  <view class="title2 FlexRow">
73
+    <view class="title2_1 FlexColumn">
74
+      <view>礼品卡</view>
75
+    </view>
76
+    <view class="title2_2 FlexRow">
77
+      <view class="number">34</view>
78
+      <image src='../../images/Arrow.png' class="Arrow" />
79
+    </view>
80
+  </view> -->
81
+</view>

+ 110 - 0
pages/about/membercenter.wxss

@@ -0,0 +1,110 @@
1
+.container {
2
+  background-color: #F0F0F0;
3
+  justify-content: flex-start;
4
+  font-weight: 500;
5
+  color:#1e1e1e;
6
+  overflow-x:hidden;
7
+}
8
+
9
+.title0 {
10
+  width: 100%;
11
+  height: 73rpx;
12
+  background-color: #A63917;
13
+  color:#fff;
14
+  font-size:24rpx;
15
+  text-align: center;
16
+  line-height: 73rpx;
17
+}
18
+.title1 {
19
+  width: 100%;
20
+  height: 125rpx;
21
+  background-color: #F0F0F0;
22
+}
23
+
24
+.title1_1 {
25
+  margin: 50rpx 0 0 30rpx;
26
+  font-size: 32rpx;
27
+}
28
+
29
+.title2 {
30
+  width: 100%;
31
+  background-color: #FFFFFF;
32
+  font-size: 28rpx;
33
+  height: 100rpx;
34
+  justify-content: space-between;
35
+  font-weight: 400;
36
+}
37
+
38
+.title2_1 {
39
+  margin-left: 30rpx;
40
+  align-items: flex-start;
41
+}
42
+
43
+.title2_1 .red{
44
+  color:#A20602;
45
+  font-weight: 500;
46
+}
47
+
48
+.title2_2 {
49
+  margin-right: 30rpx;
50
+}
51
+
52
+.title2_3{
53
+  height:40rpx;
54
+  font-size:24rpx;
55
+}
56
+.title2_4{
57
+  margin-top: 30rpx;
58
+  font-size:28rpx;
59
+}
60
+.title2_5{
61
+  height:70rpx;
62
+}
63
+
64
+.Arrow {
65
+  width: 16rpx;
66
+  height: 26rpx;
67
+  margin: 0 0 0 30rpx;
68
+}
69
+
70
+.title3 {
71
+  width: 100%;
72
+  background-color: #FFFFFF;
73
+  font-size: 28rpx;
74
+  height: 139rpx;
75
+  justify-content: space-between;
76
+  font-weight: 400;
77
+}
78
+
79
+.title3_2 {
80
+  font-size: 24rpx;
81
+}
82
+
83
+.line {
84
+  width: 100%;
85
+  height: 2rpx;
86
+  background-color: #F8F8F8;
87
+  align-items: flex-end;
88
+}
89
+
90
+.line1 {
91
+  width: 720rpx;
92
+  height: 1rpx;
93
+  background-color: #E3E3E3;
94
+}
95
+.line2 {
96
+  width: 100%;
97
+  height: 30rpx;
98
+  background-color: #fff;
99
+}
100
+
101
+.number{
102
+  background-color: #A20602;
103
+  width:53rpx;
104
+  height:40rpx;
105
+  line-height: 40rpx;
106
+  border-radius: 8rpx;
107
+  text-align: center;
108
+  color:#ffffff;
109
+  font-size: 24rpx;
110
+}

+ 126 - 0
pages/about/orderlist.js

@@ -0,0 +1,126 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+var isPaying = false;
6
+
7
+Page({
8
+  data: {
9
+    ListProgram: [
10
+      {
11
+        ID: 89,
12
+        Name: "数学口算练习",
13
+        Remark: "一款原价19.90元,有效期6个月",
14
+        Price: 1990,
15
+        Remark2: "",
16
+        Image: "06009",
17
+        IsSelect: true,
18
+      }, {
19
+        ID: 99,
20
+        Name: "英语自然拼读",
21
+        Remark: "一款原价19.80元,有效期6个月",
22
+        Price: 1980,
23
+        Remark2: "成套购买赠永久有效期",
24
+        Image: "06006",
25
+        IsSelect: true,
26
+      }, {
27
+        ID: 98,
28
+        Name: "语文汉语拼音",
29
+        Remark: "一款原价9.90元,有效期6个月",
30
+        Price: 990,
31
+        Remark2: "成套购买赠永久有效期",
32
+        Image: "06007",
33
+        IsSelect: true,
34
+      }, {
35
+        ID: 106,
36
+        Name: "语文识字",
37
+        Remark: "一款原价9.80元,有效期6个月",
38
+        Price: 980,
39
+        Remark2: "成套购买赠永久有效期",
40
+        Image: "06008",
41
+        IsSelect: true,
42
+      },
43
+    ],
44
+  },
45
+  onLoad: function (options) {
46
+    this.selectProgram();
47
+  },
48
+  selectProgram: function (e) {
49
+    var id = 0;
50
+    if (e) {
51
+      id = e.currentTarget.dataset.id;
52
+    }
53
+    var total = 0, totalFinal = 0, 
54
+    selectCount = 0, discounts = 0;
55
+    for (var i = 0; i < this.data.ListProgram.length; i++) {
56
+      if (this.data.ListProgram[i].ID == id) {
57
+        this.data.ListProgram[i].IsSelect = !this.data.ListProgram[i].IsSelect;
58
+      }
59
+
60
+      if (this.data.ListProgram[i].IsSelect) {
61
+        total += this.data.ListProgram[i].Price;
62
+        selectCount++;
63
+      }
64
+    }
65
+
66
+    var discount = 1;
67
+    if (selectCount >= 3) {
68
+      discount = 0.6
69
+    }
70
+    else if (selectCount == 2) {
71
+      discount = 0.7
72
+    }
73
+
74
+    totalFinal = total * discount;
75
+    discounts = total - totalFinal;
76
+
77
+    total = Math.round(total) / 100;
78
+    totalFinal = Math.round(totalFinal) / 100;
79
+    discounts = Math.round(discounts) / 100;
80
+
81
+    var remark="一款原价,成套购买更划算";
82
+    if (discount<1)
83
+      remark = "套装购买现享 " + (discount * 10) + " 折,已优惠 " + discounts+" 元"
84
+
85
+    this.setData({
86
+      ListProgram: this.data.ListProgram,
87
+      TotalFinal: totalFinal,
88
+      Remark: remark,
89
+      Total:total,
90
+      Discount: discount,
91
+    });
92
+
93
+  },
94
+  gotoFeedback: function () {
95
+    server.gotoFeedback();
96
+  },
97
+  getPay: function (e) {
98
+    if (!isPaying) {
99
+      isPaying = true;
100
+      var that = this;
101
+      var money = this.data.TotalFinal;
102
+      var detail="";
103
+      for (var i = 0; i < this.data.ListProgram.length;i++){
104
+        if (this.data.ListProgram[i].IsSelect){
105
+          detail += ","+this.data.ListProgram[i].ID + ":" + this.data.ListProgram[i].Price * this.data.Discount;
106
+        }
107
+      }
108
+      detail=detail.substr(1);
109
+      server.payMoney(4,money,detail, function (data) {
110
+        wx.navigateTo({
111
+          url: '../about/payfinished',
112
+        });
113
+      });
114
+      setTimeout(function () {
115
+        isPaying = false;
116
+      }, 10000);
117
+    }
118
+  },
119
+  onShareAppMessage: function () {
120
+    return {
121
+      title: app.globalData.ShareTitle,
122
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
123
+      imageUrl: '../../images/07001.png',
124
+    }
125
+  },
126
+})

+ 6 - 0
pages/about/orderlist.json

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

+ 53 - 0
pages/about/orderlist.wxml

@@ -0,0 +1,53 @@
1
+<view class="container FlexColumn">
2
+  <view class="panel1 FlexColumn">
3
+    <image src="../../images/06005.png" class="img06005" />
4
+
5
+  </view>
6
+  <view class="panel2 FlexColumn">
7
+    <view class="panelItem FlexRow" wx:for="{{ListProgram}}" wx:key="index" bindtap='selectProgram' data-id="{{item.ID}}">
8
+      <image src="../../images/SelectYes.png" class="SelectImg" wx:if="{{item.IsSelect}}" />
9
+      <image src="../../images/SelectNo.png" class="SelectImg" wx:if="{{!item.IsSelect}}" />
10
+      <image src="../../images/{{item.Image}}.png" class="img06009" />
11
+      <view class="text FlexColumn">
12
+        <view class="text1">{{item.Name}}</view>
13
+        <view class="text2">{{item.Remark}}</view>
14
+        <view class="text3" wx:if="{{item.Remark2}}">{{item.Remark2}}</view>
15
+      </view>
16
+    </view>
17
+  </view>
18
+
19
+  <view class="bottom FlexColumn">
20
+    <view class="text0 FlexRow" bindtap='gotoFeedback'>
21
+      <view>如遇支付问题请</view>
22
+      <view class="red">联系客服</view>
23
+      <view>为您处理</view>
24
+    </view>
25
+    <view class="bottom1 FlexColumn">
26
+      <view class="top FlexRow" wx:if="{{Total>0}}">
27
+        <view class="left">
28
+          {{TotalFinal}}元
29
+        </view>
30
+        <view class="right FlexColumn">
31
+          <view class="text3 text2 FlexRow">原价
32
+            <view class="total">{{Total}}</view> 元</view>
33
+          <view class="text2">{{Remark}}</view>
34
+        </view>
35
+      </view>
36
+      <view class="top FlexRow" wx:if="{{Total==0}}">
37
+        <view class="left2 left">
38
+          0.00元
39
+        </view>
40
+        <view class="right FlexColumn">
41
+          <view class="text3 text2 FlexRow"></view>
42
+          <view class="text2">请选择商品</view>
43
+        </view>
44
+      </view>
45
+      <view class="btn" bindtap="getPay" wx:if="{{Total>0}}" >
46
+        <view class="btn1">立即购买</view>
47
+      </view>
48
+      <view class="btn5 btn" wx:if="{{Total==0}}">
49
+        <view class="btn4 btn1">立即购买</view>
50
+      </view>
51
+    </view>
52
+  </view>
53
+</view>

+ 188 - 0
pages/about/orderlist.wxss

@@ -0,0 +1,188 @@
1
+.container {
2
+  background-color: #F0F0F0;
3
+  justify-content: flex-start;
4
+  color: #872439;
5
+  font-weight:500;
6
+}
7
+
8
+.panel1{
9
+  width: 100%;
10
+  justify-content: flex-start;
11
+  
12
+}
13
+.panel1 .img06005{
14
+  width:100%;
15
+  height:81rpx;
16
+}
17
+
18
+.panel2{
19
+  width: 100%;
20
+  background-color: #f0f0f0;
21
+  justify-content: flex-start;
22
+}
23
+.panel2 .panelItem{
24
+  width: 100%;
25
+  min-height:160rpx;
26
+  background-color: #fff;
27
+  margin-bottom: 1rpx;
28
+  justify-content: flex-start;
29
+  align-items: flex-start;
30
+}
31
+.panel2 .SelectImg{
32
+  width: 40rpx;
33
+  height:40rpx;
34
+  margin-left: 40rpx;
35
+  margin-top: 60rpx;
36
+}
37
+.panel2 .img06009{
38
+  width: 80rpx;
39
+  height:80rpx;
40
+  margin-left: 50rpx;
41
+  margin-top: 40rpx;
42
+}
43
+
44
+.panel2 .text{
45
+  margin-left: 30rpx;
46
+  align-items: flex-start;
47
+  margin-top: 40rpx;
48
+}
49
+
50
+.panel2 .text1{
51
+  font-size: 32rpx;
52
+  font-weight: 500;
53
+}
54
+.panel2 .text2{
55
+  font-size: 24rpx;
56
+  font-weight: 400;
57
+  color:#787878;
58
+}
59
+
60
+.panel2 .text3{
61
+  width:260rpx;
62
+  height:50rpx;
63
+  line-height: 50rpx;
64
+  text-align: center;
65
+  font-weight: 500;
66
+  color:#1E1E1E;
67
+  border-radius: 6rpx;
68
+  font-size:22rpx;
69
+  background-color: #FFEC89;
70
+  margin-top: 10rpx;
71
+  margin-bottom: 40rpx;
72
+}
73
+
74
+.container .bottom{
75
+  width:100%;
76
+  position: fixed;
77
+  bottom:0;
78
+  background-color: #F0F0F0;
79
+  justify-content: flex-end;
80
+  z-index: 100;
81
+}
82
+
83
+.bottom .contact {
84
+  padding-left: 0;
85
+  padding-right: 0;
86
+  background-color: #F0F0F0;
87
+  width:100%;
88
+  margin: 12rpx 0 12rpx 0;
89
+}
90
+
91
+.bottom .contact::after {
92
+  border: 0px;
93
+}
94
+
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{
109
+  margin-left: 50rpx;
110
+  align-items: flex-start;
111
+}
112
+
113
+
114
+.bottom .bottom1{
115
+  width:100%;
116
+  height:230rpx;
117
+  background-color: #F77706;
118
+  text-align: center;
119
+  font-size: 48rpx;
120
+  color: #fff;
121
+  position: relative;
122
+}
123
+
124
+
125
+.bottom .top{
126
+  width:100%;
127
+  color: #fff;
128
+  justify-content: space-between;
129
+  font-size: 24rpx;
130
+}
131
+
132
+.bottom .left{
133
+  margin-left: 50rpx;
134
+  font-size: 64rpx;
135
+  font-weight: 400;
136
+  text-align: left;
137
+  height:90rpx;
138
+  line-height: 90rpx;
139
+}
140
+
141
+.bottom .left2{
142
+  font-size: 48rpx;
143
+}
144
+
145
+.bottom .right{
146
+  margin-right: 50rpx;
147
+  align-items: flex-end;
148
+  justify-content: flex-end;
149
+  min-height: 55rpx;
150
+}
151
+.bottom .text2{
152
+  font-size: 24rpx;
153
+  font-weight: 400;
154
+}
155
+.bottom .text3{
156
+  color:#7D2B25;
157
+}
158
+.bottom .total{
159
+  text-decoration:line-through; 
160
+}
161
+
162
+.bottom .btn {
163
+  width: 690rpx;
164
+  height: 100rpx;
165
+  background-color: #E1600A;
166
+  border-radius: 10rpx;
167
+  margin-top: 10rpx;
168
+}
169
+.bottom .btn1 {
170
+  width: 100%;
171
+  height: 90rpx;
172
+  line-height: 90rpx;
173
+  background-color: #FFDD0C;
174
+  border-radius: 10rpx;
175
+  position:relative;
176
+  top:0;
177
+  font-size: 36rpx;
178
+  color: #1E1E1E;
179
+}
180
+
181
+.bottom .btn4 {
182
+  background-color: #4D4D4D;
183
+  color:#787878;
184
+}
185
+
186
+.bottom .btn5 {
187
+  background-color: #262626;
188
+}

+ 10 - 0
pages/about/payfinished.js

@@ -7,8 +7,18 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function (options) {
10
+    var text1= "请确认购买记录";
11
+    var text2 = "查看我的订单";
12
+    if (options && options.type=="all"){
13
+      text1 = "套装产品必须逐个激活";
14
+      text2 = "赶紧去激活";
15
+    }
16
+
10 17
     this.setData({
11 18
       Height: common.getSystemHeight(),
19
+      Text1:text1,
20
+      Text2:text2,
21
+      OrderType: options.type,
12 22
     });
13 23
   },
14 24
   deblocking: function () {

+ 16 - 15
pages/about/payfinished.wxml

@@ -1,20 +1,21 @@
1 1
 <view class="container FlexColumn" style='height:{{Height}}rpx;'>
2 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>
3
+  <text class="text1">感谢购买</text>
4
+  <text class="text1_1">{{Text1}}</text>
5
+
6
+  <view class="btn" bindtap="gotoPayList">
7
+    <view class="btn1">{{Text2}}</view>
6 8
   </view>
7 9
   <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>
10
+
11
+  <block wx:if="{{OrderType!='all'}}">
12
+    <view class="line2"></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
+  </block>
20 21
 </view>

+ 12 - 4
pages/about/payfinished.wxss

@@ -6,8 +6,8 @@
6 6
 }
7 7
 
8 8
 .bg{
9
-  width: 639rpx;
10
-  height:521rpx;
9
+  width: 100%;
10
+  height:769rpx;
11 11
   position: fixed;
12 12
   bottom: 0;
13 13
   left:0;
@@ -19,13 +19,19 @@
19 19
   margin-top: 132rpx;
20 20
 }
21 21
 
22
+.text1_1{
23
+  font-size:44rpx;
24
+  text-align: center;
25
+  margin-top: 10rpx;
26
+}
27
+
22 28
 
23 29
 .btn {
24 30
   width: 600rpx;
25 31
   height: 104rpx;
26 32
   background-color: #035834;
27 33
   border-radius: 14rpx;
28
-  margin-top: 110rpx;
34
+  margin-top: 88rpx;
29 35
 }
30 36
 
31 37
 .btn1 {
@@ -45,13 +51,15 @@
45 51
   font-size:22rpx;
46 52
   width:560rpx; 
47 53
   margin-top: 50rpx;
54
+  z-index: 10;
48 55
 }
49 56
 
50 57
 .line2{
51 58
   width: 600rpx;
52 59
   height:3rpx;
53 60
   background-color: #593613;
54
-  margin-top:80rpx;
61
+  margin-top:360rpx;
62
+  z-index: 10;
55 63
 }
56 64
 
57 65
 

+ 64 - 10
pages/about/paylist.js

@@ -6,8 +6,13 @@ const app = getApp();
6 6
 Page({
7 7
   data: {
8 8
     PayList: [],
9
+    IsActive: false,
9 10
   },
10 11
   onLoad: function (options) {
12
+    //测试*****************
13
+    if (!app.globalData.userInfo)
14
+      app.globalData.userInfo = { UserID: 4 };
15
+
11 16
     this.setData({
12 17
       Height: common.getSystemHeight(),
13 18
     });
@@ -15,22 +20,71 @@ Page({
15 20
   },
16 21
   init: function () {
17 22
     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
+    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
+              }
33
+            }
34
+          }
35
+          that.setData({
36
+            PayList: data,
37
+          });
23 38
         }
24
-        var serviceTime = data.ProductServiceTime;
25
-        if (serviceTime == "2099年12月31日")
26
-          serviceTime = "永久有效";
39
+      });
40
+    });
41
+  },
42
+  gotoActive: function (e) {
43
+    var that = this;
44
+    var productid = e.currentTarget.dataset.productid;
45
+    var list = server.getProgramList();
46
+    for (var i = 0; i < list.length; i++) {
47
+      if (productid == list[i].ID) {
48
+        var path = list[i].path;
49
+        path += "&ProductBuyInfoID=" + e.currentTarget.dataset.id;
50
+        path += "&ProductID=" + app.globalData.ProgramID;
51
+        path += "&ProductUserID=" + app.globalData.userInfo.UserID;
52
+        path += "&BuyType=" + e.currentTarget.dataset.buytype;
53
+
54
+        wx.navigateToMiniProgram({
55
+          appId: list[i].appId,
56
+          path: path,
57
+          success(res) {
58
+            
59
+          }
60
+        });
27 61
 
62
+        var data = this.data.PayList;
63
+        for (var i = 0; i < data.length; i++) {
64
+          for (var j = 0; j < data[i].List.length; j++) {
65
+            if (data[i].List[j].ProductID == productid) {
66
+              data[i].List[j].isShowActivty = false;
67
+            }
68
+          }
69
+        }
28 70
         that.setData({
29
-          ProductServiceTime: serviceTime,
30
-          PayList: list,
71
+          PayList: data,
31 72
         });
73
+
74
+        break;
32 75
       }
76
+    }
77
+  },
78
+  refresh: function () {
79
+    var that = this;
80
+    wx.showLoading({
81
+      title: '加载中',
33 82
     });
83
+    
84
+    setTimeout(function () {
85
+      wx.hideLoading();
86
+      that.init();
87
+    }, 1000);
34 88
   },
35 89
   onShareAppMessage: function () {
36 90
     return {

+ 1 - 1
pages/about/paylist.json

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

+ 46 - 20
pages/about/paylist.wxml

@@ -1,31 +1,57 @@
1
-<view class="container FlexColumn" style='height:{{Height}}rpx;'>
1
+<view class="container FlexColumn" style='min-height:{{Height}}rpx;'>
2 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">
3
+    <view class="text0" wx:if="{{IsShowActivty}}">
4
+      您购买的产品未激活,请尽快处理!
5
+    </view>
6
+    <view class="text1">购买后如不能正常使用,请清理内存后重启微信并打开小程序,</view>
7
+    <view class="text2 FlexRow">
8
+      <view>一般问题即可解决。也可通过“</view>
9
+      <view class="red">意见反馈</view>
10
+      <view>”联系我们为您处理。</view>
11
+    </view>
12
+    <view class="panel1 FlexColumn" wx:for="{{PayList}}" wx:key="index">
13
+      <view class="item0 item FlexRow">
15 14
         <view class="left FlowColumn">
16
-          <view class="title1">
17
-            {{item.Title}}
15
+          <view class="title0 FlexRow">
16
+            <view class="title0_1">支付时间</view>
17
+            <view>{{item.PayEndTime}}</view>
18
+          </view>
19
+          <view class="title0 FlexRow">
20
+            <view class="title0_1">交易单号</view>
21
+            <view>{{item.TradeNo}}</view>
18 22
           </view>
19
-          <view class="title2">
20
-            {{item.Time}}
23
+        </view>
24
+        <view class="right2 right">{{item.MoneyTotal}}</view>
25
+      </view>
26
+      <view class="panel2 FlexColumn" wx:for="{{item.List}}" wx:key="i" wx:for-item="itemChild" wx:for-index="i">
27
+        <view class="item FlexRow">
28
+          <view class="left FlexRow">
29
+            <image src='../../images/{{itemChild.ImageName}}.png' class="img" />
30
+            <view class="title1">
31
+              {{itemChild.ProductName}}
32
+            </view>
33
+            <view class="title2">
34
+              [{{itemChild.PayTypeName}}]
35
+            </view>
21 36
           </view>
37
+          <view class="right">
38
+            <view wx:if="{{itemChild.Status==1}}">{{itemChild.Money}}</view> 
39
+            <view class="btn" wx:if="{{itemChild.Status==0 && itemChild.isShowActivty}}" bindtap="gotoActive" data-id='{{itemChild.ID}}' data-productid='{{itemChild.ProductID}}' data-buytype='{{itemChild.BuyType}}' >
40
+              <view class="btn1">去激活</view>
41
+            </view>
42
+            <view class="btn2 btn" wx:if="{{itemChild.Status==0  && !itemChild.isShowActivty}}" bindtap="refresh">
43
+              <view class="btn3 btn1">刷新</view>
44
+            </view>
45
+          </view>
46
+        </view>
47
+        <view class="line FlexRow" wx:if="{{i<item.List.length-1}}">
48
+          <view class="line2"></view>
22 49
         </view>
23
-        <view class="right">{{item.PayMoney}}</view>
24 50
       </view>
25 51
     </view>
26 52
   </block>
27 53
   <block wx:if="{{PayList.length==0}}">
28
-    <view class="title0">无记录</view>
54
+    <view class="titleNull">无记录</view>
29 55
   </block>
30
-  
56
+
31 57
 </view>

+ 91 - 23
pages/about/paylist.wxss

@@ -5,14 +5,14 @@
5 5
   font-weight: 500;
6 6
 }
7 7
 
8
-.contact {
9
-  padding-left: 0;
10
-  padding-right: 0;
11
-  background-color: #f0f0f0;
12
-}
13
-
14
-.contact::after {
15
-  border: 0px;
8
+.text0 {
9
+  width: 100%;
10
+  height: 73rpx;
11
+  background-color: #A63917;
12
+  color:#fff;
13
+  font-size:24rpx;
14
+  text-align: center;
15
+  line-height: 73rpx;
16 16
 }
17 17
 
18 18
 .text1 {
@@ -20,14 +20,18 @@
20 20
   font-weight: 400;
21 21
   width: 690rpx;
22 22
   text-align: left;
23
-  justify-content: flex-start;
23
+  margin-top: 40rpx;
24 24
 }
25 25
 
26 26
 .text2 {
27
-  margin-top: 50rpx;
27
+  font-size: 24rpx;
28
+  font-weight: 400;
29
+  width: 690rpx;
30
+  justify-content: flex-start;
31
+  margin-bottom: 40rpx;
28 32
 }
29 33
 
30
-.text1 .red {
34
+.text2 .red {
31 35
   color: #a20602;
32 36
   font-weight: 500;
33 37
   text-decoration: underline;
@@ -37,7 +41,7 @@
37 41
   font-size: 32rpx;
38 42
   width: 690rpx;
39 43
   text-align: left;
40
-  margin-top: 40rpx;
44
+  margin-top: 140rpx;
41 45
 }
42 46
 
43 47
 .text4 {
@@ -49,15 +53,14 @@
49 53
 
50 54
 .panel1 {
51 55
   width: 100%;
52
-  margin-top: 40rpx;
56
+  margin-bottom: 40rpx;
53 57
   background-color: #fff;
58
+  border-bottom: 1rpx solid #D2D2D2;
54 59
 }
55 60
 
56
-.item {
57
-  width: 100%;
58
-  justify-content: space-between;
59
-  height: 132rpx;
60
-  border-bottom: 1rpx solid #f0f0f0;
61
+.item0 {
62
+  height: 138rpx;
63
+  border-bottom: 1rpx solid #E3E3E3;
61 64
 }
62 65
 
63 66
 .left {
@@ -66,23 +69,88 @@
66 69
 
67 70
 .right {
68 71
   margin-right: 30rpx;
69
-  font-size: 32rpx;
72
+  font-size: 28rpx;
73
+  color:#9B9B9B;
74
+}
75
+.right2 {
76
+  font-size: 56rpx;
77
+  color:#1e1e1e;
78
+}
79
+
80
+.title0 {
81
+  font-size: 20rpx;
82
+  text-align: left;
83
+  justify-content: flex-start;
84
+}
85
+
86
+.title0_1{
87
+  color:#9B9B9B;
88
+  margin-right: 10rpx;
89
+}
90
+.panel2{
91
+  width: 100%;
92
+}
93
+.item {
94
+  width: 100%;
95
+  justify-content: space-between;
96
+  height: 111rpx;
97
+}
98
+
99
+.img {
100
+  width:50rpx;
101
+  height:50rpx;
102
+  margin-right: 20rpx;
70 103
 }
71 104
 
72 105
 .title1 {
73 106
   font-size: 28rpx;
74 107
   text-align: left;
108
+  margin-right: 10rpx;
75 109
 }
76 110
 
77 111
 .title2 {
78
-  font-size: 24rpx;
112
+  font-size: 22rpx;
79 113
   text-align: left;
80
-  color: #787878;
81
-  font-weight: 400;
114
+  color: #9B9B9B;
82 115
 }
83 116
 
84
-.title0 {
117
+.panel2 .line{
118
+  width: 100%;
119
+  justify-content: flex-end;
120
+}
121
+.panel2 .line2{
122
+  width: 720rpx;
123
+  height: 1rpx;
124
+  background-color: #E3E3E3; 
125
+}
126
+
127
+.titleNull {
85 128
   font-size: 36rpx;
86 129
   color: #787878;
87 130
   margin-top: 522rpx;
88 131
 }
132
+
133
+.btn {
134
+  width: 136rpx;
135
+  height: 70rpx;
136
+  background-color: #A63917;
137
+  border-radius: 8rpx;
138
+}
139
+.btn1 {
140
+  width: 100%;
141
+  height: 60rpx;
142
+  background-color: #EA413A;
143
+  border-radius: 8rpx;
144
+  color:#fff;
145
+  text-align: center;
146
+  line-height: 60rpx;
147
+  font-size:32rpx;
148
+  position:relative;
149
+  top:0;
150
+}
151
+.btn2 {
152
+  background-color: #146392;
153
+}
154
+.btn3 {
155
+  background-color: #169DED;
156
+}

+ 29 - 0
pages/index/activate.js

@@ -0,0 +1,29 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+const app = getApp();
4
+
5
+Page({
6
+  data: {
7
+  },
8
+  onLoad: function (options) {
9
+    console.log(options);
10
+    this.updateData(options);
11
+
12
+    this.setData({
13
+      Height: common.getSystemHeight(),
14
+    });
15
+  },
16
+  updateData: function (param) {
17
+    var that = this;
18
+    server.getData('UpdateWXUsersAll?ProductID=' + param.ProductID
19
+      + "&ProductUserID=" + param.ProductUserID
20
+      + "&CurrentProductID=" + param.CurrentProductID
21
+      + "&CurrentUserID=" + param.CurrentUserID
22
+      + "&ProductBuyInfoID=" + param.ProductBuyInfoID
23
+      + "&BuyType=" + param.BuyType, function (data) {
24
+        if (data) {
25
+
26
+        }
27
+      });
28
+  },
29
+})

+ 9 - 0
pages/index/activate.json

@@ -0,0 +1,9 @@
1
+{
2
+  "navigationBarBackgroundColor": "#F5E2BE",
3
+  "navigationBarTextStyle": "black",
4
+  "navigationBarTitleText": "激活",
5
+  "backgroundColor": "#F5E2BE",
6
+  "backgroundTextStyle": "light",
7
+  "disableScroll": true,
8
+  "enablePullDownRefresh": false
9
+}

+ 9 - 0
pages/index/activate.wxml

@@ -0,0 +1,9 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <image src="../../images/06003.png" class="bg" />
3
+  <image src="../../images/06011.gif" class="hand" />
4
+  <text class="text1">语文识字\n激活成功</text>
5
+  <text class="text2">最后一步\n点击右上角圆圈</text>
6
+  <text class="text3">关闭并返回购买记录查看结果</text>
7
+  <view class="line"></view>
8
+  <text class="text4">注意:激活后请关闭本小程序,尽快返回之前的购买记录,刷新检查激活结果。如还有其它产品待激活,请以相同步骤逐个进行操作。</text>
9
+</view>

+ 59 - 0
pages/index/activate.wxss

@@ -0,0 +1,59 @@
1
+.container {
2
+  background-color: #F5E2BE;
3
+  justify-content: flex-start;
4
+  color: #1e1e1e;
5
+}
6
+
7
+.bg{
8
+  width:100%;
9
+  height:820rpx;
10
+  position: fixed;
11
+  bottom: 0;
12
+}
13
+.hand{
14
+  width:60rpx;
15
+  height:100rpx;
16
+  position: fixed;
17
+  right: 20rpx;
18
+  top:0rpx;
19
+}
20
+
21
+.text1{
22
+  margin-top: 125rpx;
23
+  font-size:36rpx;
24
+  width:217rpx;
25
+  text-align: center;
26
+  z-index: 10;
27
+}
28
+
29
+.text2{
30
+  margin-top: 100rpx;
31
+  font-size:44rpx;
32
+  width:308rpx;
33
+  text-align: center;
34
+
35
+  z-index: 10;
36
+}
37
+.text3{
38
+  font-size:36rpx;
39
+  text-align: center;
40
+  color:#7D2B25;
41
+
42
+  z-index: 10;
43
+}
44
+
45
+.line{
46
+  margin-top: 440rpx;
47
+  width:600rpx;
48
+  height:3rpx;
49
+  background-color: #593613;
50
+  z-index: 10;
51
+}
52
+
53
+.text4{
54
+  margin-top: 40rpx;
55
+  font-size:22rpx;
56
+  width:560rpx;
57
+  text-align: left;
58
+  z-index: 10;
59
+}

+ 23 - 3
pages/index/index.js

@@ -32,6 +32,15 @@ Page({
32 32
         console.log("introducer:" + introducer);
33 33
         app.globalData.introducer = scene;
34 34
       }
35
+
36
+      if (options.ProductID) {
37
+        this.setData({
38
+          ProductID: options.ProductID,
39
+          ProductUserID: options.ProductUserID,
40
+          BuyType: options.BuyType,
41
+          ProductBuyInfoID: options.ProductBuyInfoID,
42
+        });
43
+      }
35 44
     }
36 45
     this.setData({
37 46
       Height: common.getSystemHeight(),
@@ -134,15 +143,26 @@ Page({
134 143
         }
135 144
         else {
136 145
           app.globalData.userInfo = data;
137
-          //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
138 146
           
139
-          that.getHanzi(function(){
147
+          if (that.data.ProductID) {
148
+            var url = "../index/activate?ProductID=" + that.data.ProductID
149
+              + "&ProductUserID=" + that.data.ProductUserID
150
+              + "&CurrentUserID=" + app.globalData.userInfo.UserID
151
+              + "&CurrentProductID=" + app.globalData.ProgramID
152
+              + "&ProductBuyInfoID=" + that.data.ProductBuyInfoID
153
+              + "&BuyType=" + that.data.BuyType;
154
+            wx.redirectTo({
155
+              url: url
156
+            });
157
+          }
158
+          else {
159
+            //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
140 160
             setTimeout(function () {
141 161
               wx.redirectTo({
142 162
                 url: '../main/index'
143 163
               })
144 164
             }, 2000);
145
-          });
165
+          }
146 166
         }
147 167
       });
148 168
 

+ 4 - 0
pages/main/detail.js

@@ -119,6 +119,10 @@ Page({
119 119
       });
120 120
       wx.setStorageSync('IsHelpPosition1', 2);
121 121
     }
122
+
123
+    if (app.globalData.userInfo.NickName == "陌生用户")
124
+      wx.setStorageSync('IsRemindAccredit', 1);
125
+
122 126
   },
123 127
   submitData: function (content) {
124 128
     if (app.globalData.userInfo && app.globalData.userInfo.UserID) {

+ 4 - 4
pages/main/detail.wxml

@@ -1,7 +1,7 @@
1 1
 <view class="container FlexColumn" style='height:{{Height}}rpx;'>
2 2
   <view class="main FlexColumn" bindtap='playAudio' data-click="true">
3 3
     <block wx:if="{{CurrentIndex<List.length-1}}">
4
-      <view class="pinyin" animation="{{animationDataWord}}">
4
+      <view class="pinyin">
5 5
         <block wx:if="{{ShowPinyin}}">
6 6
           {{List[CurrentIndex].Pinyin}}
7 7
         </block>
@@ -284,12 +284,12 @@
284 284
       </view>
285 285
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="false">
286 286
         <view class="word">课本一致</view>
287
-        <image class="SelectLogo" src="../../images/012.png" hidden="{{SelectedRandom}}" />
287
+        <image class="SelectLogo" src="../../images/SelectYes.png" hidden="{{SelectedRandom}}" />
288 288
       </view>
289 289
       <view style='height:2rpx'></view>
290 290
       <view class="settingMenuBasic FlexColumn" bindtap='settingSort' data-id="true">
291 291
         <view class="word">随机</view>
292
-        <image class="SelectLogo" src="../../images/012.png" hidden="{{!SelectedRandom}}" />
292
+        <image class="SelectLogo" src="../../images/SelectYes.png" hidden="{{!SelectedRandom}}" />
293 293
       </view>
294 294
     </block>
295 295
 
@@ -302,7 +302,7 @@
302 302
         <view style='height:2rpx'></view>
303 303
         <view class="settingMenuBasic FlexColumn" bindtap='settingSpeaker' data-id="{{index}}">
304 304
           <view class="word">{{item.name}}</view>
305
-          <image class="SelectLogo" src="../../images/012.png" hidden="{{!item.isShow}}" />
305
+          <image class="SelectLogo" src="../../images/SelectYes.png" hidden="{{!item.isShow}}" />
306 306
         </view>
307 307
       </block>
308 308
     </block>

+ 1 - 1
pages/main/detail.wxss

@@ -73,7 +73,7 @@
73 73
   font-family: 'GB Pinyinok-C';
74 74
   font-weight: normal;
75 75
   font-style: normal;
76
-  height:88rpx;
76
+  height:110rpx;
77 77
 }
78 78
 
79 79
 .main .wordImage{

+ 49 - 9
pages/main/index.js

@@ -32,15 +32,21 @@ Page({
32 32
       AvatarUrl: app.globalData.userInfo.AvatarUrl,
33 33
     });
34 34
 
35
-    if (app.globalData.userInfo && app.globalData.userInfo.NickName != "陌生用户") {
36
-      this.setData({
37
-        IsAccredit: true,
38
-      });
39
-    }
35
+    var that = this;
36
+    wx.getSetting({
37
+      success(res) {
38
+        if (res.authSetting['scope.userInfo']) {
39
+          that.setData({
40
+            IsAccredit: true,
41
+          });
42
+        }
43
+      }
44
+    })
40 45
 
41 46
     common.getStorageValue(this, "IsRemind", true, function () { });
42 47
 
43 48
     this.updateProgram();
49
+
44 50
   },
45 51
   onShow: function () {
46 52
     this.getData();
@@ -52,6 +58,18 @@ Page({
52 58
         wx.removeStorageSync('IsRemindAccredit');
53 59
       }
54 60
     }
61
+
62
+    if (wx.getStorageSync("indexNav")) {
63
+      var obj = {
64
+        currentTarget: {
65
+          dataset: {
66
+            id: 2,
67
+          }
68
+        }
69
+      }
70
+      this.selectNav(obj);
71
+      wx.removeStorageSync("indexNav");
72
+    }
55 73
   },
56 74
   getAccredit: function () {
57 75
     if (!this.data.IsAccredit) {
@@ -90,6 +108,7 @@ Page({
90 108
 
91 109
             app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
92 110
             app.globalData.userInfo.AvatarUrl = app.globalData.userInfo.avatarUrl;
111
+            
93 112
             // that.hasGetShareInfo(app.globalData.userInfo);
94 113
             that.setData({
95 114
               IsAccredit: true,
@@ -101,7 +120,6 @@ Page({
101 120
             app.globalData.userInfo.iv = res.iv;
102 121
             app.globalData.userInfo.encryptedData = res.encryptedData;
103 122
             that.login(app.globalData.userInfo);
104
-
105 123
           },
106 124
           fail: function (res) {
107 125
             //console.log("getUserInfo:fail");
@@ -143,8 +161,8 @@ Page({
143 161
         UserSource: app.globalData.userSource,
144 162
         SourceID: app.globalData.SourceID,
145 163
         LastUserSource: app.globalData.userSource,
164
+        iv:param.iv,
146 165
         encryptedData: param.encryptedData,
147
-        iv: param.iv,
148 166
       }, function (data) {
149 167
 
150 168
       });
@@ -293,10 +311,27 @@ Page({
293 311
     });
294 312
   },
295 313
   gotoPayList: function () {
314
+
315
+    if (this.data.IsMember == 0 && !this.data.IsFirstDay && this.data.NewUserNumber >= this.data.NewUserNumberMax){
316
+      this.setData({
317
+        IsMemberForeverRemind: 0,
318
+      });
319
+      wx.pageScrollTo({
320
+        scrollTop: 1380,
321
+      });
322
+    }
323
+    else{
324
+      this.gotoMemberCenter();
325
+    }
326
+  },
327
+  gotoMemberCenter: function () {
296 328
     wx.navigateTo({
297
-      url: '../about/paylist',
329
+      url: '../about/membercenter',
298 330
     });
299 331
   },
332
+  gotoFeedback: function () {
333
+    server.gotoFeedback();
334
+  },
300 335
   close: function () {
301 336
     this.setData({
302 337
       IsMemberForeverRemind: 2,
@@ -307,7 +342,7 @@ Page({
307 342
       isPaying = true;
308 343
       var that = this;
309 344
       var money = app.globalData.PayMoney;
310
-      server.payMoney(3, money, function () {
345
+      server.payMoney(3, money,null, function () {
311 346
         wx.navigateTo({
312 347
           url: '../about/payfinished',
313 348
         });
@@ -317,6 +352,11 @@ Page({
317 352
       }, 10000);
318 353
     }
319 354
   },
355
+  gotoAllPay: function (e) {
356
+    wx.navigateTo({
357
+      url: '../about/orderlist',
358
+    });
359
+  },
320 360
   switchProgram: function (e) {
321 361
     wx.navigateToMiniProgram({
322 362
       appId: e.currentTarget.dataset.appid,

+ 19 - 9
pages/main/index.wxml

@@ -65,8 +65,10 @@
65 65
     </view>
66 66
 
67 67
     <view class="index3 FlexColumn">
68
-      <image src='{{AvatarUrl}}' class="Avatar" bindtap="gotoPayList">
69
-        <view class="gear FlexRow"><image src='../../images/02022.png' class="img" /></view>
68
+      <image src='{{AvatarUrl}}' class="Avatar" bindtap="gotoMemberCenter">
69
+        <view class="gear FlexRow">
70
+          <image src='../../images/02022.png' class="img" />
71
+        </view>
70 72
       </image>
71 73
       <view class="NickName">{{NickName}}</view>
72 74
       <view class="Member2 Member" wx:if="{{IsMember==0}}">非会员</view>
@@ -135,6 +137,9 @@
135 137
       <image src='../../images/02028.png' class="img02028 img02025" wx:if="{{IsMember==1 && !IsFirstDay && NewUserNumber<NewUserNumberMax}}">
136 138
         <view class="getNewUser2 getNewUser" bindtap='gotoNewUser'></view>
137 139
       </image>
140
+      <view class="line"></view>
141
+      <view class="text">其它优惠</view>
142
+      <image src='../../images/02029.png' class="img02029" bindtap='selectNav' data-id="2"></image>
138 143
 
139 144
       <view class="index10 index9 FlexRow">
140 145
         <image src='../../images/02016.png' class="imgWave" />
@@ -150,15 +155,22 @@
150 155
     <view class="index6 FlexColumn">
151 156
       <image src='../../images/{{item.ImageUrl}}' class="btn2" wx:for="{{ListProgram}}" wx:key="index" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}' />
152 157
     </view>
158
+    <view class="bottom FlexColumn" bindtap='gotoAllPay'>
159
+      <view class="bottom1 FlexRow">
160
+        <view class="left FlexColumn">
161
+          <view class="text">成套购买更划算</view>
162
+            <image src='../../images/02030.png' class="img02030" />
163
+        </view>
164
+        <view class="right">下单</view>
165
+      </view>
166
+    </view>
153 167
   </block>
154 168
   <view class="index5 FlexColumn">
155 169
 
156 170
     <view class="FooterDescription_1">©2014-2018 语文识字 - 小学生素质练习系列产品</view>
157 171
     <view class="FooterDescription_2" bindtap='updateMember'>微信小程序 版本 {{Version}} </view>
158 172
     <view class="index5_1 FlexRow">
159
-      <button class="feedback" open-type="contact">
160
-        <view class="index5_1_1">意见反馈</view>
161
-      </button>
173
+      <view class="feedback" bindtap='gotoFeedback'>意见反馈</view>
162 174
       <view class="line"></view>
163 175
       <view class="feedback1 feedback" bindtap='gotoAbout' data-id='Cooperation'>关联您的公众号</view>
164 176
       <view class="line"></view>
@@ -168,9 +180,8 @@
168 180
     </view>
169 181
     <view class="index5_3 FlexRow">
170 182
       <image src='../../images/{{item.ImageUrl2}}' class="btn" wx:for="{{ListProgram}}" wx:key="index" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}' />
171
-
172 183
     </view>
173
-
184
+    <view style='height:360rpx;' wx:if="{{NavClass1=='nav2'}}"></view>
174 185
   </view>
175 186
 
176 187
 </view>
@@ -184,12 +195,11 @@
184 195
         <view class="text2">已获得永久有效期</view>
185 196
       </view>
186 197
       <view class="panel2 FlexColumn">
187
-        查看记录
198
+        知道了
188 199
       </view>
189 200
     </view>
190 201
   </view>
191 202
   <view class="close FlexColumn" catchtap='close'>
192 203
     <image src='../../images/02024.png' class="closeImage" />
193 204
   </view>
194
-
195 205
 </view>

+ 55 - 1
pages/main/index.wxss

@@ -178,7 +178,7 @@
178 178
   right:0;
179 179
   border-bottom-left-radius: 10rpx;
180 180
   border-top-right-radius: 10rpx;
181
-  background-color: #593613;
181
+  background-color: #fff;
182 182
 }
183 183
 .index3 .Avatar .img{
184 184
   width:24rpx;
@@ -414,6 +414,7 @@
414 414
 
415 415
 .payInfo{
416 416
   width:100%;
417
+  background-color: #fff;
417 418
 }
418 419
 .payInfo .img02025{
419 420
   width:100%;
@@ -451,6 +452,24 @@
451 452
   top:370rpx;
452 453
 }
453 454
 
455
+.payInfo .line{
456
+  width:600rpx;
457
+  height:3rpx;
458
+  background-color: #F0F0F0;
459
+}
460
+
461
+.payInfo .text{
462
+  font-size:28rpx;
463
+  margin-top: 30rpx;
464
+  
465
+}
466
+
467
+.payInfo .img02029{
468
+  width:600rpx;
469
+  height:314rpx;
470
+  margin: 30rpx 0 80rpx;
471
+}
472
+
454 473
 .IsMemberForever{
455 474
   z-index: 100;
456 475
   position: fixed;
@@ -515,3 +534,38 @@
515 534
   height: 33rpx;
516 535
 }
517 536
 
537
+.container .bottom{
538
+  width:100%;
539
+  height:133rpx;
540
+  position: fixed;
541
+  bottom:0;
542
+  background-color: #7D2B25;
543
+  justify-content: flex-end;
544
+  z-index: 100;
545
+}
546
+.bottom .bottom1{
547
+  width:100%;
548
+  height:123rpx;
549
+  background-color: #B3443B;
550
+  text-align: center;
551
+  font-size: 48rpx;
552
+  color: #fff;
553
+  justify-content: space-between;
554
+}
555
+
556
+
557
+.bottom .left{
558
+  margin-left: 50rpx;
559
+  font-size: 22rpx;
560
+  color: #F5E2BE;
561
+  align-items: flex-start;
562
+}
563
+.bottom .img02030{
564
+  width:243rpx;
565
+  height:42rpx;
566
+  margin-top: 6rpx;
567
+}
568
+.bottom .right{
569
+  margin-right: 70rpx;
570
+}
571
+

+ 7 - 1
pages/main/list.js

@@ -167,7 +167,7 @@ Page({
167 167
       isPaying = true;
168 168
       var that = this;
169 169
       var money = app.globalData.PayMoney;
170
-      server.payMoney(3, money, function () {
170
+      server.payMoney(3, money,null, function () {
171 171
         wx.navigateTo({
172 172
           url: '../about/payfinished',
173 173
         });
@@ -187,6 +187,12 @@ Page({
187 187
       IsShowPayInfo: false,
188 188
     });
189 189
   },
190
+  gotoIndex:function(){
191
+    wx.setStorageSync("indexNav", 2);
192
+    wx.navigateBack({
193
+      delta: 1
194
+    });
195
+  },
190 196
   onShareAppMessage: function () {
191 197
     return {
192 198
       title: app.globalData.ShareTitle,

+ 9 - 9
pages/main/list.wxml

@@ -18,10 +18,7 @@
18 18
     <view class="line2 line">
19 19
     </view>
20 20
     <view class="list2 FlexColumn">
21
-      <view class="btn" bindtap="goto" 
22
-      data-bookid='{{BookID}}' data-islocked='{{item.IsLocked}}' data-word='true'
23
-      data-unitid='{{item.ID}}' data-isfinished='{{item.IsFinished}}' 
24
-      wx:for="{{List}}" wx:key="index">
21
+      <view class="btn" bindtap="goto" data-bookid='{{BookID}}' data-islocked='{{item.IsLocked}}' data-word='true' data-unitid='{{item.ID}}' data-isfinished='{{item.IsFinished}}' wx:for="{{List}}" wx:key="index">
25 22
         <view class="btn1 FlexRow">
26 23
           <view class="left FlexRow">
27 24
             <image wx:if="{{IsShow==1 && item.IsLocked==0 && !item.IsFinished}}" src='../../images/04007.png' class="img04007" />
@@ -56,11 +53,8 @@
56 53
         <view class="title1">{{item.Name}}</view>
57 54
       </view>
58 55
       <view class="table FlexRow">
59
-        <view class="{{itemChild.ReviewCss}} box" wx:for="{{item.Words}}" wx:key="i" wx:for-item="itemChild" wx:for-index="i" 
60
-        bindtap="goto" data-islocked='{{item.IsLocked}}' 
61
-        data-bookid='{{BookID}}' data-unitid='{{item.ID}}' 
62
-        data-wordid='{{i}}' data-word='{{itemChild.Name}}' data-isfinished='{{item.IsFinished}}'
63
-        >{{itemChild.Name}}</view>
56
+        <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-word='{{itemChild.Name}}'
57
+          data-isfinished='{{item.IsFinished}}'>{{itemChild.Name}}</view>
64 58
       </view>
65 59
     </view>
66 60
 
@@ -81,6 +75,12 @@
81 75
       </view>
82 76
     </view>
83 77
   </view>
78
+  <view class="text1">一款原价,成套购买更划算</view>
79
+  <view class="text2 FlexRow" catchtap='gotoIndex'>
80
+    <image src='../../images/06010.png' class="Triangle" />
81
+    <view class="text3">产品详情</view>
82
+  </view>
83
+
84 84
   <view class="close FlexColumn" catchtap='close'>
85 85
     <image src='../../images/02024.png' class="closeImage" />
86 86
   </view>

+ 13 - 2
pages/main/list.wxss

@@ -201,7 +201,7 @@
201 201
   height: 420rpx;
202 202
   background-color: #F19805;
203 203
   border-radius: 40rpx;
204
-  margin-top: 352rpx;
204
+  margin-top: 282rpx;
205 205
   box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
206 206
 }
207 207
 .PayInfo .btn1 {
@@ -230,6 +230,15 @@
230 230
   font-size:48rpx;
231 231
 }
232 232
 
233
+.PayInfo .text1{
234
+  margin-top: 126rpx;
235
+  font-size:32rpx;
236
+}
237
+.PayInfo .text2{
238
+  margin-top: 20rpx;
239
+  font-size:36rpx;
240
+  color:#A20602;
241
+}
233 242
 .PayInfo .Triangle{
234 243
   width: 16rpx;
235 244
   height:22rpx;
@@ -237,13 +246,15 @@
237 246
 }
238 247
 .PayInfo .close {
239 248
   width: 100%;
240
-  height: 235rpx;
249
+  height: 155rpx;
241 250
   position: fixed;
242 251
   bottom: 0;
252
+  justify-content: flex-start;
243 253
 }
244 254
 
245 255
 .PayInfo .closeImage {
246 256
   width: 33rpx;
247 257
   height: 33rpx;
258
+  margin-top: 30rpx;
248 259
 }
249 260
 

+ 24 - 6
project.config.json

@@ -57,16 +57,34 @@
57 57
 					"query": ""
58 58
 				},
59 59
 				{
60
-					"id": -1,
61
-					"name": "\b关于",
62
-					"pathName": "pages/about/about",
60
+					"id": 4,
61
+					"name": "\b订单",
62
+					"pathName": "pages/about/orderlist",
63 63
 					"query": ""
64 64
 				},
65 65
 				{
66 66
 					"id": 5,
67
-					"name": "\b首选词语",
68
-					"pathName": "pages/main/setcombine",
69
-					"query": "id=1"
67
+					"name": "\b支付完成",
68
+					"pathName": "pages/about/payfinished",
69
+					"query": "type=all"
70
+				},
71
+				{
72
+					"id": -1,
73
+					"name": "会员中心",
74
+					"pathName": "pages/about/membercenter",
75
+					"query": ""
76
+				},
77
+				{
78
+					"id": -1,
79
+					"name": "购买列表",
80
+					"pathName": "pages/about/paylist",
81
+					"query": ""
82
+				},
83
+				{
84
+					"id": 8,
85
+					"name": "\b激活",
86
+					"pathName": "pages/index/index",
87
+					"query": "SourceID=106&ProductBuyInfoID=3306&ProductID=106&ProductUserID=1&BuyType=109"
70 88
 				}
71 89
 			]
72 90
 		}

+ 20 - 3
utils/main.js

@@ -65,7 +65,7 @@ function getLocalHost(callback) {
65 65
   }
66 66
 }
67 67
 
68
-function payMoney(payType, money, callback) {
68
+function payMoney(payType, money, detail, callback) {
69 69
   console.log(money);
70 70
   if (app.globalData.userInfo.UserID == 1)
71 71
     money = 0.01;
@@ -75,7 +75,7 @@ function payMoney(payType, money, callback) {
75 75
       if (res.code) {
76 76
         console.log('获取用户登录态成功!' + res.code);
77 77
         //预支付
78
-        getData('HanziPayLogin?code=' + res.code + '&payType=' + payType + '&money=' + money, function (data) {
78
+        getData('HanziPayLogin?code=' + res.code + '&payType=' + payType + '&money=' + money + '&detail=' + detail, function (data) {
79 79
           if (data && data.timeStamp) {
80 80
             //微信支付
81 81
             wx.requestPayment({
@@ -88,7 +88,7 @@ function payMoney(payType, money, callback) {
88 88
                 app.globalData.userInfo.IsMember = 1;
89 89
                 app.globalData.userInfo.IsPay = 1;
90 90
                 console.log("success:" + res3);
91
-                callback();
91
+                callback(data);
92 92
               },
93 93
               'fail': function (err) {
94 94
                 if (err && err.errMsg && err.errMsg.indexOf("fail cancel")) {
@@ -119,6 +119,7 @@ function payMoney(payType, money, callback) {
119 119
 function getProgramList(){
120 120
   return [
121 121
     {
122
+      ID:89,
122 123
       ImageUrl: "03001.png",
123 124
       ImageUrl2: "02018.png",
124 125
       appId: 'wx46a7b4c420e6d38f',
@@ -127,6 +128,7 @@ function getProgramList(){
127 128
       top: 837,
128 129
     },
129 130
     {
131
+      ID: 99,
130 132
       ImageUrl: "03002.png",
131 133
       ImageUrl2: "02020.png",
132 134
       appId: 'wxb54a6d5aff836ee3',
@@ -135,6 +137,7 @@ function getProgramList(){
135 137
       top: 1181,
136 138
     },
137 139
     {
140
+      ID: 98,
138 141
       ImageUrl: "03003.png",
139 142
       ImageUrl2: "02019.png",
140 143
       appId: 'wx331e8dd070f01d0e',
@@ -143,6 +146,7 @@ function getProgramList(){
143 146
       top: 837,
144 147
     },
145 148
     {
149
+      ID: 90,
146 150
       ImageUrl: "03004.png",
147 151
       ImageUrl2: "02021.png",
148 152
       appId: 'wxa5e33c61fe37dd01',
@@ -153,10 +157,23 @@ function getProgramList(){
153 157
   ];
154 158
 }
155 159
 
160
+function gotoFeedback(){
161
+  wx.navigateToMiniProgram({
162
+    appId: "wx80059777521b897c",
163
+    path: "pages/index/feedback",
164
+    extraData: {
165
+    },
166
+    success(res) {
167
+      // 打开成功
168
+    }
169
+  });
170
+}
171
+
156 172
 module.exports = {
157 173
   getData: getData,
158 174
   postData: postData,
159 175
   payMoney: payMoney,
160 176
   getLocalHost: getLocalHost,
161 177
   getProgramList: getProgramList,
178
+  gotoFeedback: gotoFeedback,
162 179
 }