chengjie před 6 roky
rodič
revize
92402dcb6c

+ 3 - 2
app.js

@@ -26,8 +26,8 @@ App({
26 26
     }
27 27
   },
28 28
   globalData: {
29
-    version: "1.1.7",
30
-    IsProduction: true,
29
+    version: "1.1.9",
30
+    IsProduction: false,
31 31
     ProgramID: 105,
32 32
     AppID: "wx1fef080f74481cbd",
33 33
     ProgramName: "数学计算题",
@@ -40,6 +40,7 @@ App({
40 40
     serverUrlServer: "https://www.kylx365.com/apiData/",
41 41
     serverUrlLocalhost: "http://localhost:3020/apiData/",
42 42
     audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=4&spd=6&pit=5",
43
+    uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
43 44
     Key: "kylx365_chengjie",
44 45
     IV: "kylx365hongliren",
45 46
     

+ 3 - 1
app.json

@@ -28,7 +28,8 @@
28 28
     "wxb54a6d5aff836ee3",
29 29
     "wxa5e33c61fe37dd01",
30 30
     "wxaa1a8b48d9853872",
31
-    "wx80059777521b897c"
31
+    "wx80059777521b897c",
32
+    "wx84b3feac6069eec3"
32 33
   ],
33 34
   "subPackages": [
34 35
     {
@@ -48,6 +49,7 @@
48 49
         "main/limited",
49 50
         "main/invite",
50 51
         "main/share",
52
+        "main/newuser",
51 53
         "main/list"
52 54
       ]
53 55
     }

+ 59 - 0
package4/main/newuser.js

@@ -0,0 +1,59 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+var app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    PanelShow: 0,
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+  },
11
+  onLoad: function (options) {
12
+    var that = this;
13
+    that.setData({
14
+      Containnerheight: common.getSystemHeight(),
15
+    });
16
+    that.init();
17
+
18
+    wx.setNavigationBarColor({
19
+      frontColor: "#ffffff",
20
+      backgroundColor: "#9BD41C",
21
+    });
22
+
23
+  },
24
+  init: function () {
25
+    var that = this;
26
+    main.getData("GetClassList?Flag=0", function (data) {
27
+      if (data && data.length>0) {
28
+        that.setData({
29
+          StartDate: common.formatDateCHS(data[0].StartDate),
30
+        })
31
+      }
32
+    });
33
+  },
34
+  gotoPanel2:function(){
35
+      this.setData({
36
+        PanelShow:1,
37
+      })
38
+  },
39
+  copyManager: function () {
40
+    wx.setClipboardData({
41
+      data: "秒过学习法",
42
+      success(res) {
43
+        wx.showModal({
44
+          title: '已复制',
45
+          showCancel: false,
46
+          content: "请在微信添加公众号中长按粘贴。",
47
+          confirmText: "知道了",
48
+        });
49
+      }
50
+    });
51
+  },
52
+  onShareAppMessage: function () {
53
+    return {
54
+      title: app.globalData.ShareTitle,
55
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
56
+      imageUrl: app.globalData.ShareImage,
57
+    }
58
+  },
59
+})

+ 5 - 0
package4/main/newuser.json

@@ -0,0 +1,5 @@
1
+{
2
+  "navigationBarTitleText": "秒过学习法",
3
+  "navigationBarBackgroundColor": "#9BD41C",
4
+  "navigationBarTextStyle": "white"
5
+}

+ 31 - 0
package4/main/newuser.wxml

@@ -0,0 +1,31 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+
3
+  <block wx:if="{{PanelShow==0}}">
4
+    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c01.png' />
5
+    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c02.png' />
6
+    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c03.png' />
7
+    <view class="panelBottom FlexRow">
8
+      <view class="panelBottom1 FlexColumn" wx:if="{{!StartDate}}">
9
+        <view class='text7'>16天手把手</view>
10
+        <view class='text8'>还您上手新方法</view>
11
+      </view>
12
+      <view class="panelBottom1 FlexColumn" wx:if="{{StartDate}}">
13
+        <view class='text7'>近期开班时间</view>
14
+        <view class='text8'>{{StartDate}}</view>
15
+      </view>
16
+      <view class="btn2 FlexColumn" bindtap="gotoPanel2">
17
+        去报名
18
+      </view>
19
+    </view>
20
+    <view style="height:140rpx;"></view>
21
+  </block>
22
+  <block wx:if="{{PanelShow==1}}">
23
+    <view class='text1'>报名步骤</view>
24
+    <view class='text2'>第一步</view>
25
+    <text class='text3'>手动关注公众号《秒过学习法》</text>
26
+
27
+    <view class="btn" bindtap='copyManager'>复制公众号名称</view>
28
+    <view class='text4'>第二步</view>
29
+    <view class='text3'>关注后点击“开通新手包”</view>
30
+  </block>
31
+</view>

+ 78 - 0
package4/main/newuser.wxss

@@ -0,0 +1,78 @@
1
+.container{
2
+  background-color: #ffffff;
3
+  color:#1E1E1E;
4
+}
5
+
6
+.img{
7
+  width:100%;
8
+}
9
+
10
+
11
+.panelBottom{
12
+  width:100%;
13
+  height:140rpx;
14
+  position: fixed;
15
+  bottom: 0;
16
+  background-color: #329468;
17
+  z-index: 10;
18
+  justify-content: space-between;
19
+}
20
+
21
+.panelBottom1{
22
+  margin-left: 30rpx;
23
+  color:#fff;
24
+  align-items: flex-start;
25
+}
26
+
27
+.text7{
28
+  font-size:24rpx;
29
+}
30
+
31
+.text8{
32
+  font-size:36rpx;
33
+}
34
+
35
+
36
+.text1{
37
+  margin: 200rpx 0 0 0;
38
+  font-size:64rpx;
39
+  color:#329468;
40
+}
41
+.text2{
42
+  margin: 10rpx 0 0 0;
43
+  font-size:36rpx;
44
+}
45
+.text3{
46
+  font-size:28rpx;
47
+  font-weight: 400;
48
+}
49
+
50
+.btn{
51
+  font-size:36rpx;
52
+  width:520rpx;
53
+  height:90rpx;
54
+  border-radius: 10rpx;
55
+  text-align: center;
56
+  line-height: 90rpx;
57
+  color:#fff;
58
+  background-color: #329468;
59
+  margin-top: 30rpx;
60
+}
61
+
62
+.btn2{
63
+  font-size:48rpx;
64
+  width:380rpx;
65
+  height:100rpx;
66
+  border-radius: 10rpx;
67
+  text-align: center;
68
+  line-height: 100rpx;
69
+  color:#1E1E1E;
70
+  background-color: #FFDD0C;
71
+  margin-right: 30rpx;
72
+}
73
+
74
+.text4{
75
+  margin: 60rpx 0 0 0;
76
+  font-size:36rpx;
77
+}
78
+

+ 1 - 0
package4/main/payfinish.js

@@ -25,6 +25,7 @@ Page({
25 25
     }
26 26
     else if (paytype=="3"){
27 27
       app.globalData.userInfo.IsMember = 1;
28
+      app.globalData.IsLocked=0;
28 29
     }
29 30
   }, 
30 31
   onUnload: function () {

binární
pages/images/homepage_banner.png


binární
pages/images/product_icon_mg_70x70.png


+ 1 - 1
pages/index/index.js

@@ -152,7 +152,7 @@ Page({
152 152
               isShow = 1;
153 153
             }
154 154
           }
155
-          app.globalData.IsShow = isShow;
155
+          app.globalData.userInfo.IsShow = isShow;
156 156
 
157 157
           app.globalData.IsLocked = data.IsLocked;
158 158
 

+ 8 - 1
pages/main/default.js

@@ -64,12 +64,13 @@ Page({
64 64
     this.setData({
65 65
       AnswerLength: answerLength,
66 66
       ErrorCount: errorCount,
67
+      IsShow:app.globalData.userInfo.IsShow,
67 68
     });
68 69
 
69 70
     var that = this;
70 71
     wx.getSetting({
71 72
       success(res) {
72
-        if (res.authSetting['scope.userInfo']) {
73
+        if (res.authSetting['scope.userInfo'] || app.globalData.userInfo.IsShow <= 0) {
73 74
           that.setData({
74 75
             IsAccredit: true,
75 76
           });
@@ -112,6 +113,12 @@ Page({
112 113
 
113 114
     this.closeHelp();
114 115
   },
116
+  goto: function (e) {
117
+    var url = e.currentTarget.dataset.url;
118
+    wx.navigateTo({
119
+      url: url
120
+    });
121
+  },
115 122
   gotoHelp: function () {
116 123
     wx.redirectTo({
117 124
       url: '../main/help',

+ 1 - 1
pages/main/default.wxml

@@ -76,7 +76,7 @@
76 76
         </view>
77 77
         <image class="universalpic_line_zigzag_brown_down" src="../images/universalpic_line_zigzag_brown_down.png" />
78 78
 
79
-        <image src='../images/homepage_banner.png' class="homepage_banner" bindtap='switchProgram' data-appid='{{ProgramList[0].appId}}' data-path='{{ProgramList[0].path}}' />
79
+        <image wx:if="{{IsShow==1}}" src='../images/homepage_banner.png' class="homepage_banner" bindtap='goto' data-url="../../package4/main/newuser" />
80 80
 
81 81
         <image class="universalpic_line_zigzag_brown_up" src="../images/universalpic_line_zigzag_brown_up.png" />
82 82
         <view class="panel003 circularBottom FlexColumn">

+ 1 - 1
pages/main/default.wxss

@@ -119,7 +119,7 @@
119 119
 
120 120
 .homepage_banner{
121 121
    width:100%;
122
-   height:270rpx;
122
+   height: 360rpx;
123 123
 }
124 124
 
125 125
 .universalpic_line_zigzag_brown_up {

+ 1 - 1
pages/main/detail.js

@@ -64,7 +64,7 @@ Page({
64 64
     common.getStorageValue(this, "IsShare", 0, function () {
65 65
       if (that.data.IsShare == 0
66 66
         && app.globalData.userInfo.IsMember == 0
67
-        && app.globalData.IsShow == 1
67
+        && app.globalData.userInfo.IsShow == 1
68 68
         && app.globalData.IsLocked == 1
69 69
       ) {
70 70
         wx.navigateTo({

+ 1 - 1
pages/main/list.js

@@ -109,7 +109,7 @@ Page({
109 109
             if (SelectID == data[i].List[k].ID)
110 110
               data[i].List[k].Select = true;
111 111
 
112
-            if (k > 0 && app.globalData.IsShow == 1 && app.globalData.IsLocked==1 && app.globalData.userInfo.IsMember==0) {
112
+            if (k > 0 && app.globalData.userInfo.IsShow == 1 && app.globalData.IsLocked==1 && app.globalData.userInfo.IsMember==0) {
113 113
               data[i].List[k].IsLocked = true;
114 114
               data[i].List[k].LockCSS = "desaturate";
115 115
             }

+ 1 - 1
pages/main/userinfo.js

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

+ 18 - 0
utils/main.js

@@ -226,6 +226,17 @@ function getDifficulty(num) {
226 226
 }
227 227
 function getProgramList() {
228 228
   return [
229
+    {
230
+      ID: 166,
231
+      Name: "秒过学习",
232
+      Name2: "家长帮助孩子快速提高学习成绩",
233
+      ImageUrl: "product_icon_mg_70x70.png",
234
+      appId: 'wx84b3feac6069eec3',
235
+      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
236
+      IsShow: true,
237
+      IsShow2: true,
238
+      Category: "",
239
+    },
229 240
     {
230 241
       ID: 164,
231 242
       Name: "口算",
@@ -298,6 +309,13 @@ function getProgramList() {
298 309
 
299 310
 function getProgramListOld() {
300 311
   return [
312
+    {
313
+      ID: 166,
314
+      Name: "秒过学习",
315
+      appId: 'wx84b3feac6069eec3',
316
+      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
317
+      imageName: "product_icon_mg_70x70",
318
+    },
301 319
     {
302 320
       id: 164,
303 321
       Name:"口算星球",