chengjie 2 年之前
父节点
当前提交
61f09cf015

+ 26 - 26
app.js

@@ -1,32 +1,7 @@
1 1
 //app.js
2 2
 App({
3
-  onLaunch: function (options) {
4
-    this.getSystemInfo();
5
-    if (options && options.scene) {
6
-      console.log("scene:" + options.scene);
7
-      this.globalData.userSource = options.scene;
8
-    }
9
-    if (options && options.shareTicket) {
10
-      this.globalData.shareTicket = options.shareTicket;
11
-    }
12
-  },
13
-  getSystemInfo: function () {
14
-    this.globalData.systemInfo = wx.getSystemInfoSync();
15
-    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
16
-      this.globalData.IsIOS = false;
17
-      this.globalData.IsAndroid = true;
18
-    }
19
-    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
20
-      this.globalData.IsIOS = true;
21
-      this.globalData.IsAndroid = false;
22
-    }
23
-
24
-    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
25
-      this.globalData.IsIPad = true;
26
-    }
27
-  },
28 3
   globalData: {
29
-    version: "1.1.15",
4
+    version: "1.1.19",
30 5
     IsProduction: true,
31 6
     ProgramID: 105,
32 7
     AppID: "wx1fef080f74481cbd",
@@ -56,5 +31,30 @@ App({
56 31
     IsIOS: true,
57 32
     IsAndroid: false,
58 33
     IsIPad: false,
34
+  },
35
+  onLaunch: function (options) {
36
+    this.getSystemInfo();
37
+    if (options && options.scene) {
38
+      console.log("scene:" + options.scene);
39
+      this.globalData.userSource = options.scene;
40
+    }
41
+    if (options && options.shareTicket) {
42
+      this.globalData.shareTicket = options.shareTicket;
43
+    }
44
+  },
45
+  getSystemInfo: function () {
46
+    this.globalData.systemInfo = wx.getSystemInfoSync();
47
+    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
48
+      this.globalData.IsIOS = false;
49
+      this.globalData.IsAndroid = true;
50
+    }
51
+    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
52
+      this.globalData.IsIOS = true;
53
+      this.globalData.IsAndroid = false;
54
+    }
55
+
56
+    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
57
+      this.globalData.IsIPad = true;
58
+    }
59 59
   }
60 60
 })

二进制
package4/images/pay_shoppingguide_illus_03_105.png


二进制
package4/images/pay_shoppingguide_illus_03_99.png


+ 2 - 7
package4/main/giftinfo.js

@@ -34,12 +34,7 @@ Page({
34 34
     var that=this;
35 35
     wx.getSetting({
36 36
       success(res) {
37
-        if (!res.authSetting['scope.userInfo']) {
38
-          wx.navigateTo({
39
-            url: '../../pages/main/accredit?url=giftinfo'
40
-          });
41
-        }
42
-        else {
37
+        
43 38
           wx.showModal({
44 39
             title: '慎重转发',
45 40
             content: '请勿转发到群。如误转,只能在聊天窗口中撤回(1分钟内)。',
@@ -49,7 +44,7 @@ Page({
49 44
           that.setData({
50 45
             canGive: true,
51 46
           });
52
-        }
47
+        
53 48
       }
54 49
     });
55 50
     

+ 1 - 1
package4/main/miaoguoreadme.wxml

@@ -1,6 +1,6 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <view class="text1">活动规则</view>
3
-  <text class="text2">① 本活动只针对自2021年3月??日起报名秒过的用户,在此之前报名的老用户不享受此活动优惠项目。\n
3
+  <text class="text2">① 本活动只针对自2021年3月1日起报名秒过的用户,在此之前报名的老用户不享受此活动优惠项目。\n
4 4
 ② 秒过新手培训只能报名一次,不能重复报名。\n
5 5
 ③ 符合本活动规则的有效报名是指:打开秒过小程序;支付报名费;关注秒过学习法公众号;添加班务员微信;收到班务员开班安排的通知。以上整个流程中的任何环节均不可或缺。请按系统引导信息一步步完成。\n
6 6
 ④ 有效报名可获得唱意公司旗下5款产品各20天免费有效期。产品包括:语文汉语拼音、语文识字、英语自然拼读、数学计算题、口算星球。\n

+ 2 - 9
package4/main/payfinish.js

@@ -20,10 +20,7 @@ Page({
20 20
       wx.hideLoading();
21 21
     },5000);
22 22
 
23
-    if (paytype == "4") {
24
-      wx.setStorageSync("HasActivate", 1);
25
-    }
26
-    else if (paytype=="3"){
23
+    if (paytype=="3"){
27 24
       app.globalData.userInfo.IsMember = 1;
28 25
       app.globalData.IsLocked=0;
29 26
     }
@@ -43,11 +40,7 @@ Page({
43 40
         url: "./limited?IsShowButton=1",
44 41
       });
45 42
     }
46
-    if (this.data.Paytype == "4") {
47
-      wx.redirectTo({
48
-        url: "./activate",
49
-      });
50
-    }
43
+   
51 44
     if (this.data.Paytype == "5") {
52 45
       wx.redirectTo({
53 46
         url: "./giftlist",

+ 56 - 1
package4/main/paylist.js

@@ -6,12 +6,20 @@ const app = getApp();
6 6
 Page({
7 7
   data: {
8 8
     PayList: null,
9
+    IsLogin:1,
9 10
   },
10 11
   onLoad: function (options) {
11 12
     this.setData({
12 13
       Containnerheight: common.getSystemHeight(),
13 14
     });
14
-    this.init();
15
+
16
+    if (app.globalData.userInfo)
17
+      this.init();
18
+    else{
19
+      this.setData({
20
+        IsLogin: -1,
21
+      });
22
+    }
15 23
   },
16 24
   init: function () {
17 25
     var that = this;
@@ -31,16 +39,63 @@ Page({
31 39
           }
32 40
         }
33 41
         that.setData({
42
+          IsLogin: 1,
34 43
           PayList: data,
35 44
         });
36 45
       }
37 46
       else {
38 47
         that.setData({
48
+          IsLogin: 1,
39 49
           PayList: [],
40 50
         });
41 51
       }
42 52
     });
43 53
   },
54
+  showLogin:function(){
55
+    this.setData({
56
+      IsLogin: -2,
57
+    });
58
+  },
59
+  hideLogin:function(){
60
+    this.setData({
61
+      IsLogin: -1,
62
+    });
63
+  },
64
+  onKeyInput: function (e) {
65
+    var that=this; 
66
+    that.setData({
67
+      UserName: e.detail.value
68
+    });
69
+  },
70
+  onKeyInput2: function (e) {
71
+    var that=this; 
72
+    that.setData({
73
+      UserPwd: e.detail.value
74
+    });
75
+  },
76
+  login: function () {
77
+    var that = this;
78
+
79
+    server.getData('Login20221228?UserName=' + that.data.UserName + "&UserPwd="+that.data.UserPwd+"&ProductID=" + app.globalData.ProgramID, function (data) {
80
+      if (data) {
81
+        if (data>0){
82
+            app.globalData.userInfo={};
83
+            app.globalData.userInfo.UserID=data;
84
+            that.init();
85
+        }
86
+        else {
87
+          wx.showToast({
88
+            title: '用户名或密码不正确',
89
+          });
90
+        }
91
+      }
92
+      else {
93
+        wx.showToast({
94
+          title: '登录出错',
95
+        });
96
+      }
97
+    });
98
+  },
44 99
   onShareAppMessage: function () {
45 100
     return {
46 101
       title: app.globalData.ShareTitle,

+ 18 - 0
package4/main/paylist.wxml

@@ -1,4 +1,5 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  
2 3
   <view style='height:50rpx'></view>
3 4
   <view class="panel1 FlexColumn" wx:for="{{PayList}}" wx:key="index" wx:if="{{PayList.length>0}}">
4 5
     <view class="item0 item FlexRow">
@@ -54,4 +55,21 @@
54 55
   </view>
55 56
 
56 57
   <view class='panelNull' wx:if="{{PayList.length==0}}">没有帐单</view>
58
+
59
+  <view class="panelIsLogin" wx:if="{{IsLogin==-1}}" bindtap="showLogin">
60
+    登录查看订单
61
+  </view>
62
+  
63
+  <view  wx:if="{{IsLogin==-2}}" class="panelLogin FlexColumn" style='height:{{Containnerheight}}rpx;'>
64
+    <view class="panelLogin1 FlexColumn">
65
+      <view class="text1">用户名</view>
66
+      <input class="input" bindinput="onKeyInput" value="{{UserName}}"/>
67
+      <view class="text1">密码</view>
68
+      <input class="input" password="true" bindinput="onKeyInput2" value="{{UserPwd}}"/>
69
+      <view class="panelLogin2 FlexRow">
70
+        <view class="panelLogin21" bindtap="hideLogin">取消</view>
71
+        <view class="panelLogin21" bindtap="login">登录</view>
72
+      </view>
73
+    </view>
74
+  </view>
57 75
 </view>

+ 55 - 0
package4/main/paylist.wxss

@@ -104,4 +104,59 @@
104 104
 .panelNull{
105 105
   margin-top: 462rpx;
106 106
   font-size:48rpx;
107
+}
108
+
109
+.panelIsLogin{
110
+  background: #FFFFFF;
111
+  border: 4rpx solid #E65A20;
112
+  border-radius: 20rpx;
113
+  font-size: 36rpx;
114
+  color: #E65A20;
115
+  text-align: center;
116
+  width:500rpx;
117
+  height:100rpx;
118
+  line-height: 100rpx;
119
+  margin-top: 400rpx;
120
+}
121
+
122
+.panelLogin{
123
+  width:100%;
124
+  background-color: rgba(0,0,0,0.5);
125
+  position: fixed;
126
+  top:0;
127
+}
128
+.panelLogin1{
129
+  width:560rpx;
130
+  height:577rpx;
131
+  position: fixed;
132
+  top:313rpx;
133
+  background-color: #fff;
134
+  border-radius: 8rpx;
135
+  justify-content: flex-start;
136
+}
137
+.text1{
138
+  width:480rpx;
139
+  margin-top: 60rpx;
140
+  font-size: 28rpx;
141
+}
142
+.input{
143
+  width:480rpx;
144
+  height:90rpx;
145
+  background:#FFFFFF;
146
+  border: 1rpx solid #979797;
147
+  margin-top:20rpx;
148
+  color:#1e1e1e;
149
+  padding-left: 10rpx;
150
+}
151
+
152
+.panelLogin2{
153
+  width:100%;
154
+  margin-top: 74rpx;
155
+}
156
+
157
+.panelLogin21{
158
+  width:280rpx;
159
+  text-align: center;
160
+  font-size:36rpx;
161
+  font-weight: 400;
107 162
 }

+ 23 - 16
pages/index/index.js

@@ -103,17 +103,20 @@ Page({
103 103
         } else {
104 104
           app.globalData.userInfo = data;
105 105
 
106
-          var isShow = data.IsShow;
107
-          if (isShow == -1) {
108
-            isShow = 0;
109
-          }
110
-          else {
111
-            var systemInfo = wx.getSystemInfoSync();
112
-            if (isShow == 0 && systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
113
-              isShow = 1;
114
-            }
115
-          }
116
-          app.globalData.userInfo.IsShow = isShow;
106
+          //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
107
+
108
+          // var isShow = data.IsShow;
109
+          // if (isShow == -1) {
110
+          //   isShow = 0;
111
+          // }
112
+          // else {
113
+          //   var systemInfo = wx.getSystemInfoSync();
114
+          //   if (isShow == 0 && systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
115
+          //     isShow = 1;
116
+          //   }
117
+          // }
118
+          // app.globalData.userInfo.IsShow = isShow;
119
+          app.globalData.userInfo.IsShow = data.IsShow;
117 120
 
118 121
           app.globalData.IsLocked = data.IsLocked;
119 122
 
@@ -171,11 +174,15 @@ Page({
171 174
       }
172 175
     });
173 176
 
174
-    server.getData('GetBaiduToken', function (data) {
175
-      if (data) {
176
-        app.globalData.BaiduToken = data;
177
-      }
178
-    });
177
+    //调用登录接口
178
+    wx.login({
179
+    success: function (res0) {
180
+      server.getData('GetBaiduToken20220922?ProgramID='+app.globalData.ProgramID+'&Code='+res0.code, function (data) {
181
+        if (data) {
182
+          app.globalData.BaiduToken = data;
183
+        }
184
+      });
185
+    }});
179 186
   },
180 187
   getPriceList: function () {
181 188
     var that = this;

+ 1 - 13
pages/main/default.js

@@ -79,12 +79,6 @@ Page({
79 79
       });
80 80
     }
81 81
 
82
-    if (wx.getStorageSync("HasActivate") == 1) {
83
-      wx.navigateTo({
84
-        url: '../../package4/main/activate',
85
-      });
86
-    }
87
-    
88 82
     common.getStorageValue(this, "IsMiaoguoAD", true, function () { });
89 83
 
90 84
     var miaoguoADTime = wx.getStorageSync("miaoguoADTime");
@@ -176,13 +170,7 @@ Page({
176 170
     });
177 171
   },
178 172
   gotoMemberCenter: function () {
179
-    if (app.globalData.userInfo.NickName=="陌生用户" && app.globalData.userInfo.IsShow>0) {
180
-      //请去授权
181
-      wx.navigateTo({
182
-        url: './accredit?type=accredit',
183
-      });
184
-    }
185
-    else if (app.globalData.userInfo.IsShow>0) {
173
+    if (app.globalData.userInfo.IsShow>=0) {
186 174
       wx.navigateTo({
187 175
         url: './userinfo',
188 176
       });

+ 1 - 1
pages/main/default.wxml

@@ -123,7 +123,7 @@
123 123
         -->
124 124
       </view>
125 125
     </view>
126
-    <view class="panel1 FlesColumn">
126
+    <view class="panel1 FlesColumn" wx:if="{{IsShow==1}}">
127 127
       <view class="panelOther FlexRow">
128 128
         <view class="panelOther1">其它产品</view>
129 129
         <image src='../images/home_triangle_up.png' class="home_triangle_up" />

+ 1 - 0
pages/main/userinfo.js

@@ -16,6 +16,7 @@ Page({
16 16
       ProgramID:app.globalData.ProgramID,
17 17
       IsLocked: app.globalData.IsLocked,
18 18
       IsShow: app.globalData.userInfo.IsShow,
19
+      IsIOS:app.globalData.IsIOS,
19 20
     });
20 21
   },
21 22
   goto:function(e){

+ 1 - 1
pages/main/userinfo.wxml

@@ -18,7 +18,7 @@
18 18
     </view>
19 19
   </view>
20 20
   <view class='lineFooter'></view>
21
-  <block wx:if="{{IsShow==1 && IsLocked==1}}">
21
+  <block wx:if="{{(IsShow==1 && IsLocked==1) || (IsShow<=0 && !IsIOS)}}">
22 22
     <view class="panelTitle FlexRow">
23 23
       <view class="panelTitle1">我的卡包</view>
24 24
     </view>

+ 61 - 0
project.private.config.json

@@ -0,0 +1,61 @@
1
+{
2
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
3
+  "condition": {
4
+    "miniprogram": {
5
+      "list": [
6
+        {
7
+          "name": "list",
8
+          "pathName": "pages/main/list",
9
+          "query": "id=3&name=三年级"
10
+        },
11
+        {
12
+          "name": "detail",
13
+          "pathName": "pages/main/detail",
14
+          "query": "id=187"
15
+        },
16
+        {
17
+          "name": "print",
18
+          "pathName": "pages/main/print",
19
+          "query": "id=183"
20
+        },
21
+        {
22
+          "name": "item",
23
+          "pathName": "pages/main/item",
24
+          "query": "id=46"
25
+        },
26
+        {
27
+          "name": "guide",
28
+          "pathName": "pages/main/guide",
29
+          "query": ""
30
+        },
31
+        {
32
+          "name": "login",
33
+          "pathName": "pages/about/payfinished",
34
+          "query": ""
35
+        },
36
+        {
37
+          "name": "answer",
38
+          "pathName": "pages/main/answer",
39
+          "query": ""
40
+        },
41
+        {
42
+          "name": "errorlist",
43
+          "pathName": "pages/main/errorlist",
44
+          "query": ""
45
+        },
46
+        {
47
+          "name": "share",
48
+          "pathName": "pages/about/share",
49
+          "query": ""
50
+        },
51
+        {
52
+          "name": "/package4/main/paylist",
53
+          "pathName": "/package4/main/paylist",
54
+          "query": "",
55
+          "launchMode": "default",
56
+          "scene": null
57
+        }
58
+      ]
59
+    }
60
+  }
61
+}