chengjie 6 years ago
parent
commit
170549d6fd
100 changed files with 2930 additions and 20 deletions
  1. 4 1
      app.js
  2. 32 7
      app.json
  3. 47 5
      app.wxss
  4. BIN
      images/02018.png
  5. BIN
      images/02019.png
  6. BIN
      images/02020.png
  7. BIN
      images/02021.png
  8. BIN
      images/02025.png
  9. BIN
      images/02026.png
  10. BIN
      images/02028.png
  11. BIN
      images/02029.png
  12. BIN
      images/02030.png
  13. BIN
      images/02033.png
  14. BIN
      images/02034.png
  15. BIN
      images/03001.png
  16. BIN
      images/04010.png
  17. BIN
      images/06006.png
  18. BIN
      images/06007.png
  19. BIN
      images/06008.png
  20. BIN
      images/06009.png
  21. BIN
      images/ad1.png
  22. BIN
      images/ad2.png
  23. BIN
      package4/images/file_0101.png
  24. BIN
      package4/images/file_0201.png
  25. BIN
      package4/images/file_0301.png
  26. BIN
      package4/images/file_0302.png
  27. BIN
      package4/images/file_0303.png
  28. BIN
      package4/images/file_0401.png
  29. BIN
      package4/images/pay_shelf_banner_750x200.png
  30. BIN
      package4/images/pay_shoppingguide_footer.png
  31. BIN
      package4/images/pay_shoppingguide_illus_01.png
  32. BIN
      package4/images/pay_shoppingguide_illus_02.png
  33. BIN
      package4/images/product_icon_gift_50x50.png
  34. BIN
      package4/images/product_icon_group_50x50.png
  35. BIN
      package4/images/product_icon_jst_70x70.png
  36. BIN
      package4/images/product_icon_kslx_70x70.png
  37. BIN
      package4/images/product_icon_ksxq_70x70.png
  38. BIN
      package4/images/product_icon_pd_70x70.png
  39. BIN
      package4/images/product_icon_py_70x70.png
  40. BIN
      package4/images/product_icon_sz_70x70.png
  41. BIN
      package4/images/program_activated_clickclose.png
  42. BIN
      package4/images/program_giftcard_footer.png
  43. BIN
      package4/images/program_giftcard_illus_01.png
  44. BIN
      package4/images/program_giftcard_illus_02.png
  45. BIN
      package4/images/program_screenshot_giftcard.png
  46. BIN
      package4/images/universalpic_attention_gray_50x50.png
  47. BIN
      package4/images/universalpic_face_default_blue_120x120.png
  48. BIN
      package4/images/universalpic_indicator_down_gray.png
  49. BIN
      package4/images/universalpic_indicator_right_gray.png
  50. BIN
      package4/images/universalpic_indicator_right_white.png
  51. BIN
      package4/images/universalpic_select_on_green_100x100.png
  52. 133 0
      package4/main/activate.js
  53. 6 0
      package4/main/activate.json
  54. 34 0
      package4/main/activate.wxml
  55. 73 0
      package4/main/activate.wxss
  56. 35 0
      package4/main/activateFinish.js
  57. 6 0
      package4/main/activateFinish.json
  58. 28 0
      package4/main/activateFinish.wxml
  59. 56 0
      package4/main/activateFinish.wxss
  60. 12 7
      pages/index/activate.js
  61. 5 0
      package4/main/activateOK.json
  62. 14 0
      package4/main/activateOK.wxml
  63. 39 0
      package4/main/activateOK.wxss
  64. 54 0
      package4/main/buyad.js
  65. 6 0
      package4/main/buyad.json
  66. 20 0
      package4/main/buyad.wxml
  67. 85 0
      package4/main/buyad.wxss
  68. 41 0
      package4/main/coupon.js
  69. 6 0
      package4/main/coupon.json
  70. 44 0
      package4/main/coupon.wxml
  71. 71 0
      package4/main/coupon.wxss
  72. 201 0
      package4/main/giftcard.js
  73. 6 0
      package4/main/giftcard.json
  74. 45 0
      package4/main/giftcard.wxml
  75. 208 0
      package4/main/giftcard.wxss
  76. 73 0
      package4/main/giftinfo.js
  77. 6 0
      package4/main/giftinfo.json
  78. 62 0
      package4/main/giftinfo.wxml
  79. 119 0
      package4/main/giftinfo.wxss
  80. 45 0
      package4/main/giftlist.js
  81. 6 0
      package4/main/giftlist.json
  82. 23 0
      package4/main/giftlist.wxml
  83. 72 0
      package4/main/giftlist.wxss
  84. 44 0
      package4/main/limited.js
  85. 6 0
      package4/main/limited.json
  86. 25 0
      package4/main/limited.wxml
  87. 75 0
      package4/main/limited.wxss
  88. 81 0
      package4/main/list.js
  89. 6 0
      package4/main/list.json
  90. 197 0
      package4/main/list.wxml
  91. 142 0
      package4/main/list.wxss
  92. 149 0
      package4/main/order.js
  93. 6 0
      package4/main/order.json
  94. 102 0
      package4/main/order.wxml
  95. 239 0
      package4/main/order.wxss
  96. 62 0
      package4/main/payfinish.js
  97. 6 0
      package4/main/payfinish.json
  98. 22 0
      package4/main/payfinish.wxml
  99. 51 0
      package4/main/payfinish.wxss
  100. 0 0
      package4/main/paylist.js

+ 4 - 1
app.js

@@ -11,11 +11,13 @@ App({
11 11
     this.globalData.systemInfo = wx.getSystemInfoSync();
12 12
   },
13 13
   globalData: {
14
-    Version: "1.1.15",
14
+    Version: "1.1.16",
15 15
     IsProduction: true,
16 16
     ProgramID: 106,
17 17
     AppID: "wx313a8f2c0741efe1",
18
+    ProgramName: "语文识字",
18 19
     ShareTitle:"赢在阅读起跑线",
20
+    ShareImage: "../images/07001.png",
19 21
     userInfo: null,
20 22
     fileUrl: "https://www.kylx365.com/",
21 23
     serverUrl: "https://www.kylx365.com/apiData/",
@@ -33,6 +35,7 @@ App({
33 35
     PayMoney: 19.8,//产品销售价
34 36
     BaiduToken:"",//百度开发平台token
35 37
     IsShow: 0,
38
+    IsLocked: 0,
36 39
     NewUserNumberMax:6,//邀请新用户最大值
37 40
     IsSaveCustom:false,//是否保存了定制
38 41
     goto:"",//用于服务直达的跳转

+ 32 - 7
app.json

@@ -1,18 +1,14 @@
1 1
 {
2 2
   "pages": [
3 3
     "pages/index/index",
4
-    "pages/index/activate",
5 4
     "pages/main/list",
6 5
     "pages/main/detail",
7 6
     "pages/main/search",
8 7
     "pages/main/setcombine",
9 8
     "pages/main/review",
10 9
     "pages/main/test",
11
-    "pages/about/payfinished",
12
-    "pages/about/paylist",
13
-    "pages/about/newuserlist",
14
-    "pages/about/orderlist",
15
-    "pages/about/membercenter",
10
+    "pages/main/userinfo",
11
+    "pages/main/accredit",
16 12
     "pages/main/index"
17 13
   ],
18 14
   "window": {
@@ -23,6 +19,7 @@
23 19
     "backgroundColor": "#F5E2BE"   
24 20
   },
25 21
   "navigateToMiniProgramAppIdList": [
22
+    "wxa5441bbf344692ba",
26 23
     "wx46a7b4c420e6d38f",
27 24
     "wx1fef080f74481cbd",
28 25
     "wx331e8dd070f01d0e",
@@ -31,5 +28,33 @@
31 28
     "wxa5e33c61fe37dd01",
32 29
     "wxaa1a8b48d9853872",
33 30
     "wx80059777521b897c"
34
-  ]
31
+  ],
32
+  "subPackages": [
33
+    {
34
+      "root": "package4",
35
+      "pages": [
36
+        "main/buyad",
37
+        "main/order",
38
+        "main/paylist",
39
+        "main/payfinish",
40
+        "main/activate",
41
+        "main/activateOK",
42
+        "main/activateFinish",
43
+        "main/giftcard",
44
+        "main/giftlist",
45
+        "main/giftinfo",
46
+        "main/coupon",
47
+        "main/limited",
48
+        "main/list"
49
+      ]
50
+    }
51
+  ],
52
+  "preloadRule": {
53
+    "package4/main/buyad": {
54
+      "network": "all",
55
+      "packages": [
56
+        "package4"
57
+      ]
58
+    }
59
+  }
35 60
 }

+ 47 - 5
app.wxss

@@ -1,9 +1,4 @@
1 1
 /**app.wxss**/
2
-.container {
3
-  width:100%;
4
-  justify-content: flex-start;
5
-} 
6
-
7 2
 ::-webkit-scrollbar {
8 3
   width: 0;
9 4
   height: 0;
@@ -25,6 +20,53 @@
25 20
   justify-content: center;
26 21
 }
27 22
 
23
+.container {
24
+  width:100%;
25
+  justify-content: flex-start;
26
+  background-color: #F5E2BE;
27
+  color:#1e1e1e;
28
+  font-weight: 500;
29
+} 
30
+
31
+.lineFooter{
32
+  width: 100%;
33
+  height: 2rpx;
34
+  background-color: #E3E3E3; 
35
+}
36
+
37
+
38
+.lineWidthAll{
39
+  width: 100%;
40
+  justify-content: flex-end;
41
+  background-color: #fff;
42
+  height: 2rpx;
43
+}
44
+
45
+.lineWidth750{
46
+  width: 100%;
47
+  height: 2rpx;
48
+  background-color: #E3E3E3; 
49
+}
50
+
51
+.lineWidth720{
52
+  width: 720rpx;
53
+  height: 2rpx;
54
+  background-color: #E3E3E3; 
55
+}
56
+
57
+.lineWidth650{
58
+  width: 650rpx;
59
+  height: 2rpx;
60
+  background-color: #E3E3E3; 
61
+}
62
+
63
+.lineWidth620{
64
+  width: 620rpx;
65
+  height: 2rpx;
66
+  background-color: #E3E3E3; 
67
+}
68
+
69
+
28 70
 @font-face {
29 71
     font-family: 'GB Pinyinok-C';
30 72
     //src: url('GBPinyinok-C.eot');

BIN
images/02018.png


BIN
images/02019.png


BIN
images/02020.png


BIN
images/02021.png


BIN
images/02025.png


BIN
images/02026.png


BIN
images/02028.png


BIN
images/02029.png


BIN
images/02030.png


BIN
images/02033.png


BIN
images/02034.png


BIN
images/03001.png


BIN
images/04010.png


BIN
images/06006.png


BIN
images/06007.png


BIN
images/06008.png


BIN
images/06009.png


BIN
images/ad1.png


BIN
images/ad2.png


BIN
package4/images/file_0101.png


BIN
package4/images/file_0201.png


BIN
package4/images/file_0301.png


BIN
package4/images/file_0302.png


BIN
package4/images/file_0303.png


BIN
package4/images/file_0401.png


BIN
package4/images/pay_shelf_banner_750x200.png


BIN
package4/images/pay_shoppingguide_footer.png


BIN
package4/images/pay_shoppingguide_illus_01.png


BIN
package4/images/pay_shoppingguide_illus_02.png


BIN
package4/images/product_icon_gift_50x50.png


BIN
package4/images/product_icon_group_50x50.png


BIN
package4/images/product_icon_jst_70x70.png


BIN
package4/images/product_icon_kslx_70x70.png


BIN
package4/images/product_icon_ksxq_70x70.png


BIN
package4/images/product_icon_pd_70x70.png


BIN
package4/images/product_icon_py_70x70.png


BIN
package4/images/product_icon_sz_70x70.png


BIN
package4/images/program_activated_clickclose.png


BIN
package4/images/program_giftcard_footer.png


BIN
package4/images/program_giftcard_illus_01.png


BIN
package4/images/program_giftcard_illus_02.png


BIN
package4/images/program_screenshot_giftcard.png


BIN
package4/images/universalpic_attention_gray_50x50.png


BIN
package4/images/universalpic_face_default_blue_120x120.png


BIN
package4/images/universalpic_indicator_down_gray.png


BIN
package4/images/universalpic_indicator_right_gray.png


BIN
package4/images/universalpic_indicator_right_white.png


BIN
package4/images/universalpic_select_on_green_100x100.png


+ 133 - 0
package4/main/activate.js

@@ -0,0 +1,133 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+var productList=[];
6
+
7
+Page({
8
+  data: {
9
+  },
10
+  onLoad: function (options) {
11
+
12
+    this.setData({
13
+      Containnerheight: common.getSystemHeight(),
14
+      ProgramList: server.getProgramList(),
15
+    });
16
+
17
+    this.init();
18
+  },
19
+  init: function (e, isRemind) {
20
+    var that = this;
21
+    wx.showLoading({
22
+      title: '装载中',
23
+    });
24
+    server.getData('GetUserActivateListByUserID500?UserID=' + app.globalData.userInfo.UserID + "&ProductID=" + app.globalData.ProgramID, function (data) {
25
+      if (data && data.length > 0) {
26
+        var programList = server.getProgramList();
27
+        for (var i = 0; i < programList.length; i++) {
28
+          for (var j = 0; j < data.length; j++) {
29
+            if (programList[i].ID == data[j].ProductID) {
30
+              data[j].Name = programList[i].Name;
31
+              data[j].ImageUrl = programList[i].ImageUrl;
32
+              data[j].appId = programList[i].appId;
33
+              data[j].path = programList[i].path;
34
+            }
35
+          }
36
+        }
37
+
38
+        if (productList.length>0){
39
+          for(var i=0;i<productList.length;i++){
40
+            var b=false;
41
+            for(var j=0;j<data.length;j++){
42
+              if (productList[i].ProductID == data[j].ProductID){
43
+                b=true;
44
+                break;
45
+              }
46
+            }
47
+            if (!b){
48
+              productList[i].IsActivate=1;
49
+              data.push(productList[i]);
50
+            }
51
+          }
52
+        }
53
+
54
+        that.setData({
55
+          List: data,
56
+        });
57
+
58
+        productList=data;
59
+
60
+        wx.hideLoading();
61
+
62
+        if (isRemind) {
63
+          wx.showModal({
64
+            title: '产品未激活',
65
+            content: '您有产品未激活,请立即点击红色“去激活”按钮。',
66
+            showCancel: false,
67
+            confirmText: "知道了",
68
+          });
69
+        }
70
+
71
+        wx.setStorageSync("HasActivate", 1);
72
+      }
73
+      else {
74
+        wx.redirectTo({
75
+          url: "./activateFinish",
76
+        });
77
+        wx.removeStorageSync("HasActivate");
78
+      }
79
+    });
80
+  },
81
+  gotoFeedback: function () {
82
+    server.gotoFeedback();
83
+  },
84
+  gotoActive: function (e) {
85
+    var that = this;
86
+    var productid = e.currentTarget.dataset.id;
87
+
88
+    if (productid == app.globalData.ProgramID) {
89
+      server.getData('UpdateWXUsersAll500?ProductID=' + productid
90
+        + "&ProductUserID=" + app.globalData.userInfo.UserID
91
+        + "&CurrentProductID=" + productid
92
+        + "&CurrentUserID=" + app.globalData.userInfo.UserID, function (data) {
93
+          if (data) {
94
+
95
+          }
96
+        });
97
+    }
98
+    else {
99
+      var appId = e.currentTarget.dataset.appid;
100
+      var path = e.currentTarget.dataset.path;
101
+
102
+      path += "&ProductID=" + app.globalData.ProgramID;
103
+      path += "&ProductUserID=" + app.globalData.userInfo.UserID;
104
+
105
+      wx.navigateToMiniProgram({
106
+        appId: appId,
107
+        path: path,
108
+        success(res) {
109
+
110
+        }
111
+      });
112
+    }
113
+    var data = this.data.List;
114
+    for (var i = 0; i < data.length; i++) {
115
+      if (data[i].ProductID == productid) {
116
+        data[i].IsActivate = 0;
117
+      }
118
+    }
119
+    that.setData({
120
+      List: data,
121
+    });
122
+  },
123
+  gotoFinish: function () {
124
+    this.init(null, true);
125
+  },
126
+  onShareAppMessage: function () {
127
+    return {
128
+      title: app.globalData.ShareTitle,
129
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
130
+      imageUrl: app.globalData.ShareImage,
131
+    }
132
+  },
133
+})

+ 6 - 0
package4/main/activate.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "激活产品",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 34 - 0
package4/main/activate.wxml

@@ -0,0 +1,34 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class='text1 FlexColumn' bindtap='gotoFeedback'>
3
+    <view>您有产品未激活,必须激活才能继续其它操作,请立即处理。如</view>
4
+    <view class='FlexRow'>
5
+      <view>遇到问题请切换到“唱意教育家长助手”通过</view>
6
+      <view class='text11'>意见反馈</view>
7
+      <view>联系我们为</view>
8
+    </view>
9
+    <view>您处理。</view>
10
+  </view>
11
+
12
+  <view class="panelItem FlexRow" wx:for="{{List}}" wx:key="index">
13
+    <view class="Left FlexRow">
14
+      <image src='../images/{{item.ImageUrl}}' class="img" />
15
+      <view class="title1">
16
+        {{item.Name}}
17
+      </view>
18
+    </view>
19
+    <view class="Right">
20
+      <view class='btnActivate' wx:if="{{item.IsActivate==-1}}" bindtap="gotoActive" data-id="{{item.ProductID}}" data-appid="{{item.appId}}" data-path="{{item.path}}">去激活</view>
21
+      <view class='btnRefresh btnActivate' wx:if="{{item.IsActivate==0}}" bindtap="init">刷新</view>
22
+      <view class='text2' wx:if="{{item.IsActivate==1}}">已激活</view>
23
+    </view>
24
+  </view>
25
+  <view class='lineFooter'></view>
26
+
27
+  <image src='../images/file_0401.png' class="file_0401" />
28
+  <view class='lineFooter'></view>
29
+  <view style='height:240rpx'></view>
30
+
31
+  <view class='footer FlexRow' bindtap="gotoFinish">
32
+    完成
33
+  </view>
34
+</view>

+ 73 - 0
package4/main/activate.wxss

@@ -0,0 +1,73 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.text1{
8
+  width:690rpx;
9
+  font-size:24rpx;
10
+  align-items: flex-start;
11
+  margin: 50rpx 0;
12
+}
13
+
14
+.text11{
15
+  color:#B3443B;
16
+  text-decoration: underline;
17
+}
18
+
19
+.panelItem{
20
+  width:100%;
21
+  height:111rpx;
22
+  background-color: #fff;
23
+  justify-content: space-between;
24
+  margin-top: 1rpx;
25
+}
26
+
27
+.img{
28
+  width:50rpx;
29
+  height:50rpx;
30
+  border-radius: 10rpx;
31
+}
32
+
33
+.title1{
34
+  margin-left: 20rpx;
35
+  font-size:28rpx;
36
+}
37
+
38
+.btnActivate{
39
+  width:108rpx;
40
+  height:50rpx;
41
+  border-radius: 10rpx;
42
+  background-color: #E5321C;
43
+  color:#fff;
44
+  font-size:24rpx;
45
+  text-align: center;
46
+  line-height: 50rpx;
47
+}
48
+.btnRefresh{
49
+  background-color: #0792E4;
50
+}
51
+.text2{
52
+  color:#329468;
53
+  font-size:28rpx;
54
+}
55
+
56
+.file_0401{
57
+  width:100%;
58
+  height:1879rpx;
59
+  margin-top: 50rpx;
60
+}
61
+
62
+
63
+.footer{
64
+  width: 100%;
65
+  height: 140rpx;
66
+  position: fixed;
67
+  bottom: 0;
68
+  line-height: 140rpx;
69
+  font-size:48rpx;
70
+  color:#fff;
71
+  text-align: center;
72
+  background-color: #0792E4;
73
+}

+ 35 - 0
package4/main/activateFinish.js

@@ -0,0 +1,35 @@
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
+
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+      ProgramList: server.getProgramList(),
14
+      ProgramID:app.globalData.ProgramID,
15
+    });
16
+  },
17
+  switchProgram: function (e) {
18
+    wx.navigateToMiniProgram({
19
+      appId: e.currentTarget.dataset.appid,
20
+      path: e.currentTarget.dataset.path,
21
+      extraData: {
22
+      },
23
+      success(res) {
24
+        // 打开成功
25
+      }
26
+    });
27
+  },
28
+  onShareAppMessage: function () {
29
+    return {
30
+      title: app.globalData.ShareTitle,
31
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
32
+      imageUrl: app.globalData.ShareImage,
33
+    }
34
+  },
35
+})

+ 6 - 0
package4/main/activateFinish.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "激活完成",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 28 - 0
package4/main/activateFinish.wxml

@@ -0,0 +1,28 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+
3
+  <image src='../images/universalpic_select_on_green_100x100.png' class="universalpic_select_on_green_100x100" />
4
+
5
+  <view class='text1'>
6
+    可以正常使用了
7
+  </view>
8
+  <view class='text2'>
9
+    感谢您的配合
10
+  </view>
11
+  <view class='text3'>
12
+    请记住它们的图标和名称
13
+  </view>
14
+
15
+  <view class="panelItem FlexRow" wx:for="{{ProgramList}}" wx:key="index" wx:if="{{item.IsShow2}}" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>
16
+    <view class="Left FlexRow">
17
+      <image src='../images/{{item.ImageUrl}}' class="img" />
18
+      <view class="title1">
19
+        {{item.Name}}
20
+      </view>
21
+    </view>
22
+    <view class="Right">
23
+      <view class='btnRefresh' wx:if="{{ProgramID!=item.ID}}">去使用</view>
24
+    </view>
25
+  </view>
26
+<view class='lineFooter'></view>
27
+
28
+</view>

+ 56 - 0
package4/main/activateFinish.wxss

@@ -0,0 +1,56 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.universalpic_select_on_green_100x100 {
8
+  width: 100rpx;
9
+  height: 100rpx;
10
+  margin-top: 120rpx;
11
+}
12
+
13
+.text1{
14
+  font-size: 48rpx;
15
+  margin-top: 30rpx;
16
+}
17
+.text2{
18
+  font-size: 36rpx;
19
+  margin-top: 50rpx;
20
+  font-weight: 400;
21
+}
22
+.text3{
23
+  font-size: 24rpx;
24
+  font-weight: 400;
25
+  margin-bottom: 40rpx;
26
+}
27
+
28
+.panelItem{
29
+  width:100%;
30
+  height:111rpx;
31
+  background-color: #fff;
32
+  justify-content: space-between;
33
+  margin-top: 1rpx;
34
+}
35
+
36
+.img{
37
+  width:50rpx;
38
+  height:50rpx;
39
+  border-radius: 10rpx;
40
+}
41
+
42
+.title1{
43
+  margin-left: 20rpx;
44
+  font-size:28rpx;
45
+}
46
+
47
+.btnRefresh{
48
+  width:108rpx;
49
+  height:50rpx;
50
+  border-radius: 10rpx;
51
+  background-color: #0792E4;
52
+  color:#fff;
53
+  font-size:24rpx;
54
+  text-align: center;
55
+  line-height: 50rpx;
56
+}

+ 12 - 7
pages/index/activate.js

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

+ 5 - 0
package4/main/activateOK.json

@@ -0,0 +1,5 @@
1
+{
2
+  "navigationBarBackgroundColor": "#ffffff",
3
+  "navigationBarTextStyle": "black",
4
+  "backgroundColor": "#F0F0F0"
5
+}

+ 14 - 0
package4/main/activateOK.wxml

@@ -0,0 +1,14 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <image src='../images/program_activated_clickclose.png' class="program_activated_clickclose" />
3
+
4
+  <image src='../images/universalpic_select_on_green_100x100.png' class="universalpic_select_on_green_100x100" />
5
+
6
+  <view class='text1'>
7
+    激活成功
8
+  </view>
9
+
10
+  <view class='panel1 FlexRow'>
11
+    <image src='../images/universalpic_attention_gray_50x50.png' class="universalpic_attention_gray_50x50" />
12
+    <view>关闭小程序,然后刷新状态</view>
13
+  </view>
14
+</view>

+ 39 - 0
package4/main/activateOK.wxss

@@ -0,0 +1,39 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.program_activated_clickclose{
8
+  width:281rpx;
9
+  height:133rpx;
10
+  position: fixed;
11
+  top:10rpx;
12
+  right:40rpx;
13
+}
14
+
15
+.universalpic_select_on_green_100x100 {
16
+  width: 100rpx;
17
+  height: 100rpx;
18
+  top: 190rpx;
19
+  position: fixed;
20
+}
21
+
22
+.text1{
23
+  font-size: 64rpx;
24
+  top:320rpx;
25
+  position: fixed;
26
+}
27
+
28
+.panel1{
29
+  position: fixed;
30
+  bottom:275rpx;
31
+  font-size:36rpx;
32
+  font-weight: 400;
33
+}
34
+
35
+.universalpic_attention_gray_50x50{
36
+  width: 50rpx;
37
+  height: 50rpx;
38
+  margin-right: 20rpx;
39
+}

+ 54 - 0
package4/main/buyad.js

@@ -0,0 +1,54 @@
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
+      Containnerheight: common.getSystemHeight(),
12
+    });
13
+    this.init();
14
+  },
15
+  init:function(){
16
+    var that=this;
17
+    var arrProduct = wx.getStorageSync("ProductPrice");
18
+    for (var i = 0; i < arrProduct.length; i++) {
19
+      if (arrProduct[i].ProductNum == app.globalData.ProgramID) {
20
+        that.setData({
21
+          Price: Math.floor(arrProduct[i].Period[0].Price),
22
+        });
23
+      }
24
+    }
25
+  },
26
+  gotoOrder: function () {
27
+    wx.navigateTo({
28
+      url: "./order?id="+app.globalData.ProgramID+"&paytype=3",
29
+    });
30
+  },
31
+  gotoPackList: function () {
32
+    wx.navigateTo({
33
+      url: "./list?IsGift=0",
34
+    });
35
+  },
36
+  gotoGiftList: function () {
37
+    wx.navigateTo({
38
+      url: "./list?IsGift=1",
39
+    });
40
+  },
41
+  closePage:function(){
42
+    wx.setStorageSync("NoRefreshList", true);
43
+    wx.navigateBack({
44
+      delta: 1
45
+    });
46
+  },
47
+  onShareAppMessage: function () {
48
+    return {
49
+      title: app.globalData.ShareTitle,
50
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
51
+      imageUrl: app.globalData.ShareImage,
52
+    }
53
+  },
54
+})

+ 6 - 0
package4/main/buyad.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "购买",
3
+  "navigationBarBackgroundColor": "#342535",
4
+  "navigationBarTextStyle": "white",
5
+  "backgroundColor": "#342535"
6
+}

+ 20 - 0
package4/main/buyad.wxml

@@ -0,0 +1,20 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class='panel1 FlexColumn'>
3
+    <image src='../images/pay_shoppingguide_illus_01.png' class="pay_shoppingguide_illus_01" />
4
+    <view class='panel11 FlexRow'>
5
+      <view class='panel111' bindtap='gotoOrder'>
6
+        直接购买
7
+      </view>
8
+      <view class='panel112 panel111' bindtap='gotoPackList'>
9
+        优惠套装
10
+      </view>
11
+    </view>
12
+    <view class='number'>{{Price}}元</view>
13
+  </view>
14
+
15
+  <image src='../images/pay_shoppingguide_illus_02.png' class="pay_shoppingguide_illus_02" bindtap='gotoGiftList' />
16
+  
17
+  <button class='text1' open-type="share">推荐给家长</button>
18
+  <image src='../images/pay_shoppingguide_footer.png' class="pay_shoppingguide_footer" />
19
+  <view class='text2' bindtap='closePage'>返回</view>
20
+</view>

+ 85 - 0
package4/main/buyad.wxss

@@ -0,0 +1,85 @@
1
+.container {
2
+  background-color: #342535;
3
+}
4
+
5
+.panel1 {
6
+  width: 610rpx;
7
+  margin-top: 100rpx;
8
+  justify-content: flex-start;
9
+  background-color: #AE5138;
10
+  border-radius: 10rpx;
11
+  box-shadow: 0 20rpx 1rpx #AE5138,
12
+  0 50rpx 1rpx #2E1E2F;
13
+  position: relative;
14
+}
15
+
16
+.pay_shoppingguide_illus_01 {
17
+  width: 610rpx;
18
+  height: 180rpx;
19
+}
20
+
21
+.panel11{
22
+  width: 610rpx;
23
+  background-color: #E4B06C;
24
+  justify-content: space-between;
25
+  border-bottom-left-radius: 10rpx;
26
+  border-bottom-right-radius: 10rpx;
27
+}
28
+
29
+.panel111{
30
+  width: 305rpx;
31
+  height:120rpx;
32
+  line-height: 120rpx;
33
+  text-align: center;
34
+  background-color: #FEC579;
35
+  border-bottom-left-radius: 10rpx;
36
+}
37
+.panel112{
38
+  border-bottom-left-radius: 0;
39
+  border-bottom-right-radius: 10rpx;
40
+}
41
+
42
+.number{
43
+  position: absolute;
44
+  left:103rpx;
45
+  top:160rpx;
46
+  width:100rpx;
47
+  height:40rpx;
48
+  line-height: 40rpx;
49
+  font-size:24rpx;
50
+  text-align: center;
51
+  border-radius: 20rpx;
52
+  background-color: #E4B06C;
53
+}
54
+
55
+.pay_shoppingguide_illus_02{
56
+  width:610rpx;
57
+  height:192rpx;
58
+  margin-top: 74rpx;
59
+}
60
+
61
+.text1{
62
+  margin-top: 15rpx;
63
+  font-size:28rpx;
64
+  color:#FE6659;
65
+  text-decoration: underline;
66
+  z-index: 10;
67
+  background-color: #342535;
68
+  border: 0rpx solid;
69
+}
70
+
71
+.pay_shoppingguide_footer{
72
+  width:100%;
73
+  height:350rpx;
74
+  margin-top: -23rpx;
75
+}
76
+
77
+.text2{
78
+  width:100%;
79
+  height:130rpx;
80
+  color:#fff;
81
+  line-height: 130rpx;
82
+  font-size:48rpx;
83
+  text-align: center;
84
+  background-color: #6B4D4E;
85
+}

+ 41 - 0
package4/main/coupon.js

@@ -0,0 +1,41 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+      ProgramList: server.getProgramList(),
14
+    });
15
+    this.init();
16
+  },
17
+  gotoFeedback: function () {
18
+    server.gotoFeedback();
19
+  },
20
+  init: function () {
21
+    var that = this;
22
+    wx.showLoading({
23
+      title: '请稍后',
24
+    });
25
+    server.getData('GetUserCouponListByUserID?IsShowAll=1&UserID=' + app.globalData.userInfo.UserID, function (data) {
26
+      if (data) {
27
+        that.setData({
28
+          CouponList: data,
29
+        });
30
+      }
31
+      wx.hideLoading();
32
+    });
33
+  },
34
+  onShareAppMessage: function () {
35
+    return {
36
+      title: app.globalData.ShareTitle,
37
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
38
+      imageUrl: app.globalData.ShareImage,
39
+    }
40
+  },
41
+})

+ 6 - 0
package4/main/coupon.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "优惠券",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 44 - 0
package4/main/coupon.wxml

@@ -0,0 +1,44 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+
3
+  <block wx:if="{{CouponList.length>0}}">
4
+    <view class='panel2 FlexRow' wx:for="{{CouponList}}" wx:key="index">
5
+      <view class='panel21 FlewRow'>
6
+        <view>{{item.PriceStr}}</view>
7
+      </view>
8
+      <view class='panel22 FlewColumn'>
9
+        <view class='panel221 FlexRow'>
10
+          <view>{{item.CouponName}}适用产品</view>
11
+          <view class='panel23' wx:if="{{item.IsPast==1}}">已过期</view>
12
+        </view>
13
+        <view class='panel220 FlexRow'>
14
+          <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" wx:for="{{ProgramList}}" wx:key="index" wx:if="{{item.IsShow2}}" />
15
+        </view>
16
+        <view class='panel222'>有效期 {{item.LimitTime}}</view>
17
+        <view class='panel222'>{{item.CouponName2}}</view>
18
+      </view>
19
+    </view>
20
+
21
+    <!-- <view class='panel2 FlexRow'>
22
+      <view class='panel21 FlewRow'>
23
+        <view>免费</view>
24
+      </view>
25
+      <view class='panel22 FlewColumn'>
26
+        <view class='panel221 FlexRow'>
27
+          <view>免费邀请券适用产品</view>
28
+          <view class='panel23'>已过期</view>
29
+        </view>
30
+        <view class='panel220 FlexRow'>
31
+          <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" wx:for="{{ProgramList}}" wx:key="index" wx:if="{{item.IsShow2}}" />
32
+        </view>
33
+        <view class='panel222'>有效期 2017年12月23日</view>
34
+        <view class='panel222'>邀请10位付费用户免费开通会员功能。</view>
35
+      </view>
36
+    </view> -->
37
+    <image src='../images/file_0201.png' class="file_0201" />
38
+    <view style='height:100rpx'></view>
39
+
40
+  </block>
41
+  <block wx:if="{{CouponList.length==0}}">
42
+    <view class="panelNull">没有优惠券</view>
43
+  </block>
44
+</view>

+ 71 - 0
package4/main/coupon.wxss

@@ -0,0 +1,71 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.panel2{
8
+  width:690rpx;
9
+  height:239rpx;
10
+  border-radius: 14rpx;
11
+  background-color: #fff;
12
+  border:1rpx solid #D2D2D2;
13
+  margin-top: 40rpx;
14
+  justify-content: flex-start;
15
+}
16
+
17
+.panel21{
18
+  width:150rpx;
19
+  height:239rpx;
20
+  line-height:239rpx;
21
+  border-top-left-radius: 14rpx;
22
+  border-bottom-left-radius: 14rpx;
23
+  background-color: #FFDD0C;
24
+  font-size:48rpx;
25
+  text-align: center;
26
+}
27
+
28
+.panel22{
29
+  align-items: flex-start;
30
+  font-size:24rpx;
31
+  font-weight: 400;
32
+  margin-left: 30rpx;
33
+}
34
+
35
+.panel221{
36
+  font-weight: 400;
37
+  margin-bottom: 10rpx;
38
+}
39
+.panel222{
40
+  color:#787878;
41
+}
42
+
43
+.panel220{
44
+  margin-bottom: 10rpx;
45
+  justify-content: flex-start;
46
+}
47
+
48
+.product_icon_ksxq_70x70{
49
+  width:50rpx;
50
+  height:50rpx;
51
+  border-radius: 10rpx;
52
+  margin-right: 10rpx;
53
+}
54
+
55
+.panel23{
56
+  color:#F44336;
57
+  font-size:26rpx;
58
+  font-weight: 400;
59
+  margin-left: 176rpx;
60
+}
61
+
62
+.file_0201{
63
+  width:100%;
64
+  height:381rpx;
65
+  margin-top: 50rpx;
66
+}
67
+
68
+.panelNull{
69
+  font-size:48rpx;
70
+  margin-top: 462rpx;
71
+}

+ 201 - 0
package4/main/giftcard.js

@@ -0,0 +1,201 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+var giftID=0;
6
+
7
+Page({
8
+  data: {
9
+  },
10
+  onLoad: function (options) {
11
+    giftID = options.GiftID;
12
+    var userID = options.UserID;
13
+    this.setData({
14
+      Containnerheight: common.getSystemHeight(),
15
+      ProgramList: server.getProgramList(),
16
+    });
17
+
18
+    this.init(giftID,userID);
19
+
20
+  },
21
+  init: function (id,userID) {
22
+    var that = this;
23
+    server.getData('GetGiftInfoByUserID500?ID=' + id + "&ProductID=" + app.globalData.ProgramID+"&UserID="+userID, function (data) {
24
+      if (data) {
25
+        
26
+        var price = data.PriceTotal;
27
+        var numberWidth = 240;
28
+        var fontsize = 100;
29
+        if (price.toString().length == 2) {
30
+          numberWidth = 180;
31
+        }
32
+        else if (price.toString().length == 3) {
33
+          numberWidth = 220;
34
+        }
35
+        else if (price.toString().length == 4) {
36
+          numberWidth = 220;
37
+        }
38
+        else if (price.toString().length == 5) {
39
+          numberWidth = 240;
40
+          fontsize = 85;
41
+        }
42
+
43
+        that.setData({
44
+          NumberWidth: numberWidth,
45
+          GiftInfo: data,
46
+          FontSize:fontsize,
47
+        });
48
+      }
49
+    });
50
+  },
51
+  gotoFeedback: function () {
52
+    server.gotoFeedback();
53
+  },
54
+  goto: function (e) {
55
+    var that = this;
56
+
57
+    wx.getSetting({
58
+      success(res) {
59
+        if (!res.authSetting['scope.userInfo']) {
60
+          wx.authorize({
61
+            scope: 'scope.userInfo',
62
+            success() {
63
+              that.getUserInfo();
64
+            },
65
+            fail() {
66
+              wx.openSetting({
67
+                success(res) {
68
+                  that.getUserInfo();
69
+                },
70
+              });
71
+            }
72
+          })
73
+        } else {
74
+          that.getUserInfo();
75
+        }
76
+      }
77
+    });
78
+  },
79
+  //得到用户信息
80
+  getUserInfo: function () {
81
+    var that = this
82
+    //调用登录接口
83
+    wx.login({
84
+      success: function (res0) {
85
+        wx.getUserInfo({
86
+          withCredentials: true,
87
+          success: function (res) {
88
+            app.globalData.userInfo = res.userInfo;
89
+            app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
90
+            app.globalData.userInfo.AvatarUrl = app.globalData.userInfo.avatarUrl;
91
+
92
+            that.setData({
93
+              IsAccredit: true,
94
+              NickName: app.globalData.userInfo.NickName,
95
+              AvatarUrl: app.globalData.userInfo.AvatarUrl
96
+            });
97
+
98
+            app.globalData.userInfo.Code = res0.code;
99
+            app.globalData.userInfo.iv = res.iv;
100
+            app.globalData.userInfo.encryptedData = res.encryptedData;
101
+            that.login(app.globalData.userInfo);
102
+          },
103
+          fail: function (res) {
104
+            wx.reLaunch({
105
+              url: '../index/index'
106
+            });
107
+          }
108
+        });
109
+      },
110
+      fail: function () {
111
+        wx.reLaunch({
112
+          url: '../index/index'
113
+        });
114
+      }
115
+    });
116
+  },
117
+  login: function (param) {
118
+    var that = this;
119
+    var url="Login";
120
+    switch(app.globalData.ProgramID){
121
+      case 164:
122
+        url = "MathStar" + url;
123
+        break;
124
+      case 105:
125
+        url = "Math" + url;
126
+        break;
127
+      case 106:
128
+        url = "Hanzi" + url;
129
+        break;
130
+      case 98:
131
+        url = "Pinyin" + url;
132
+        break;
133
+      case 99:
134
+        url = "Phonics" + url;
135
+        break;
136
+    }
137
+    server.postData(url, {
138
+      Code: param.Code,
139
+      NickName: param.nickName,
140
+      Language: param.language,
141
+      Gender: param.gender,
142
+      City: param.city,
143
+      Province: param.province,
144
+      Country: param.country,
145
+      AvatarUrl: param.avatarUrl,
146
+      ProgramVersion: app.globalData.Version,
147
+      Introducer: app.globalData.introducer,
148
+      UserSource: app.globalData.userSource,
149
+      SourceID: app.globalData.SourceID,
150
+      LastUserSource: app.globalData.userSource,
151
+      iv: param.iv,
152
+      encryptedData: param.encryptedData,
153
+    }, function (data) {
154
+      app.globalData.userInfo.UserID = data.UserID;
155
+      wx.showLoading({
156
+        title: '兑换中...',
157
+      });
158
+      server.getData('SetUserGiftExchange500?UserID=' + app.globalData.userInfo.UserID + "&ProductPayInfoID=" + giftID, function (data2) {
159
+        wx.hideLoading();
160
+        if (data2) {
161
+          app.globalData.userInfo.IsMember = 1;
162
+          app.globalData.IsMemberForeverRemind = 1;
163
+          if (that.data.GiftInfo.GiftNumber>1)
164
+            wx.setStorageSync("HasActivate", 1);
165
+          
166
+          wx.reLaunch({
167
+            url: '../../pages/index/index'
168
+          });
169
+        }
170
+        else {
171
+          var title = "无效";
172
+          var content = "兑换卡已被领取,请联系赠送者了解原因!";
173
+          wx.showModal({
174
+            showCancel: false,
175
+            title: title,
176
+            content: content,
177
+            confirmText: "返回首页",
178
+            success: function () {
179
+              wx.reLaunch({
180
+                url: '../../pages/index/index'
181
+              });
182
+            }
183
+          });
184
+
185
+        }
186
+      });
187
+    });
188
+  },
189
+  gotoDefault:function(){
190
+    wx.reLaunch({
191
+      url: '../../pages/index/index'
192
+    });
193
+  },
194
+  onShareAppMessage: function () {
195
+    return {
196
+      title: app.globalData.ShareTitle,
197
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
198
+      imageUrl: app.globalData.ShareImage,
199
+    }
200
+  },
201
+})

+ 6 - 0
package4/main/giftcard.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "唱意教育",
3
+  "navigationBarBackgroundColor": "#7D4434",
4
+  "navigationBarTextStyle": "white",
5
+  "backgroundColor": "#7D4434"
6
+}

File diff suppressed because it is too large
+ 45 - 0
package4/main/giftcard.wxml


+ 208 - 0
package4/main/giftcard.wxss

@@ -0,0 +1,208 @@
1
+.container {
2
+  background-color: #7d4434;
3
+  color: #fff;
4
+  font-weight: 500;
5
+}
6
+
7
+.text1 {
8
+  color: #fff;
9
+  font-size: 98rpx;
10
+  font-weight: 600;
11
+  text-shadow: 0 7rpx 1rpx #622112;
12
+}
13
+
14
+.text2 {
15
+  color: #feca90;
16
+  font-size: 28rpx;
17
+  margin-top: 40rpx;
18
+}
19
+
20
+.text3 {
21
+  color: #feca90;
22
+  font-size: 48rpx;
23
+  margin-top: 0rpx;
24
+}
25
+
26
+.text4 {
27
+  color: #feca90;
28
+  font-size: 28rpx;
29
+}
30
+
31
+.panel1 {
32
+  margin-top: 40rpx;
33
+  width: 100%;
34
+  position: relative;
35
+}
36
+
37
+.program_giftcard_illus_01 {
38
+  width: 100%;
39
+  height: 1108rpx;
40
+  position: absolute;
41
+  top: 0;
42
+  z-index: 1;
43
+}
44
+.program_giftcard_illus_02 {
45
+  height: 708rpx;
46
+}
47
+
48
+.text5 {
49
+  color: #feca90;
50
+  font-size: 24rpx;
51
+  text-shadow: 0 3rpx 1rpx #962017;
52
+  margin-top: 219rpx;
53
+  z-index: 10;
54
+}
55
+
56
+.text6 {
57
+  color: #feca90;
58
+  font-size: 36rpx;
59
+  text-shadow: 0 3rpx 1rpx #962017;
60
+  margin: 10rpx 0 30rpx 0;
61
+  z-index: 10;
62
+}
63
+
64
+.programItem {
65
+  width: 598rpx;
66
+  height: 80rpx;
67
+  margin-bottom: 25rpx;
68
+  border-radius: 6rpx;
69
+  background-color: rgba(0, 0, 0, 0.3);
70
+  z-index: 10;
71
+  justify-content: space-between;
72
+  color: #f8f8f8;
73
+}
74
+
75
+.programItem1 {
76
+  justify-content: flex-start;
77
+}
78
+
79
+.universalpic_product_jisuanti_icon_size01 {
80
+  width: 50rpx;
81
+  height: 50rpx;
82
+  margin-left: 20rpx;
83
+  border-radius: 10rpx;
84
+}
85
+
86
+.name1 {
87
+  margin-left: 20rpx;
88
+  font-size: 28rpx;
89
+}
90
+
91
+.name2 {
92
+  margin-right: 20rpx;
93
+  font-size: 24rpx;
94
+}
95
+
96
+.panel11 {
97
+  margin-top: 25rpx;
98
+  z-index: 10;
99
+  width:418rpx;
100
+  color: #feca90;
101
+  align-items: flex-end;
102
+}
103
+
104
+.text7 {
105
+  z-index: 10;
106
+  font-size: 24rpx;
107
+  font-weight: 600;
108
+  margin-bottom: 25rpx;
109
+  margin-right:250rpx;
110
+}
111
+
112
+.textTitle {
113
+  font-size: 100rpx;
114
+  height: 117rpx;
115
+  position: relative;
116
+  right:240rpx;
117
+}
118
+
119
+.textTitle1 {
120
+  -webkit-text-stroke: 20rpx #883029;
121
+  position: absolute;
122
+  text-align: center;
123
+  line-height: 117rpx;
124
+}
125
+
126
+.textTitle2 {
127
+  color: #91c167;
128
+  position: absolute;
129
+  text-align: center;
130
+  line-height: 117rpx;
131
+}
132
+
133
+.text8 {
134
+  z-index: 10;
135
+  font-size: 26rpx;
136
+  font-weight: 600;
137
+  margin: 0 0 22rpx 0;
138
+}
139
+
140
+.text9 {
141
+  z-index: 10;
142
+  font-size: 24rpx;
143
+  color: #feca90;
144
+  margin: 4rpx 0 60rpx 0;
145
+}
146
+
147
+.btn1 {
148
+  margin-top: 80rpx;
149
+  width: 460rpx;
150
+  height: 100rpx;
151
+  background-color: #03af69;
152
+  border-radius: 10rpx;
153
+  box-shadow: 0 10rpx 5rpx #035834, 0 20rpx 1rpx rgba(0, 0, 0, 0.3);
154
+  font-size: 48rpx;
155
+  color:#fff;
156
+}
157
+
158
+.btn2 {
159
+  background-color: #2E2E2E;
160
+  box-shadow: 0 10rpx 5rpx #1E1E1E, 0 20rpx 1rpx rgba(0, 0, 0, 0.3);
161
+  color:#4D4D4D;
162
+}
163
+
164
+.text10 {
165
+  z-index: 10;
166
+  font-size: 24rpx;
167
+  font-weight: 400;
168
+  color: #dc9d7e;
169
+  margin: 40rpx 0 0 0;
170
+}
171
+
172
+.text11 {
173
+  z-index: 10;
174
+  font-size: 24rpx;
175
+  color: #dc9d7e;
176
+  font-weight: 400;
177
+  margin: 50rpx 0 0 0;
178
+}
179
+
180
+.text12 {
181
+  color: #03af69;
182
+  text-decoration: underline;
183
+  font-weight: 500;
184
+}
185
+
186
+.line1 {
187
+  margin-top: 30rpx;
188
+  width: 650rpx;
189
+  height: 1rpx;
190
+  background-color: #dc9d7e;
191
+}
192
+
193
+.text13 {
194
+  margin-top: 60rpx;
195
+  width: 650rpx;
196
+  color: #dc9d7e;
197
+  font-size: 20rpx;
198
+}
199
+
200
+.text14{
201
+  text-decoration: underline;
202
+}
203
+
204
+.program_giftcard_footer {
205
+  margin-top: 0rpx;
206
+  width: 100%;
207
+  height: 304rpx;
208
+}

+ 73 - 0
package4/main/giftinfo.js

@@ -0,0 +1,73 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    List: [],
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+      ProgramList: server.getProgramList(),
14
+      ProgramID:app.globalData.ProgramID,
15
+      canGive:false,
16
+    });
17
+    this.init(options.id);
18
+  },
19
+  init: function (id) {
20
+    var that = this;
21
+    var url = "GetGiftInfoByUserID500?ID=" + id + "&ProductID=" + app.globalData.ProgramID;
22
+    server.getData(url, function (data) {
23
+      if (data) {
24
+        that.setData({
25
+          GiftInfo: data,
26
+        });
27
+      }
28
+    });
29
+  },
30
+  gotoFeedback: function () {
31
+    server.gotoFeedback();
32
+  },
33
+  getRemind:function(){
34
+    var that=this;
35
+    wx.getSetting({
36
+      success(res) {
37
+        if (!res.authSetting['scope.userInfo']) {
38
+          wx.navigateTo({
39
+            url: '../../pages/index/userlogin?url=giftinfo'
40
+          });
41
+        }
42
+        else {
43
+          wx.showModal({
44
+            title: '慎重转发',
45
+            content: '请勿转发到群。如误转,只能在聊天窗口中撤回(1分钟内)。',
46
+            confirmText: '知道了',
47
+            showCancel: false,
48
+          });
49
+          that.setData({
50
+            canGive: true,
51
+          });
52
+        }
53
+      }
54
+    });
55
+    
56
+  },
57
+  onShareAppMessage: function () {
58
+    if (this.data.GiftInfo.PayType == 5 && this.data.GiftInfo.ExchangeUserID>0){
59
+      return {
60
+        title: app.globalData.ShareTitle,
61
+        path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
62
+        imageUrl: app.globalData.ShareImage,
63
+      }
64
+    }
65
+    else{
66
+      return {
67
+        title: "有价商品尽快领取",
68
+        path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID + '&GiftID=' + this.data.GiftInfo.ID,
69
+        imageUrl: '../images/program_screenshot_giftcard.png',
70
+      }
71
+    }
72
+  },
73
+})

+ 6 - 0
package4/main/giftinfo.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "礼品卡详情",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 62 - 0
package4/main/giftinfo.wxml

@@ -0,0 +1,62 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTitle FlexRow">
3
+    <view class="panelTitle1">{{GiftInfo.Body}}</view>
4
+  </view>
5
+  <view class="panelItem FlexRow">
6
+    <view class="panelItem1">内容</view>
7
+    <view class="panelItem2 FlexRow">
8
+      <block wx:if="{{GiftInfo.Body=='唱意教育礼品卡'}}">
9
+        <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" wx:for="{{ProgramList}}" wx:key="index" wx:if="{{item.IsShow2}}" />
10
+      </block>
11
+      <block wx:if="{{GiftInfo.Body!='唱意教育礼品卡'}}">
12
+        <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" wx:for="{{ProgramList}}" wx:key="index" wx:if="{{item.IsShow2 && item.ID==ProgramID}}" />
13
+      </block>
14
+    </view>
15
+  </view>
16
+  <view class="lineWidth750"></view>
17
+  <view class="panelItem0 panelItem FlexRow">
18
+    <view class="panelItem1 FlexRow">
19
+      <view class="title1">截止日期</view>
20
+      <view class="title2">{{GiftInfo.LimitTime}}</view>
21
+    </view>
22
+    <view class="panelItem2 FlexRow">
23
+      <view class="title3" wx:if="{{GiftInfo.PayType==5 && GiftInfo.ExchangeUserID>0}}">已领取</view>
24
+      <view class="title4 title3" wx:if="{{false}}">已过期</view>
25
+    </view>
26
+  </view>
27
+  <view class="lineWidth750"></view>
28
+  <view class="panelItem00 panelItem FlexRow" wx:if="{{GiftInfo.PayType==5 && GiftInfo.ExchangeUserID>0}}">
29
+    <view class="panelItem1 FlexColumn">
30
+      <view class="panelItem11 FlexRow">
31
+        <view class="title1">领取人</view>
32
+        <view class="title2">{{GiftInfo.NickName}}</view>
33
+      </view>
34
+      <view class="panelItem11 FlexRow">
35
+        <view class="title1">领取时间</view>
36
+        <view class="title2">{{GiftInfo.ExchangeTime}}</view>
37
+      </view>
38
+    </view>
39
+    <view class="panelItem2 FlexRow">
40
+      <image src='{{GiftInfo.AvatarUrl}}' class="universalpic_face_default_blue_120x120" />
41
+    </view>
42
+  </view>
43
+  <view class='lineFooter'></view>
44
+
45
+  <block wx:if="{{GiftInfo.PayType==5 && GiftInfo.ExchangeUserID==0}}">
46
+    <view class="btn0 button1 FlexRow" bindtap="getRemind" wx:if="{{!canGive}}">
47
+      赠送
48
+    </view>
49
+    <button class="btn0 button1 FlexRow" open-type='share' wx:if="{{canGive}}">
50
+      赠送
51
+    </button>
52
+    <view class='title5'>转发后,请联系对方尽快领取</view>
53
+  </block>
54
+  <view style='height:50rpx;'></view>
55
+  <image src='../images/file_030{{item}}.png' class="file_030{{item}}" wx:for="{{[1,2,3]}}" wx:key="index" />
56
+  <view class='panelFooter FlexRow' bindtap='gotoFeedback'>
57
+    <view>如遇赠送问题,请切换到“唱意教育家长助手”中</view>
58
+    <view class='title6'>咨询客服</view>
59
+    <view>。</view>
60
+  </view>
61
+
62
+</view>

+ 119 - 0
package4/main/giftinfo.wxss

@@ -0,0 +1,119 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.panelTitle{
8
+  width:100%;
9
+  margin-top: 50rpx;
10
+  justify-content: flex-start;
11
+}
12
+.panelTitle .panelTitle1{
13
+  font-size:32rpx;
14
+  margin-left: 30rpx;
15
+  margin-bottom: 30rpx;
16
+}
17
+
18
+.panelItem{
19
+  width:100%;
20
+  justify-content: space-between;
21
+  font-size:28rpx;
22
+  height:110rpx;
23
+  background-color: #fff;
24
+}
25
+
26
+.panelItem0{
27
+  height:88rpx;
28
+}
29
+
30
+.panelItem00{
31
+  height:123rpx;
32
+}
33
+
34
+.panelItem .panelItem1{
35
+  margin-left: 30rpx;
36
+  font-weight: 400;
37
+  align-items: flex-start;
38
+}
39
+.panelItem .panelItem11{
40
+  margin-bottom: 5rpx;
41
+}
42
+.panelItem .panelItem2{
43
+  margin-right: 30rpx;
44
+}
45
+
46
+.product_icon_ksxq_70x70{
47
+  width:50rpx;
48
+  height:50rpx;
49
+  border-radius: 10rpx;
50
+  margin-left: 10rpx;
51
+}
52
+
53
+.panelItem .title1{
54
+  color:#9B9B9B;
55
+  font-size:20rpx;
56
+  font-weight: 400;
57
+  margin-right: 10rpx;
58
+  width:80rpx;
59
+}
60
+
61
+.panelItem .title2{
62
+  font-size:20rpx;
63
+  font-weight: 400;
64
+}
65
+
66
+.panelItem .title3{
67
+  color:#787878;
68
+  font-size:28rpx;
69
+}
70
+
71
+.panelItem .title4{
72
+  color:#F44336;
73
+}
74
+
75
+.universalpic_face_default_blue_120x120{
76
+  width:60rpx;
77
+  height:60rpx;
78
+  border-radius: 10rpx;
79
+}
80
+
81
+.btn0{
82
+  width:400rpx;
83
+  height:100rpx;
84
+  font-size:48rpx;
85
+  margin-top: 50rpx;
86
+}
87
+
88
+.title5{
89
+  font-weight: 400;
90
+  font-size:24rpx;
91
+  margin: 30rpx 0 0 0;
92
+}
93
+
94
+.file_0301{
95
+  width:100%;
96
+  height:1204rpx;
97
+  margin-bottom: 50rpx;
98
+}
99
+.file_0302{
100
+  width:100%;
101
+  height:746rpx;
102
+  margin-bottom: 50rpx;
103
+}
104
+.file_0303{
105
+  width:100%;
106
+  height:752rpx;
107
+  margin-bottom: 50rpx;
108
+}
109
+
110
+.panelFooter{
111
+  font-weight: 400;
112
+  font-size: 24rpx;
113
+  margin-bottom: 100rpx;
114
+}
115
+.panelFooter .title6{
116
+  color:#B3443B;
117
+  text-decoration: underline;
118
+  font-weight: 500;
119
+}

+ 45 - 0
package4/main/giftlist.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
+    List:[],
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+    });
14
+    this.init();
15
+  },
16
+  init:function(){
17
+    var that = this;
18
+
19
+    server.getData('GetGiftListByUserID500?UserID=' + app.globalData.userInfo.UserID + "&ProductID=" + app.globalData.ProgramID, function (data) {
20
+      if (data) {
21
+        that.setData({
22
+          List: data,
23
+        });
24
+      }
25
+    });
26
+  },
27
+  goto: function (e) {
28
+    var id=e.currentTarget.dataset.id;
29
+    wx.navigateTo({
30
+      url: "./giftinfo?id="+id,
31
+    });
32
+  },
33
+  gotoGiftList: function () {
34
+    wx.navigateTo({
35
+      url: "./list?IsGift=1",
36
+    });
37
+  },
38
+  onShareAppMessage: function () {
39
+    return {
40
+      title: app.globalData.ShareTitle,
41
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
42
+      imageUrl: app.globalData.ShareImage,
43
+    }
44
+  },
45
+})

+ 6 - 0
package4/main/giftlist.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "我的礼品卡",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 23 - 0
package4/main/giftlist.wxml

@@ -0,0 +1,23 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <block wx:if="{{List.length>0}}" wx:for="{{List}}" wx:key="index">
3
+    <view class='panel FlexRow' bindtap="goto" data-id="{{item.ID}}">
4
+      <view class='panel1 FlexColumn'>
5
+        <view class='Title1'>{{item.Body}}</view>
6
+        <view class='Title2'>{{item.TradeNo}}</view>
7
+        <view class='Title3'>{{item.PayEndTime}}</view>
8
+      </view>
9
+      <view class='panel2 FlexRow'>
10
+        <view class='Title4' wx:if="{{item.PayType==5 && item.ExchangeUserID>0}}">已领取</view>
11
+        <image src='../images/universalpic_indicator_right_gray.png' class="universalpic_indicator_right_gray" />
12
+      </view>
13
+    </view>
14
+    <view class='lineFooter'></view>
15
+  </block>
16
+
17
+  <view class='panelNull FlexColumn' wx:if="{{List.length==0}}" bindtap='gotoGiftList'>
18
+    <view class='Title5'>没有礼品卡</view>
19
+    <view class='Title6'>乘此机会挑选一张吧</view>
20
+    <view class='Title7'>去选购</view>
21
+  </view>
22
+  <view style='height:100rpx;'></view>
23
+</view>

+ 72 - 0
package4/main/giftlist.wxss

@@ -0,0 +1,72 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 400;
5
+}
6
+
7
+.panel{
8
+  margin-top: 50rpx;
9
+  width:100%;
10
+  background-color: #fff;
11
+  justify-content: space-between;
12
+}
13
+
14
+.panel .panel1{
15
+  align-items: flex-start;
16
+  margin-left: 30rpx;
17
+}
18
+
19
+.panel .Title1{
20
+  margin-top: 30rpx;
21
+  font-size:28rpx;
22
+}
23
+
24
+.panel .Title2{
25
+  font-size:20rpx;
26
+  color:#787878;
27
+}
28
+
29
+.panel .Title3{
30
+  font-size:20rpx;
31
+  color:#787878;
32
+  margin-bottom: 30rpx;
33
+}
34
+
35
+.panel .panel2{
36
+  justify-content: flex-end;
37
+  margin-right: 30rpx;
38
+}
39
+
40
+.panel .Title4{
41
+  font-size:28rpx;
42
+  color:#787878;
43
+  margin-right: 30rpx;
44
+}
45
+
46
+.universalpic_indicator_right_gray{
47
+  width:16rpx;
48
+  height:26rpx;
49
+}
50
+
51
+
52
+.panelNull{
53
+  margin-top: 412rpx;
54
+}
55
+
56
+.panelNull .Title5{
57
+  font-size:48rpx;
58
+  font-weight: 500;
59
+}
60
+
61
+.panelNull .Title6{
62
+  font-size:24rpx;
63
+  margin-top: 40rpx;
64
+}
65
+
66
+.panelNull .Title7{
67
+  font-size:36rpx;
68
+  text-decoration: underline;
69
+  color:#B3443B;
70
+  font-weight: 500;
71
+  margin-top: 20rpx;
72
+}

+ 44 - 0
package4/main/limited.js

@@ -0,0 +1,44 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    FileUrl: app.globalData.imageUrl,
9
+  },
10
+  onLoad: function (options) {
11
+
12
+    this.setData({
13
+      Containnerheight: common.getSystemHeight(),
14
+    });
15
+    this.init();
16
+  },
17
+  init: function () {
18
+    var that = this;
19
+    server.getData('GetWXUsersAllTime?ProductID=' + app.globalData.ProgramID + '&UserID=' + app.globalData.userInfo.UserID, function (data) {
20
+      if (data) {
21
+        for (var i = 0; i < data.length; i++) {
22
+          var date = common.formatDateCHS(common.formatTime(new Date()));
23
+          if (data[i].Time >= date) 
24
+            data[i].Member = "会员";
25
+          else
26
+            data[i].Member = "非会员";
27
+        }
28
+        that.setData({
29
+          ProductList: data,
30
+        });
31
+      }
32
+    });
33
+  },
34
+  gotoFeedback: function () {
35
+    server.gotoFeedback();
36
+  },
37
+  onShareAppMessage: function () {
38
+    return {
39
+      title: app.globalData.ShareTitle,
40
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
41
+      imageUrl: app.globalData.ShareImage,
42
+    }
43
+  },
44
+});

+ 6 - 0
package4/main/limited.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "使用有效期",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 25 - 0
package4/main/limited.wxml

@@ -0,0 +1,25 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTitle FlexRow">
3
+    <view class="panelTitle1">产品</view>
4
+    <view class="panelTitle2 FlexRow">
5
+      <view class="panelTitle21">截止日期</view>
6
+      <view class="line1"></view>
7
+      <view class="panelTitle21">用户身份</view>
8
+    </view>
9
+  </view>
10
+  <view class="panelItem FlexRow" wx:for="{{ProductList}}" wx:key="index">
11
+    <view class="panelItem1">{{item.Name}}</view>
12
+    <view class="panelItem2 FlexRow">
13
+      <view class="panelItem21">{{item.Time}}</view>
14
+      <view class="panelItem22">{{item.Member}}</view>
15
+    </view>
16
+  </view>
17
+  <view class='lineFooter'></view>
18
+
19
+
20
+  <view class='panelFooter FlexRow' bindtap='gotoFeedback'>
21
+    <view>如遇问题,请切换到“唱意教育家长助手”中</view>
22
+    <view class='title6'>咨询客服</view>
23
+    <view>。</view>
24
+  </view>
25
+</view>

+ 75 - 0
package4/main/limited.wxss

@@ -0,0 +1,75 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+
8
+.panelTitle{
9
+  width:100%;
10
+  margin-top: 50rpx;
11
+  justify-content: space-between;
12
+  align-items: flex-end;
13
+}
14
+
15
+.panelTitle .panelTitle1{
16
+  font-size:32rpx;
17
+  margin-left: 30rpx;
18
+  margin-bottom: 30rpx;
19
+}
20
+
21
+
22
+.panelTitle .panelTitle2{
23
+  font-size: 20rpx;
24
+  color:#787878;
25
+  margin-bottom: 30rpx;
26
+  margin-right: 30rpx;
27
+  font-weight: 500;
28
+}
29
+
30
+.panelTitle .line1{
31
+  width:3rpx;
32
+  height:20rpx;
33
+  background-color: #D2D2D2;
34
+  margin: 0 10rpx;
35
+}
36
+
37
+.panelItem{
38
+  width:100%;
39
+  justify-content: space-between;
40
+  font-size:28rpx;
41
+  height:100rpx;
42
+  margin-bottom: 2rpx;
43
+  background-color: #fff;
44
+}
45
+
46
+.panelItem0{
47
+  height:133rpx;
48
+}
49
+
50
+.panelItem .panelItem1{
51
+  margin-left: 30rpx;
52
+  font-weight: 400;
53
+}
54
+
55
+.panelItem .panelItem2{
56
+  margin-right: 30rpx;
57
+  color:#787878;
58
+  font-weight: 400;
59
+}
60
+
61
+.panelItem .panelItem22{
62
+  margin-left: 30rpx;
63
+  width: 90rpx;
64
+}
65
+
66
+.panelFooter{
67
+  font-weight: 400;
68
+  font-size: 24rpx;
69
+  margin-top: 50rpx;
70
+}
71
+.panelFooter .title6{
72
+  color:#B3443B;
73
+  text-decoration: underline;
74
+  font-weight: 500;
75
+}

+ 81 - 0
package4/main/list.js

@@ -0,0 +1,81 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    IsGift:true,
9
+  },
10
+  onLoad: function (options) {
11
+    var isgift = Number(options.IsGift);
12
+    this.setData({
13
+      Containnerheight: common.getSystemHeight(),
14
+      ProgramList: server.getProgramList(),
15
+      MathShow: false,
16
+      ChineseShow: false,
17
+      AllShow: false,
18
+      MathGiftShow: false,
19
+      AllGiftShow: false,
20
+      IsGift: isgift,
21
+    });
22
+
23
+    if (isgift==1){
24
+      wx.setNavigationBarTitle({
25
+        title: '购买礼品卡',
26
+      })
27
+    }
28
+
29
+    this.init();
30
+  },
31
+  init:function(){
32
+    var arrProduct = wx.getStorageSync("ProductPrice");
33
+    var arr=[];
34
+    for(var i=0;i<arrProduct.length;i++){
35
+      if (arrProduct[i].ProductNum.indexOf(",")>0){
36
+        arr.push(arrProduct[i]);
37
+      }
38
+    }
39
+
40
+    var CurrentProduct;
41
+    for (var i = 0; i < arrProduct.length; i++) {
42
+      if (arrProduct[i].ProductNum == app.globalData.ProgramID) {
43
+        CurrentProduct=arrProduct[i];
44
+      }
45
+    }
46
+    this.setData({
47
+      ProductList:arr,
48
+      CurrentProduct: CurrentProduct,
49
+    });
50
+  },
51
+  showList: function (e) {
52
+    var id = e.currentTarget.dataset.id;
53
+    this.data[id] = true;
54
+    this.setData(this.data);
55
+  }, 
56
+  gotoOrder: function (e) {
57
+    var id = e.currentTarget.dataset.id;
58
+    var paytype = e.currentTarget.dataset.paytype;
59
+    wx.navigateTo({
60
+      url: "./order?id=" + id + "&paytype=" + paytype,
61
+    });
62
+  },
63
+  switchProgram: function (e) {
64
+    wx.navigateToMiniProgram({
65
+      appId: e.currentTarget.dataset.appid,
66
+      path: e.currentTarget.dataset.path,
67
+      extraData: {
68
+      },
69
+      success(res) {
70
+        // 打开成功
71
+      }
72
+    });
73
+  },
74
+  onShareAppMessage: function () {
75
+    return {
76
+      title: app.globalData.ShareTitle,
77
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
78
+      imageUrl: app.globalData.ShareImage,
79
+    }
80
+  },
81
+})

+ 6 - 0
package4/main/list.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "套装选购",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 197 - 0
package4/main/list.wxml

@@ -0,0 +1,197 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <!-- 套装购买 -->
3
+  <block wx:if="{{!IsGift}}">
4
+    <view class='panel1 FlexRow'>
5
+      <image src='../images/product_icon_group_50x50.png' class="product_icon_group_50x50" />
6
+      <view class="panel11 FlexColumn">
7
+        <view class="panel111 FlexRow">
8
+          <view class="text1">{{ProductList[0].Name}}</view>
9
+          <view class="text0">{{ProductList[0].Period[0].Price}}</view>
10
+        </view>
11
+        <view class="text3">{{ProductList[0].ProductList.length}}款产品,有效期6个月</view>
12
+        <view class="text2">{{ProductList[0].Period[0].Title2}}</view>
13
+        <view class="line1"></view>
14
+        <block wx:for="{{ProductList[0].ProductList}}" wx:key="index" wx:if="{{ChineseShow}}">
15
+
16
+          <view class="panel12 FlexRow">
17
+            <view class="FlexRow">
18
+              <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
19
+              <view class="panel13 FlexColumn">
20
+                <view class="text4">{{item.Name}}</view>
21
+                <view class="text5">{{item.Name2}}</view>
22
+              </view>
23
+            </view>
24
+            <view class="panel14" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>去体验</view>
25
+          </view>
26
+        </block>
27
+        <block wx:if="{{!ChineseShow}}">
28
+          <view class="panel121 panel12 FlexRow" bindtap="showList" data-id="ChineseShow">
29
+            <view class="text4">套装详情</view>
30
+            <image src='../images/universalpic_indicator_down_gray.png' class="universalpic_indicator_down_gray" />
31
+          </view>
32
+        </block>
33
+
34
+      </view>
35
+    </view>
36
+    <view class="panel2 FlexRow" bindtap='gotoOrder' data-paytype="4" data-id='{{ProductList[0].ProductNum}}'>
37
+      <view class="text6">去结算</view>
38
+      <image src='../images/universalpic_indicator_right_white.png' class="universalpic_indicator_right_white" />
39
+    </view>
40
+
41
+    <view class='panel1 FlexRow'>
42
+      <image src='../images/product_icon_group_50x50.png' class="product_icon_group_50x50" />
43
+      <view class="panel11 FlexColumn">
44
+        <view class="panel111 FlexRow">
45
+          <view class="text1">{{ProductList[1].Name}}</view>
46
+          <view class="text0">{{ProductList[1].Period[0].Price}}</view>
47
+        </view>
48
+        <view class="text3">{{ProductList[1].ProductList.length}}款产品,有效期6个月</view>
49
+        <view class="text2">{{ProductList[1].Period[0].Title2}}</view>
50
+        <view class="line1"></view>
51
+        <block wx:for="{{ProductList[1].ProductList}}" wx:key="index" wx:if="{{MathShow}}">
52
+
53
+          <view class="panel12 FlexRow">
54
+            <view class="FlexRow">
55
+              <image src='../../pages/images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
56
+              <view class="panel13 FlexColumn">
57
+                <view class="text4">{{item.Name}}</view>
58
+                <view class="text5">{{item.Name2}}</view>
59
+              </view>
60
+            </view>
61
+            <view class="panel14" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>去体验</view>
62
+          </view>
63
+          <view class="line1"></view>
64
+        </block>
65
+        <block wx:if="{{!MathShow}}">
66
+          <view class="panel121 panel12 FlexRow" bindtap="showList" data-id="MathShow">
67
+            <view class="text4">套装详情</view>
68
+            <image src='../../pages/images/universalpic_indicator_down_gray.png' class="universalpic_indicator_down_gray" />
69
+          </view>
70
+        </block>
71
+
72
+      </view>
73
+    </view>
74
+    <view class="panel2 FlexRow" bindtap='gotoOrder' data-paytype="4" data-id='{{ProductList[1].ProductNum}}'>
75
+      <view class="text6">去结算</view>
76
+      <image src='../images/universalpic_indicator_right_white.png' class="universalpic_indicator_right_white" />
77
+    </view>
78
+
79
+
80
+    <view class='panel1 FlexRow'>
81
+      <image src='../images/product_icon_group_50x50.png' class="product_icon_group_50x50" />
82
+      <view class="panel11 FlexColumn">
83
+        <view class="panel111 FlexRow">
84
+          <view class="text1">{{ProductList[2].Name}}</view>
85
+          <view class="text0">{{ProductList[2].Period[0].Price}}</view>
86
+        </view>
87
+        <view class="text3">{{ProductList[2].ProductList.length}}款产品,有效期6个月</view>
88
+        <view class="text2">{{ProductList[2].Period[0].Title2}}</view>
89
+        <view class="line1"></view>
90
+        <block wx:for="{{ProductList[2].ProductList}}" wx:key="index" wx:if="{{AllShow}}">
91
+          <view class="panel12 FlexRow">
92
+            <view class="FlexRow">
93
+              <image src='../../pages/images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
94
+              <view class="panel13 FlexColumn">
95
+                <view class="text4">{{item.Name}}</view>
96
+                <view class="text5">{{item.Name2}}</view>
97
+              </view>
98
+            </view>
99
+            <view class="panel14" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>去体验</view>
100
+          </view>
101
+          <view class="line1"></view>
102
+        </block>
103
+
104
+        <block wx:if="{{!AllShow}}">
105
+          <view class="panel121 panel12 FlexRow" bindtap="showList" data-id="AllShow">
106
+            <view class="text4">套装详情</view>
107
+            <image src='../../pages/images/universalpic_indicator_down_gray.png' class="universalpic_indicator_down_gray" />
108
+          </view>
109
+        </block>
110
+      </view>
111
+    </view>
112
+    <view class="panel2 FlexRow" bindtap='gotoOrder' data-paytype="4" data-id='{{ProductList[2].ProductNum}}'>
113
+      <view class="text6">去结算</view>
114
+      <image src='../images/universalpic_indicator_right_white.png' class="universalpic_indicator_right_white" />
115
+    </view>
116
+  </block>
117
+
118
+  <!-- 礼品卡 -->
119
+  <block wx:if="{{IsGift}}">
120
+    <image src='../images/pay_shelf_banner_750x200.png' class="pay_shelf_banner_750x200" />
121
+    <view class='panel1 FlexRow'>
122
+      <image src='../images/product_icon_group_50x50.png' class="product_icon_group_50x50" />
123
+      <view class="panel11 FlexColumn">
124
+        <view class="panel111 FlexRow">
125
+          <view class="text1">{{CurrentProduct.ProductList[0].Name}}礼品卡</view>
126
+          <view class="text0">{{CurrentProduct.Period[0].Price}}</view>
127
+        </view>
128
+        <view class="text23">1款产品,可使用6个月</view>
129
+        <view class="line1"></view>
130
+        <block wx:for="{{CurrentProduct.ProductList}}" wx:key="index" wx:if="{{MathGiftShow}}">
131
+
132
+          <view class="panel12 FlexRow">
133
+            <view class="FlexRow">
134
+              <image src='../../pages/images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
135
+              <view class="panel13 FlexColumn">
136
+                <view class="text4">{{item.Name}}</view>
137
+                <view class="text5">{{item.Name2}}</view>
138
+              </view>
139
+            </view>
140
+            <view class="panel14" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>去体验</view>
141
+          </view>
142
+          <view class="line1"></view>
143
+        </block>
144
+        <block wx:if="{{!MathGiftShow}}">
145
+          <view class="panel121 panel12 FlexRow" bindtap="showList" data-id="MathGiftShow">
146
+            <view class="text4">礼品卡详情</view>
147
+            <image src='../../pages/images/universalpic_indicator_down_gray.png' class="universalpic_indicator_down_gray" />
148
+          </view>
149
+        </block>
150
+
151
+      </view>
152
+    </view>
153
+    <view class="panel2 FlexRow" bindtap='gotoOrder' data-paytype="5" data-id='{{CurrentProduct.ProductNum}}'>
154
+      <view class="text6">去结算</view>
155
+      <image src='../images/universalpic_indicator_right_white.png' class="universalpic_indicator_right_white" />
156
+    </view>
157
+
158
+
159
+    <view class='panel1 FlexRow'>
160
+      <image src='../images/product_icon_group_50x50.png' class="product_icon_group_50x50" />
161
+      <view class="panel11 FlexColumn">
162
+        <view class="panel111 FlexRow">
163
+          <view class="text1">{{ProductList[2].Name}}礼品卡</view>
164
+          <view class="text0">{{ProductList[2].Period[0].Price}}</view>
165
+        </view>
166
+        <view class="text3">{{ProductList[2].ProductList.length}}款产品,有效期6个月</view>
167
+        <view class="text2">{{ProductList[2].Period[0].Title2}}</view>
168
+        <view class="line1"></view>
169
+        <block wx:for="{{ProductList[2].ProductList}}" wx:key="index" wx:if="{{AllGiftShow}}">
170
+          <view class="panel12 FlexRow">
171
+            <view class="FlexRow">
172
+              <image src='../../pages/images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
173
+              <view class="panel13 FlexColumn">
174
+                <view class="text4">{{item.Name}}</view>
175
+                <view class="text5">{{item.Name2}}</view>
176
+              </view>
177
+            </view>
178
+            <view class="panel14" bindtap='switchProgram' data-appid='{{item.appId}}' data-path='{{item.path}}'>去体验</view>
179
+          </view>
180
+        </block>
181
+        <block wx:if="{{!AllGiftShow}}">
182
+          <view class="panel121 panel12 FlexRow" bindtap="showList" data-id="AllGiftShow">
183
+            <view class="text4">礼品卡详情</view>
184
+            <image src='../../pages/images/universalpic_indicator_down_gray.png' class="universalpic_indicator_down_gray" />
185
+          </view>
186
+        </block>
187
+      </view>
188
+    </view>
189
+    <view class="panel2 FlexRow" bindtap='gotoOrder' data-paytype="5" data-id='{{ProductList[2].ProductNum}}'>
190
+      <view class="text6">去结算</view>
191
+      <image src='../images/universalpic_indicator_right_white.png' class="universalpic_indicator_right_white" />
192
+    </view>
193
+
194
+    <image src='../images/file_0303.png' class="file_0303" />
195
+  </block>
196
+  <view style='height:100rpx'></view>
197
+</view>

+ 142 - 0
package4/main/list.wxss

@@ -0,0 +1,142 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.pay_shelf_banner_750x200 {
8
+  width: 100%;
9
+  height: 200rpx;
10
+}
11
+
12
+.panel1 {
13
+  width: 100%;
14
+  margin-top: 50rpx;
15
+  justify-content: flex-start;
16
+  align-items: flex-start;
17
+  background-color: #fff;
18
+}
19
+
20
+.product_icon_group_50x50 {
21
+  width: 50rpx;
22
+  height: 50rpx;
23
+  border-radius: 10rpx;
24
+  margin: 30rpx 30rpx 0 30rpx;
25
+}
26
+
27
+.panel11 {
28
+  margin-top: 30rpx;
29
+  align-items: flex-start;
30
+}
31
+
32
+.panel111 {
33
+  width: 100%;
34
+  justify-content: space-between;
35
+}
36
+
37
+.text1 {
38
+  font-size: 36rpx;
39
+}
40
+
41
+.text0 {
42
+  font-size: 36rpx;
43
+  margin-right: 30rpx;
44
+}
45
+
46
+.text3 {
47
+  margin-top: 10rpx;
48
+  font-size: 24rpx;
49
+  color: #787878;
50
+}
51
+
52
+.text2 {
53
+  font-size: 24rpx;
54
+  color: #fe6659;
55
+  margin-bottom: 30rpx;
56
+}
57
+
58
+.text23 {
59
+  margin-top: 10rpx;
60
+  font-size: 24rpx;
61
+  color: #787878;
62
+  margin-bottom: 30rpx;
63
+}
64
+
65
+.line1 {
66
+  width: 640rpx;
67
+  height: 1rpx;
68
+  background-color: #e3e3e3;
69
+}
70
+
71
+.panel12 {
72
+  width: 100%;
73
+  height: 131rpx;
74
+  justify-content: space-between;
75
+}
76
+
77
+.panel121 {
78
+  height: 100rpx;
79
+}
80
+
81
+.product_icon_ksxq_70x70 {
82
+  width: 70rpx;
83
+  height: 70rpx;
84
+  border-radius: 10rpx;
85
+}
86
+
87
+.panel13 {
88
+  margin-left: 20rpx;
89
+  align-items: flex-start;
90
+}
91
+
92
+.text4 {
93
+  font-size: 28rpx;
94
+}
95
+
96
+.text5 {
97
+  font-size: 24rpx;
98
+  font-weight: 400;
99
+  color: #787878;
100
+}
101
+
102
+.panel14 {
103
+  margin-right: 30rpx;
104
+  width: 108rpx;
105
+  height: 50rpx;
106
+  text-align: center;
107
+  color: #fff;
108
+  line-height: 50rpx;
109
+  border-radius: 6rpx;
110
+  font-size: 24rpx;
111
+  background-color: #0792e4;
112
+}
113
+
114
+.panel2 {
115
+  width: 100%;
116
+  justify-content: space-between;
117
+  background-color: #ffdd0c;
118
+  height: 110rpx;
119
+}
120
+
121
+.text6 {
122
+  margin-left: 110rpx;
123
+  font-size: 36rpx;
124
+}
125
+
126
+.universalpic_indicator_right_white {
127
+  margin-right: 30rpx;
128
+  width: 16rpx;
129
+  height: 26rpx;
130
+}
131
+
132
+.universalpic_indicator_down_gray {
133
+  margin-right: 30rpx;
134
+  width: 26rpx;
135
+  height: 16rpx;
136
+}
137
+
138
+.file_0303 {
139
+  margin-top: 50rpx;
140
+  width: 100%;
141
+  height: 752rpx;
142
+}

+ 149 - 0
package4/main/order.js

@@ -0,0 +1,149 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+var isPaying = false;
6
+var paytype=3;//3是单买 4是套餐 5是礼品卡
7
+var buytype = 110;//110是6个月 112是12个月,111是永久
8
+var detail="";
9
+var selectedCouponID=0;
10
+
11
+Page({
12
+  data: {
13
+    CouponList: [],
14
+  },
15
+  onLoad: function (options) {
16
+    var id = options.id;
17
+    paytype = options.paytype;
18
+    var result, price = 0;
19
+    var programList = server.getProgramList();
20
+    var arrProduct=wx.getStorageSync("ProductPrice");
21
+    for (var j = 0; j < arrProduct.length; j++) {
22
+      if (id==arrProduct[j].ProductNum){
23
+        for (var k = 0; k < arrProduct[j].Period.length; k++) {
24
+          if (arrProduct[j].Period[k].Select) {
25
+            price = arrProduct[j].Period[k].Price;
26
+            detail = arrProduct[j].Period[k].Detail;
27
+          }
28
+        }
29
+        result = arrProduct[j];
30
+      }
31
+    }
32
+
33
+    this.setData({
34
+      Containnerheight: common.getSystemHeight(),
35
+      Product: result,
36
+      Price: price,
37
+      IsDiscount: false,
38
+      CouponName:"未选择",
39
+
40
+    });
41
+  },
42
+  selectPeriod: function (e) {
43
+    var id = e.currentTarget.dataset.id;
44
+    var list = this.data.Product.Period;
45
+    var price = 0;
46
+    for (var i = 0; i < list.length; i++) {
47
+      if (i == id) {
48
+        list[i].Select = true;
49
+        price = list[i].Price;
50
+        if (this.data.Coupon){
51
+          price=price-Number(this.data.Coupon.Price);
52
+        }
53
+        if (price.toString().indexOf(".") < 0) {
54
+          price = price + ".00";
55
+        }
56
+        detail = list[i].Detail;
57
+        if (i==0)
58
+          buytype=110;
59
+        else if (i == 1)
60
+          buytype = 112;
61
+        else if (i == 2)
62
+          buytype = 111;
63
+      }
64
+      else
65
+        list[i].Select = false;
66
+    }
67
+    this.data.Product.Period = list;
68
+    this.setData({
69
+      Product: this.data.Product,
70
+      Price: price,
71
+    });
72
+  },
73
+  showDiscount: function () {
74
+    this.GetUserCouponListByUserID();
75
+  },
76
+  closeDiscount: function () {
77
+    this.setData({
78
+      IsDiscount: false,
79
+    });
80
+  },
81
+  GetUserCouponListByUserID: function (callback) {
82
+    var that = this;
83
+    that.setData({
84
+      IsDiscount: true,
85
+    });
86
+    wx.showLoading({
87
+      title: '请稍后',
88
+    });
89
+    server.getData('GetUserCouponListByUserID?UserID=' + app.globalData.userInfo.UserID, function (data) {
90
+        if (data) {
91
+          that.setData({
92
+            CouponList:data,
93
+          });
94
+        }
95
+        wx.hideLoading();
96
+    });
97
+  },
98
+  selectCoupon:function(e){
99
+    selectedCouponID=e.currentTarget.dataset.id;
100
+    var list = this.data.CouponList;
101
+    for(var i=0;i<list.length;i++){
102
+      if (selectedCouponID==list[i].ID){
103
+        var price = Number(this.data.Price) - Number(list[i].Price);
104
+        if (this.data.Coupon)
105
+          price+=Number(this.data.Coupon.Price);
106
+
107
+        if (price.toString().indexOf(".")<0){
108
+          price=price+".00";
109
+        }
110
+        this.setData({
111
+          IsDiscount: false,
112
+          Coupon: list[i],
113
+          Price: price,
114
+        });
115
+        wx.pageScrollTo({
116
+          scrollTop: 2000,
117
+        });
118
+        break;
119
+      }
120
+    }
121
+  },
122
+  gotoFeedback: function () {
123
+    server.gotoFeedback();
124
+  },
125
+  getPay: function (e) {
126
+    if (!isPaying) {
127
+      isPaying = true;
128
+      var that = this;
129
+      var money = that.data.Price;
130
+      if (that.data.Coupon)
131
+        detail += "_" + that.data.Coupon.ID+":"+Number(that.data.Coupon.Price)*100;
132
+      server.payMoney(paytype, buytype, money, detail, function () {
133
+        wx.redirectTo({
134
+          url: './payfinish?paytype=' + paytype,
135
+        });
136
+      });
137
+      setTimeout(function () {
138
+        isPaying = false;
139
+      }, 3000);
140
+    }
141
+  },
142
+  onShareAppMessage: function () {
143
+    return {
144
+      title: app.globalData.ShareTitle,
145
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
146
+      imageUrl: app.globalData.ShareImage,
147
+    }
148
+  },
149
+})

+ 6 - 0
package4/main/order.json

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

+ 102 - 0
package4/main/order.wxml

@@ -0,0 +1,102 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' wx:if="{{!IsDiscount}}">
2
+  <view class="panelTitle FlexRow">
3
+    <view class="panelTitle1">订单内容</view>
4
+  </view>
5
+
6
+  <block wx:for="{{Product.ProductList}}" wx:key="index" wx:if="{{item.IsShow2}}">
7
+    <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
8
+      <view class="lineWidth650"></view>
9
+    </view>
10
+    <view class="panelItem FlexRow">
11
+      <view class="panelItem1 FlexRow">
12
+        <image src='../images/{{item.ImageUrl}}' class="product_icon_ksxq_70x70" />
13
+        <view class="text1">{{item.Name}}</view>
14
+      </view>
15
+      <view>
16
+      </view>
17
+    </view>
18
+
19
+  </block>
20
+  <view class='lineFooter'></view>
21
+
22
+  <view class="panelTitle FlexRow">
23
+    <view class="panelTitle1">有效期</view>
24
+  </view>
25
+
26
+  <view class="{{item.Css}} panelItem3 FlexColumn" wx:for="{{Product.Period}}" wx:key="index" bindtap="selectPeriod" data-id="{{index}}">
27
+    <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
28
+      <view class="lineWidth720"></view>
29
+    </view>
30
+    <view class="panelItem31 FlexRow">
31
+      <view class="panelItem1 FlexRow">
32
+        <view class="selected FlexRow" wx:if="{{item.Select}}">
33
+          <view class='selected1'></view>
34
+        </view>
35
+        <view class="selected2 selected FlexRow" wx:if="{{!item.Select}}">
36
+        </view>
37
+        <view class="panelItem311">{{item.Title1}}</view>
38
+      </view>
39
+      <view class="panelItem2 FlexRow">
40
+        {{item.Price}}
41
+      </view>
42
+    </view>
43
+    <view class="panelItem32">
44
+      {{item.Title2}}
45
+    </view>
46
+  </view>
47
+  
48
+  <view class='lineFooter'></view>
49
+
50
+  <view class="panelTitle FlexRow">
51
+    <view class="panelTitle1">优惠券</view>
52
+  </view>
53
+
54
+  <view class="panelItem FlexRow" bindtap='showDiscount'>
55
+    <view class="panelItem1" wx:if="{{!Coupon}}">未选择</view>
56
+    <view class="panelItem1" wx:if="{{Coupon}}">{{Coupon.CouponName}}</view>
57
+    <view class="panelItem2 FlexRow">
58
+      <view wx:if="{{Coupon}}">已减 {{Coupon.Price}}</view>
59
+      <image src='../images/universalpic_indicator_right_gray.png' class="universalpic_indicator_right_gray" />
60
+    </view>
61
+  </view>
62
+  <view class='lineFooter'></view>
63
+  
64
+  <view class='text3 FlexRow' bindtap='gotoFeedback'>
65
+    <view class='text31'>如遇购买问题,请切换到“唱意教育家长助手”中</view>
66
+    <view class='text32'>咨询客服</view>
67
+  </view>
68
+
69
+  <view class="panelFooter FlexRow">
70
+    <view class='panelFooter1 FlexColumn'>
71
+      <view class='text2'>结算价格</view>
72
+      <view class='number1'>{{Price}}</view>
73
+    </view>
74
+    <view class="btnPay" bindtap="getPay">支付</view>
75
+  </view>
76
+</view>
77
+
78
+<view class="discount container FlexColumn" style='min-height:{{Containnerheight}}rpx;' wx:if="{{IsDiscount}}">
79
+  <view class="panel1">可供使用的优惠券</view>
80
+
81
+  <view class='panelNull FlexColumn' wx:if="{{CouponList.length==0}}">
82
+    <text class='panelNull1'>没有符合条件的\n优惠券</text>
83
+    <text class='panelNull2'>本次购买获赠的优惠券\n将在支付完成后发到您的账户,\n可在下次购买时使用。</text>
84
+  </view>
85
+  <view class='panel2 FlexRow' wx:if="{{CouponList.length>0}}" wx:for="{{CouponList}}" wx:key="index" bindtap="selectCoupon" data-id="{{item.ID}}">
86
+    <view class='panel21 FlewRow'>
87
+      <view>{{item.PriceStr}}</view>
88
+    </view>
89
+    <view class='panel22 FlewColumn'>
90
+      <view class='panel221'>{{item.CouponName}}</view>
91
+      <view class='panel222'>有效期 {{item.LimitTime}}</view>
92
+      <view class='panel222'>{{item.CouponName2}}</view>
93
+    </view>
94
+  </view>
95
+  <view style='height:160rpx'></view>
96
+
97
+  <view class="panel3 FlexColumn" bindtap='closeDiscount'>
98
+    <view class='line1'></view>
99
+    <view class="panel31">取消</view>
100
+  </view>
101
+
102
+</view>

+ 239 - 0
package4/main/order.wxss

@@ -0,0 +1,239 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.panelTitle{
8
+  width:100%;
9
+  margin-top: 50rpx;
10
+  justify-content: flex-start;
11
+}
12
+.panelTitle .panelTitle1{
13
+  font-size:32rpx;
14
+  margin-left: 30rpx;
15
+  margin-bottom: 30rpx;
16
+}
17
+
18
+.panelItem{
19
+  width:100%;
20
+  justify-content: space-between;
21
+  font-size:28rpx;
22
+  height:100rpx;
23
+  background-color: #fff;
24
+}
25
+
26
+.panelItem0{
27
+  height:133rpx;
28
+}
29
+
30
+.panelItem .panelItem1{
31
+  margin-left: 30rpx;
32
+  font-weight: 400;
33
+}
34
+.panelItem .panelItem2{
35
+  margin-right: 30rpx;
36
+  color:#787878;
37
+  font-weight: 500;
38
+}
39
+
40
+.universalpic_indicator_right_gray{
41
+  width:16rpx;
42
+  height:26rpx;
43
+  margin-left: 30rpx;
44
+}
45
+
46
+.product_icon_ksxq_70x70 {
47
+  width: 50rpx;
48
+  height: 50rpx;
49
+  border-radius: 10rpx;
50
+}
51
+
52
+.text1{
53
+  font-size: 28rpx;
54
+  margin-left: 20rpx;
55
+  font-weight: 400;
56
+}
57
+
58
+
59
+.panelItem3{
60
+  width:100%;
61
+  font-size:28rpx;
62
+  height:144rpx;
63
+  background-color: #fff;
64
+  align-items: flex-start;
65
+}
66
+
67
+.panelItem30{
68
+  height:100rpx;
69
+}
70
+
71
+.panelItem3 .panelItem31{
72
+  width:100%;
73
+  justify-content: space-between;
74
+  margin-top: 30rpx;
75
+}
76
+.panelItem3 .panelItem32{
77
+  font-size:24rpx;
78
+  color:#F44336;
79
+  margin: 10rpx 0 0 100rpx;
80
+  min-height: 25rpx;
81
+}
82
+
83
+.panelItem3 .selected{
84
+  width:18rpx;
85
+  height:18rpx;
86
+  background-color: #fff;
87
+  border: 6rpx solid #1e1e1e;
88
+  border-radius: 50%;
89
+  margin: 0 30rpx 0 10rpx;
90
+}
91
+.panelItem3 .selected2{
92
+  background-color: #F8F8F8;
93
+  border: 6rpx solid #D2D2D2;
94
+}
95
+
96
+.panelItem3 .selected1{
97
+  width:10rpx;
98
+  height:10rpx;
99
+  background-color: #1e1e1e;
100
+  border-radius: 50%;
101
+}
102
+
103
+.panelItem3 .panelItem1{
104
+  margin-left: 30rpx;
105
+  font-weight: 400;
106
+}
107
+
108
+.panelItem3 .panelItem2{
109
+  margin-right: 30rpx;
110
+}
111
+
112
+.text3{
113
+  width:100%;
114
+  margin: 50rpx 0 240rpx 0;
115
+  justify-content: flex-start;
116
+  font-size:24rpx;
117
+
118
+}
119
+.text31{
120
+  margin-left: 30rpx;
121
+}
122
+.text32{
123
+  color:#B3443B;
124
+  text-decoration: underline;
125
+}
126
+
127
+.panelFooter{
128
+  width:100%;
129
+  height:140rpx;
130
+  background-color: #F77706;
131
+  justify-content: space-between;
132
+  color:#fff;
133
+
134
+  position: fixed;
135
+  z-index: 100;
136
+  bottom: 0;
137
+}
138
+
139
+.panelFooter .panelFooter1{
140
+  align-items: flex-start;
141
+  margin-left: 30rpx;
142
+  font-size:24rpx;
143
+}
144
+.panelFooter .number1{
145
+  font-size:48rpx;
146
+}
147
+.panelFooter .btnPay{
148
+  font-size:48rpx;
149
+  color:#1e1e1e;
150
+  width:380rpx;
151
+  height:100rpx;
152
+  background-color: #ffdd0c;
153
+  box-shadow: 0 10rpx 1rpx #E1600A;
154
+  border-radius: 10rpx;
155
+  text-align: center;
156
+  line-height: 100rpx;
157
+  margin-right: 30rpx;
158
+}
159
+
160
+.discount{
161
+  position: absolute;
162
+  background-color: #fff;
163
+  top:0;
164
+  z-index: 200;
165
+}
166
+.discount .panel1{
167
+  width:100%;
168
+  height:93rpx;
169
+  line-height: 93rpx;
170
+  text-align: center;
171
+  font-size:24rpx;
172
+  background-color: #D2D2D2;
173
+}
174
+
175
+.discount .panel2{
176
+  width:690rpx;
177
+  border-radius: 14rpx;
178
+  background-color: #fff;
179
+  border:1rpx solid #D2D2D2;
180
+  margin-top: 40rpx;
181
+  justify-content: flex-start;
182
+}
183
+
184
+.discount .panel21{
185
+  width:150rpx;
186
+  height:179rpx;
187
+  line-height:179rpx;
188
+  border-top-left-radius: 14rpx;
189
+  border-bottom-left-radius: 14rpx;
190
+  background-color: #FFDD0C;
191
+  font-size:48rpx;
192
+  text-align: center;
193
+}
194
+
195
+.discount .panel22{
196
+  align-items: flex-start;
197
+  font-size:24rpx;
198
+  font-weight: 400;
199
+  margin-left: 30rpx;
200
+}
201
+
202
+.discount .panel221{
203
+  font-weight: 500;
204
+  margin-bottom: 20rpx;
205
+}
206
+.discount .panel222{
207
+  color:#787878;
208
+}
209
+
210
+.discount .panel3{
211
+  width:100%;
212
+  position: fixed;
213
+  bottom: 0;
214
+}
215
+.discount .line1{
216
+  width:100%;
217
+  height:20rpx;
218
+  background-color: #D2D2D2;
219
+}
220
+.discount .panel31{
221
+  width:100%;
222
+  height:110rpx;
223
+  background-color: #FFFFFF;
224
+  line-height: 110rpx;
225
+  font-size:36rpx;
226
+  font-weight: 400;
227
+  text-align: center;
228
+}
229
+
230
+.panelNull{
231
+  margin-top: 360rpx;
232
+  font-size:48rpx;
233
+  text-align: center;
234
+}
235
+.panelNull2{
236
+  margin-top: 30rpx;
237
+  font-size:24rpx;
238
+  font-weight: 400;
239
+}

+ 62 - 0
package4/main/payfinish.js

@@ -0,0 +1,62 @@
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
+    var paytype = options.paytype;
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+      Paytype: paytype
14
+    });
15
+    wx.showLoading({
16
+      title: '请勿退出',
17
+      mask:true,
18
+    }); 
19
+    setTimeout(function(){
20
+      wx.hideLoading();
21
+    },5000);
22
+
23
+    if (paytype == "4") {
24
+      wx.setStorageSync("HasActivate", 1);
25
+      app.globalData.userInfo.IsMember = 1;
26
+      app.globalData.IsLocked = 0;
27
+    }
28
+    else if (paytype=="3"){
29
+      app.globalData.userInfo.IsMember = 1;
30
+      app.globalData.IsLocked = 0;
31
+    }
32
+  }, 
33
+  gotoDefault: function() {
34
+    wx.redirectTo({
35
+      url: "../../pages/main/default",
36
+    });
37
+  },
38
+  goto: function () {
39
+    if (this.data.Paytype == "3") {
40
+      wx.redirectTo({
41
+        url: "./limited",
42
+      });
43
+    }
44
+    if (this.data.Paytype == "4") {
45
+      wx.redirectTo({
46
+        url: "./activate",
47
+      });
48
+    }
49
+    if (this.data.Paytype == "5") {
50
+      wx.redirectTo({
51
+        url: "./giftlist",
52
+      });
53
+    }
54
+  },
55
+  onShareAppMessage: function () {
56
+    return {
57
+      title: app.globalData.ShareTitle,
58
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
59
+      imageUrl: app.globalData.ShareImage,
60
+    }
61
+  },
62
+})

+ 6 - 0
package4/main/payfinish.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "微信支付",
3
+  "navigationBarBackgroundColor": "#ffffff",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#F0F0F0"
6
+}

+ 22 - 0
package4/main/payfinish.wxml

@@ -0,0 +1,22 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <image src='../images/universalpic_select_on_green_100x100.png' class="universalpic_select_on_green_100x100" />
3
+
4
+  <view class='text1'>
5
+    付款完成
6
+  </view>
7
+
8
+  <view class='text2' wx:if="{{Paytype=='3' || Paytype=='5'}}" bindtap='gotoDefault'>
9
+    前往首页
10
+  </view>
11
+
12
+  <view class='panel1 FlexRow' wx:if="{{Paytype=='4'}}">
13
+    <image src='../images/universalpic_attention_gray_50x50.png' class="universalpic_attention_gray_50x50" />
14
+    <view>套装产品必须激活才能使用</view>
15
+  </view>
16
+
17
+  <view class='footer FlexRow' bindtap='goto'>
18
+    <block wx:if="{{Paytype=='3'}}">查看使用有效期</block>
19
+    <block wx:if="{{Paytype=='4'}}">去激活</block>
20
+    <block wx:if="{{Paytype=='5'}}">查看我的礼品卡</block>
21
+  </view>
22
+</view>

+ 51 - 0
package4/main/payfinish.wxss

@@ -0,0 +1,51 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color: #1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.universalpic_select_on_green_100x100 {
8
+  width: 100rpx;
9
+  height: 100rpx;
10
+  top: 190rpx;
11
+  position: fixed;
12
+}
13
+
14
+.text1{
15
+  font-size: 64rpx;
16
+  top:320rpx;
17
+  position: fixed;
18
+}
19
+
20
+.text2{
21
+  position: fixed;
22
+  bottom:284rpx;
23
+  font-size:28rpx;
24
+  color:#B3443B;
25
+  text-decoration: underline;
26
+}
27
+
28
+.panel1{
29
+  position: fixed;
30
+  bottom:275rpx;
31
+  font-size:36rpx;
32
+  font-weight: 400;
33
+}
34
+
35
+.universalpic_attention_gray_50x50{
36
+  width: 50rpx;
37
+  height: 50rpx;
38
+  margin-right: 20rpx;
39
+}
40
+
41
+.footer{
42
+  width: 100%;
43
+  height: 140rpx;
44
+  position: fixed;
45
+  bottom: 0;
46
+  line-height: 140rpx;
47
+  font-size:48rpx;
48
+  color:#fff;
49
+  text-align: center;
50
+  background-color: #03AF69;
51
+}

+ 0 - 0
package4/main/paylist.js


Some files were not shown because too many files changed in this diff