chengjie лет назад: 7
Родитель
Сommit
a1084ceafe
13 измененных файлов с 177 добавлено и 75 удалено
  1. 2 1
      app.js
  2. 11 1
      app.json
  3. BIN
      images/05018.png
  4. BIN
      images/06001.png
  5. BIN
      images/06005.png
  6. BIN
      images/ad1.png
  7. BIN
      images/ad2.png
  8. 75 38
      pages/about/orderlist.js
  9. 26 9
      pages/about/orderlist.wxml
  10. 22 11
      pages/about/orderlist.wxss
  11. 4 0
      pages/index/index.js
  12. 31 9
      pages/main/index.js
  13. 6 6
      project.config.json

+ 2 - 1
app.js

@@ -11,7 +11,7 @@ App({
11
     this.globalData.systemInfo = wx.getSystemInfoSync();
11
     this.globalData.systemInfo = wx.getSystemInfoSync();
12
   },
12
   },
13
   globalData: {
13
   globalData: {
14
-    Version: "1.1.11",
14
+    Version: "1.1.14",
15
     IsProduction: true,
15
     IsProduction: true,
16
     ProgramID: 106,
16
     ProgramID: 106,
17
     AppID: "wx313a8f2c0741efe1",
17
     AppID: "wx313a8f2c0741efe1",
@@ -35,5 +35,6 @@ App({
35
     IsShow: 0,
35
     IsShow: 0,
36
     NewUserNumberMax:6,//邀请新用户最大值
36
     NewUserNumberMax:6,//邀请新用户最大值
37
     IsSaveCustom:false,//是否保存了定制
37
     IsSaveCustom:false,//是否保存了定制
38
+    goto:"",//用于服务直达的跳转
38
   }
39
   }
39
 })
40
 })

+ 11 - 1
app.json

@@ -21,5 +21,15 @@
21
     "navigationBarTitleText":"语文识字",
21
     "navigationBarTitleText":"语文识字",
22
     "navigationBarTextStyle": "black",
22
     "navigationBarTextStyle": "black",
23
     "backgroundColor": "#F5E2BE"   
23
     "backgroundColor": "#F5E2BE"   
24
-  }
24
+  },
25
+  "navigateToMiniProgramAppIdList": [
26
+    "wx46a7b4c420e6d38f",
27
+    "wx1fef080f74481cbd",
28
+    "wx331e8dd070f01d0e",
29
+    "wx313a8f2c0741efe1",
30
+    "wxb54a6d5aff836ee3",
31
+    "wxa5e33c61fe37dd01",
32
+    "wxaa1a8b48d9853872",
33
+    "wx80059777521b897c"
34
+  ]
25
 }
35
 }

BIN
images/05018.png


BIN
images/06001.png


BIN
images/06005.png


BIN
images/ad1.png


BIN
images/ad2.png


+ 75 - 38
pages/about/orderlist.js

@@ -50,37 +50,50 @@ Page({
50
     if (e) {
50
     if (e) {
51
       id = e.currentTarget.dataset.id;
51
       id = e.currentTarget.dataset.id;
52
     }
52
     }
53
+
53
     var total = 0, totalFinal = 0,
54
     var total = 0, totalFinal = 0,
54
       selectCount = 0, discounts = 0;
55
       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;
56
+    var remark = "", isAll = false;
57
+    if (id == 999) {
58
+      totalFinal = "150.00";
59
+      total = 150;
60
+      remark = "4款产品永久有效期";
61
+      isAll = true;
62
+      for (var i = 0; i < this.data.ListProgram.length; i++) {
63
+        this.data.ListProgram[i].IsSelect = false;
58
       }
64
       }
65
+    }
66
+    else {
67
+      for (var i = 0; i < this.data.ListProgram.length; i++) {
68
+        if (this.data.ListProgram[i].ID == id) {
69
+          this.data.ListProgram[i].IsSelect = !this.data.ListProgram[i].IsSelect;
70
+        }
59
 
71
 
60
-      if (this.data.ListProgram[i].IsSelect) {
61
-        total += this.data.ListProgram[i].Price;
62
-        selectCount++;
72
+        if (this.data.ListProgram[i].IsSelect) {
73
+          total += this.data.ListProgram[i].Price;
74
+          selectCount++;
75
+        }
63
       }
76
       }
64
-    }
65
 
77
 
66
-    var discount = 1;
67
-    if (selectCount >= 3) {
68
-      discount = 0.7
69
-    }
70
-    else if (selectCount == 2) {
71
-      discount = 0.8
72
-    }
78
+      var discount = 1;
79
+      if (selectCount >= 3) {
80
+        discount = 0.7
81
+      }
82
+      else if (selectCount == 2) {
83
+        discount = 0.8
84
+      }
73
 
85
 
74
-    totalFinal = total * discount;
75
-    discounts = total - totalFinal;
86
+      totalFinal = total * discount;
87
+      discounts = total - totalFinal;
76
 
88
 
77
-    total = Math.round(total) / 100;
78
-    totalFinal = Math.round(totalFinal) / 100;
79
-    discounts = Math.round(discounts) / 100;
89
+      total = Math.round(total) / 100;
90
+      totalFinal = Math.round(totalFinal) / 100;
91
+      discounts = Math.round(discounts) / 100;
80
 
92
 
81
-    var remark = "一款原价,成套购买更划算";
82
-    if (discount < 1)
83
-      remark = "套装购买现享 " + (discount * 10) + " 折,已优惠 " + discounts + " 元"
93
+      remark = "一款原价,成套购买更划算";
94
+      if (discount < 1)
95
+        remark = "套装购买现享 " + (discount * 10) + " 折,已优惠 " + discounts + " 元"
96
+    }
84
 
97
 
85
     this.setData({
98
     this.setData({
86
       ListProgram: this.data.ListProgram,
99
       ListProgram: this.data.ListProgram,
@@ -88,6 +101,7 @@ Page({
88
       Remark: remark,
101
       Remark: remark,
89
       Total: total,
102
       Total: total,
90
       Discount: discount,
103
       Discount: discount,
104
+      IsAll: isAll,
91
     });
105
     });
92
 
106
 
93
   },
107
   },
@@ -98,7 +112,7 @@ Page({
98
     if (!isPaying) {
112
     if (!isPaying) {
99
       isPaying = true;
113
       isPaying = true;
100
       var that = this;
114
       var that = this;
101
-      var money = this.data.TotalFinal;
115
+      var money = Number(this.data.TotalFinal);
102
       var detail = "";
116
       var detail = "";
103
       for (var i = 0; i < this.data.ListProgram.length; i++) {
117
       for (var i = 0; i < this.data.ListProgram.length; i++) {
104
         if (this.data.ListProgram[i].IsSelect) {
118
         if (this.data.ListProgram[i].IsSelect) {
@@ -115,24 +129,47 @@ Page({
115
         });
129
         });
116
       }
130
       }
117
       else {
131
       else {
118
-        server.payMoney(4, money, detail, function (data) {
119
-          wx.setStorageSync("IsShowActivty", true);
120
-          var that = this;
121
-          wx.getSetting({
122
-            success(res) {
123
-              if (res.authSetting['scope.userInfo']) {
124
-                wx.navigateTo({
125
-                  url: '../about/payfinished?type=all',
126
-                });
132
+        if (money >= 150) {
133
+          detail = "89:3750,98:3750,99:3750,106:3750";
134
+          server.payMoney(6, money, detail, function (data) {
135
+            wx.setStorageSync("IsShowActivty", true);
136
+            var that = this;
137
+            wx.getSetting({
138
+              success(res) {
139
+                if (res.authSetting['scope.userInfo']) {
140
+                  wx.navigateTo({
141
+                    url: '../about/payfinished?type=all',
142
+                  });
143
+                }
144
+                else {
145
+                  wx.navigateTo({
146
+                    url: '../about/payfinished?type=accredit',
147
+                  });
148
+                }
127
               }
149
               }
128
-              else {
129
-                wx.navigateTo({
130
-                  url: '../about/payfinished?type=accredit',
131
-                });
150
+            });
151
+          });
152
+        }
153
+        else {
154
+          server.payMoney(4, money, detail, function (data) {
155
+            wx.setStorageSync("IsShowActivty", true);
156
+            var that = this;
157
+            wx.getSetting({
158
+              success(res) {
159
+                if (res.authSetting['scope.userInfo']) {
160
+                  wx.navigateTo({
161
+                    url: '../about/payfinished?type=all',
162
+                  });
163
+                }
164
+                else {
165
+                  wx.navigateTo({
166
+                    url: '../about/payfinished?type=accredit',
167
+                  });
168
+                }
132
               }
169
               }
133
-            }
170
+            });
134
           });
171
           });
135
-        });
172
+        }
136
       }
173
       }
137
       setTimeout(function () {
174
       setTimeout(function () {
138
         isPaying = false;
175
         isPaying = false;

+ 26 - 9
pages/about/orderlist.wxml

@@ -1,9 +1,8 @@
1
 <view class="container FlexColumn">
1
 <view class="container FlexColumn">
2
-  <view class="panel1 FlexColumn">
3
-    <image src="../../images/06005.png" class="img06005" />
4
 
2
 
5
-  </view>
6
   <view class="panel2 FlexColumn">
3
   <view class="panel2 FlexColumn">
4
+    <image src="../../images/ad1.png" class="ad1" />
5
+
7
     <view class="panelItem FlexRow" wx:for="{{ListProgram}}" wx:key="index" bindtap='selectProgram' data-id="{{item.ID}}">
6
     <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}}" />
7
       <image src="../../images/SelectYes.png" class="SelectImg" wx:if="{{item.IsSelect}}" />
9
       <image src="../../images/SelectNo.png" class="SelectImg" wx:if="{{!item.IsSelect}}" />
8
       <image src="../../images/SelectNo.png" class="SelectImg" wx:if="{{!item.IsSelect}}" />
@@ -14,26 +13,44 @@
14
         <!-- <view class="text3" wx:if="{{item.Remark2}}">{{item.Remark2}}</view> -->
13
         <!-- <view class="text3" wx:if="{{item.Remark2}}">{{item.Remark2}}</view> -->
15
       </view>
14
       </view>
16
     </view>
15
     </view>
16
+
17
+    <image src="../../images/ad2.png" class="ad1" />
18
+
19
+    <view class="panelItem FlexRow" bindtap='selectProgram' data-id="{{999}}">
20
+      <image src="../../images/SelectYes.png" class="SelectImg" wx:if="{{IsAll}}" />
21
+      <image src="../../images/SelectNo.png" class="SelectImg" wx:if="{{!IsAll}}" />
22
+      <view class="img060090 FlexRow">
23
+        <image src="../../images/06009.png" class="img060091" />
24
+        <image src="../../images/06006.png" class="img060091" />
25
+        <image src="../../images/06007.png" class="img060091" />
26
+        <image src="../../images/06008.png" class="img060091" />
27
+      </view>
28
+      <view class="text FlexColumn">
29
+        <view class="text1">4款产品</view>
30
+        <view class="text2">永久有效期</view>
31
+      </view>
32
+    </view>
33
+
17
     <view class="text0 FlexRow" bindtap='gotoFeedback'>
34
     <view class="text0 FlexRow" bindtap='gotoFeedback'>
18
       <view>如遇支付问题请</view>
35
       <view>如遇支付问题请</view>
19
       <view class="red">联系客服</view>
36
       <view class="red">联系客服</view>
20
       <view>为您处理</view>
37
       <view>为您处理</view>
21
     </view>
38
     </view>
22
-     <view style='width:100%;height:500rpx;' >
23
-    </view> 
39
+    <view style='width:100%;height:300rpx;'>
40
+    </view>
24
   </view>
41
   </view>
25
 
42
 
26
   <view class="bottom FlexColumn">
43
   <view class="bottom FlexColumn">
27
-    
44
+
28
     <view class="bottom1 FlexColumn">
45
     <view class="bottom1 FlexColumn">
29
       <view class="top FlexRow" wx:if="{{Total>0}}">
46
       <view class="top FlexRow" wx:if="{{Total>0}}">
30
         <view class="left">
47
         <view class="left">
31
           {{TotalFinal}}元
48
           {{TotalFinal}}元
32
         </view>
49
         </view>
33
         <view class="right FlexColumn">
50
         <view class="right FlexColumn">
34
-          <view class="text3 text2 FlexRow">原价
51
+          <view class="text3 text2 FlexRow" wx:if="{{Total<150}}">原价
35
             <view class="total">{{Total}}</view> 元</view>
52
             <view class="total">{{Total}}</view> 元</view>
36
-           <view class="text2">{{Remark}}</view> 
53
+          <view class="text2">{{Remark}}</view>
37
         </view>
54
         </view>
38
       </view>
55
       </view>
39
       <view class="top FlexRow" wx:if="{{Total==0}}">
56
       <view class="top FlexRow" wx:if="{{Total==0}}">
@@ -45,7 +62,7 @@
45
           <view class="text2">请选择商品</view>
62
           <view class="text2">请选择商品</view>
46
         </view>
63
         </view>
47
       </view>
64
       </view>
48
-      <view class="btn" bindtap="getPay" wx:if="{{Total>0}}" >
65
+      <view class="btn" bindtap="getPay" wx:if="{{Total>0}}">
49
         <view class="btn1">立即购买</view>
66
         <view class="btn1">立即购买</view>
50
       </view>
67
       </view>
51
       <view class="btn5 btn" wx:if="{{Total==0}}">
68
       <view class="btn5 btn" wx:if="{{Total==0}}">

+ 22 - 11
pages/about/orderlist.wxss

@@ -4,22 +4,17 @@
4
   color: #1e1e1e;
4
   color: #1e1e1e;
5
   font-weight:500;
5
   font-weight:500;
6
 }
6
 }
7
-
8
-.panel1{
7
+.panel2{
9
   width: 100%;
8
   width: 100%;
9
+  background-color: #f0f0f0;
10
   justify-content: flex-start;
10
   justify-content: flex-start;
11
-  
12
 }
11
 }
13
-.panel1 .img06005{
12
+
13
+.ad1{
14
   width:100%;
14
   width:100%;
15
-  height:81rpx;
15
+  height:146rpx;
16
 }
16
 }
17
 
17
 
18
-.panel2{
19
-  width: 100%;
20
-  background-color: #f0f0f0;
21
-  justify-content: flex-start;
22
-}
23
 .panel2 .panelItem{
18
 .panel2 .panelItem{
24
   width: 100%;
19
   width: 100%;
25
   min-height:160rpx;
20
   min-height:160rpx;
@@ -34,13 +29,29 @@
34
   margin-left: 40rpx;
29
   margin-left: 40rpx;
35
   margin-top: 60rpx;
30
   margin-top: 60rpx;
36
 }
31
 }
32
+
37
 .panel2 .img06009{
33
 .panel2 .img06009{
38
   width: 80rpx;
34
   width: 80rpx;
39
   height:80rpx;
35
   height:80rpx;
40
   margin-left: 50rpx;
36
   margin-left: 50rpx;
41
   margin-top: 40rpx;
37
   margin-top: 40rpx;
38
+  align-items: flex-start;
39
+  justify-content: flex-start;
40
+}
41
+.panel2 .img060090{
42
+  width: 80rpx;
43
+  height:60rpx;
44
+  margin-left: 50rpx;
45
+  margin-top: 45rpx;
46
+  align-items: flex-start;
47
+  justify-content: flex-start;
48
+  flex-wrap: wrap;
49
+}
50
+.panel2 .img060091{
51
+  width: 30rpx;
52
+  height:30rpx;
53
+  margin: 0 10rpx 10rpx 0;
42
 }
54
 }
43
-
44
 .panel2 .text{
55
 .panel2 .text{
45
   margin-left: 30rpx;
56
   margin-left: 30rpx;
46
   align-items: flex-start;
57
   align-items: flex-start;

+ 4 - 0
pages/index/index.js

@@ -18,6 +18,10 @@ Page({
18
         console.log("UserID:" + options.UserID);
18
         console.log("UserID:" + options.UserID);
19
         app.globalData.introducer = options.UserID;
19
         app.globalData.introducer = options.UserID;
20
       }
20
       }
21
+      if (options.goto) {
22
+        console.log("goto:" + options.goto);
23
+        app.globalData.goto = options.goto;
24
+      }
21
       if (options.SourceID) {
25
       if (options.SourceID) {
22
         console.log("SourceID:" + options.SourceID);
26
         console.log("SourceID:" + options.SourceID);
23
         app.globalData.SourceID = options.SourceID;
27
         app.globalData.SourceID = options.SourceID;

+ 31 - 9
pages/main/index.js

@@ -75,13 +75,24 @@ Page({
75
         url: '../about/paylist',
75
         url: '../about/paylist',
76
       });
76
       });
77
     }
77
     }
78
-    else{
79
-      var IsRemindTest = wx.getStorageSync("IsRemindTest");
80
-      if (IsRemindTest == 1) {
81
-        wx.setStorageSync('IsRemindTest', 2);
78
+    else {
79
+      if (app.globalData.goto) {
80
+        var url = "../main/list?id=1";
81
+        if (app.globalData.goto == "test")
82
+          url = '../main/test';
82
         wx.navigateTo({
83
         wx.navigateTo({
83
-          url: '../main/test',
84
+          url: url,
84
         });
85
         });
86
+        app.globalData.goto = "";
87
+      }
88
+      else{
89
+        var IsRemindTest = wx.getStorageSync("IsRemindTest");
90
+        if (IsRemindTest == 1) {
91
+          wx.setStorageSync('IsRemindTest', 2);
92
+          wx.navigateTo({
93
+            url: '../main/test',
94
+          });
95
+        }
85
       }
96
       }
86
     }
97
     }
87
   },
98
   },
@@ -263,10 +274,21 @@ Page({
263
         else
274
         else
264
           app.globalData.DayNumber = data.DayNumber;
275
           app.globalData.DayNumber = data.DayNumber;
265
 
276
 
266
-        if (data.IsShow)
267
-          app.globalData.IsShow = data.IsShow;
268
-        else
269
-          app.globalData.IsShow = 0;
277
+        var isShow = data.IsShow;
278
+        if (isShow==-1){
279
+          isShow=0;
280
+        }
281
+        else{
282
+          var systemInfo = wx.getSystemInfoSync();
283
+          if (isShow == 0 && systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
284
+            isShow = 1;
285
+          }
286
+        }
287
+        
288
+        app.globalData.IsShow = isShow;
289
+        that.setData({
290
+          IsShow: isShow,
291
+        });
270
 
292
 
271
         app.globalData.userInfo.IsMember = data.IsMember;
293
         app.globalData.userInfo.IsMember = data.IsMember;
272
 
294
 

+ 6 - 6
project.config.json

@@ -58,15 +58,15 @@
58
 				},
58
 				},
59
 				{
59
 				{
60
 					"id": -1,
60
 					"id": -1,
61
-					"name": "复习",
62
-					"pathName": "pages/main/review",
61
+					"name": "定单列表",
62
+					"pathName": "pages/about/orderlist",
63
 					"query": ""
63
 					"query": ""
64
 				},
64
 				},
65
 				{
65
 				{
66
-					"id": -1,
67
-					"name": "\b测试",
68
-					"pathName": "pages/main/test",
69
-					"query": ""
66
+					"id": 5,
67
+					"name": "服务直达",
68
+					"pathName": "pages/index/index",
69
+					"query": "goto=1"
70
 				}
70
 				}
71
 			]
71
 			]
72
 		}
72
 		}