chengjie лет назад: 6
Родитель
Сommit
644e6378c4

+ 2 - 2
app.js

@@ -14,14 +14,14 @@ App({
14 14
     this.globalData.systemInfo = wx.getSystemInfoSync();
15 15
   },
16 16
   globalData: {
17
-    version: "1.1.3",
17
+    version: "1.1.5",
18 18
     IsProduction: true,
19 19
     ProgramID: 105,
20 20
     AppID: "wx1fef080f74481cbd",
21 21
     ProgramName: "数学计算题",
22 22
     ShareTitle: "认真练习,告别粗心",
23 23
     SharePath: "pages/index/index",
24
-    ShareImageUrl: '../../pages/images/programsystem_screenshot_pic01.png',
24
+    ShareImage: '../../pages/images/programsystem_screenshot_pic01.png',
25 25
 
26 26
     fileUrl: "https://math-1253256735.file.myqcloud.com/",
27 27
     serverUrl: "https://www.kylx365.com/apiData/",

+ 1 - 0
app.json

@@ -47,6 +47,7 @@
47 47
         "main/coupon",
48 48
         "main/limited",
49 49
         "main/invite",
50
+        "main/share",
50 51
         "main/list"
51 52
       ]
52 53
     }

BIN
package4/images/program_share_footer.png


+ 45 - 0
package4/main/share.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
+    PayList: null,
9
+  },
10
+  onLoad: function (options) {
11
+    this.setData({
12
+      Containnerheight: common.getSystemHeight(),
13
+      IsShowShare:true,
14
+    });
15
+
16
+    var that=this;
17
+    server.getData('GetShareText500?Version=' + app.globalData.Version + '&ProgramID=' + app.globalData.ProgramID, function (data) {
18
+      if (data) {
19
+        that.setData({
20
+          Data: data,
21
+        });
22
+      }
23
+    });
24
+  },
25
+  onClose:function(e){
26
+    if (e.currentTarget.dataset.id==1){
27
+      wx.setStorageSync("IsShare", 1);
28
+    }
29
+    wx.navigateBack({
30
+      delta: 1
31
+    });
32
+  },
33
+  onClose2: function () {
34
+    this.setData({
35
+      IsShowShare:false,
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/share.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "分享",
3
+  "navigationBarBackgroundColor": "#99607C",
4
+  "navigationBarTextStyle": "white",
5
+  "backgroundColor": "#99607C"
6
+}

+ 39 - 0
package4/main/share.wxml

@@ -0,0 +1,39 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="btn1 FlexColumn">
3
+    <block wx:if="{{IsShowShare}}">
4
+      <view class='panel10 FlexRow'>
5
+        <view class='line2'></view>
6
+        <view class='panel101 FlexColumn'>
7
+          <view class='text1'>{{Data.text1}}</view>
8
+          <view class='text2'>{{Data.text2}}</view>
9
+        </view>
10
+      </view>
11
+      <view class='line'></view>
12
+      <view class='panel11 FlexRow'>
13
+        <view class='panel111' bindtap='onClose' data-id="0">
14
+          {{Data.text3}}
15
+        </view>
16
+        <view class='line1'></view>
17
+        <button class='panel112 panel111' open-type='share' bindtap="onClose2">
18
+          {{Data.text4}}
19
+        </button>
20
+      </view>
21
+    </block>
22
+
23
+    <block wx:if="{{!IsShowShare}}">
24
+      <view class='panel10 FlexRow'>
25
+        <view class='line2'></view>
26
+        <view class='panel101 FlexColumn'>
27
+          <view class='text1'>感谢</view>
28
+          <view class='text2'>让朋友认识我们</view>
29
+        </view>
30
+      </view>
31
+      <view class='panel11 FlexRow'>
32
+        <view class='panel1111 panel111' bindtap='onClose'  data-id="1">
33
+          开始使用
34
+        </view>
35
+      </view>
36
+    </block>
37
+  </view>
38
+  <image src='../images/program_share_footer.png' class="program_share_footer" />
39
+</view>

+ 92 - 0
package4/main/share.wxss

@@ -0,0 +1,92 @@
1
+.container {
2
+  background-color: #99607C;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+}
6
+
7
+.btn1{
8
+  width:610rpx;
9
+  height:372rpx;
10
+  margin-top: 212rpx;
11
+  background-color: #FFD48B;
12
+  border-radius: 14rpx;
13
+  box-shadow: 0 20rpx 1rpx #67453C;
14
+  justify-content: flex-end;
15
+}
16
+
17
+.panel10{
18
+  width:100%;
19
+  margin-bottom: 53rpx;
20
+  justify-content: flex-start;
21
+}
22
+
23
+
24
+.line2{
25
+  margin-left: 50rpx;
26
+  width:16rpx;
27
+  height:140rpx;
28
+  background-color: #EC4C56;
29
+}
30
+
31
+.panel101{
32
+  align-items: flex-start;
33
+  margin-left: 30rpx;
34
+}
35
+
36
+.text1{
37
+  font-size: 64rpx;
38
+}
39
+.text2{
40
+  font-size: 48rpx;
41
+}
42
+
43
+.line{
44
+  width:100%;
45
+  height:2rpx;
46
+  background-color: #E4B06C;
47
+}
48
+.panel11{
49
+  font-size:36rpx;
50
+  width: 610rpx;
51
+  background-color: #FEC579;
52
+  justify-content: space-between;
53
+  border-bottom-left-radius: 10rpx;
54
+  border-bottom-right-radius: 10rpx;
55
+}
56
+
57
+.panel111{
58
+  width: 304rpx;
59
+  height:120rpx;
60
+  line-height: 120rpx;
61
+  text-align: center;
62
+  background-color: #FEC579;
63
+  border-bottom-left-radius: 14rpx;
64
+}
65
+
66
+
67
+.panel1111{
68
+  width: 100%;
69
+}
70
+
71
+.line1{
72
+  width:2rpx;
73
+  height:60rpx;
74
+  background-color: #E4B06C;
75
+}
76
+
77
+.panel112{
78
+  border-bottom-left-radius: 0;
79
+  border-bottom-right-radius: 14rpx;
80
+  padding-right: 0;
81
+}
82
+
83
+.panel112::after {
84
+  border: 0px;
85
+}
86
+
87
+.program_share_footer{
88
+  width:100%;
89
+  height:440rpx;
90
+  position: fixed;
91
+  bottom: 0;
92
+}

+ 2 - 1
pages/index/index.js

@@ -191,6 +191,7 @@ Page({
191 191
               }, 2000);
192 192
             }
193 193
             that.getPriceList();
194
+            wx.setStorageSync("IsShare", 0);
194 195
           });
195 196
         }
196 197
       });
@@ -264,7 +265,7 @@ Page({
264 265
     return {
265 266
       title: app.globalData.ShareTitle,
266 267
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
267
-      imageUrl: app.globalData.ShareImageUrl,
268
+      imageUrl: app.globalData.ShareImage,
268 269
     }
269 270
   },
270 271
 })

+ 1 - 1
pages/main/answer.js

@@ -139,7 +139,7 @@ Page({
139 139
     return {
140 140
       title: app.globalData.ShareTitle,
141 141
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
142
-      imageUrl: app.globalData.ShareImageUrl,
142
+      imageUrl: app.globalData.ShareImage,
143 143
     }
144 144
   },
145 145
 })

+ 1 - 1
pages/main/default.js

@@ -208,7 +208,7 @@ Page({
208 208
     return {
209 209
       title: app.globalData.ShareTitle,
210 210
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
211
-      imageUrl: app.globalData.ShareImageUrl,
211
+      imageUrl: app.globalData.ShareImage,
212 212
     }
213 213
   },
214 214
 })

+ 13 - 1
pages/main/detail.js

@@ -61,6 +61,18 @@ Page({
61 61
       });
62 62
     }
63 63
 
64
+    common.getStorageValue(this, "IsShare", 0, function () {
65
+      if (that.data.IsShare == 0
66
+        && app.globalData.userInfo.IsMember == 0
67
+        && app.globalData.IsShow == 1
68
+        && app.globalData.IsLocked == 1
69
+      ) {
70
+        wx.navigateTo({
71
+          url: '../../package4/main/share',
72
+        })
73
+      }
74
+    });
75
+
64 76
   },
65 77
   onShow: function() {
66 78
     if (this.data.ID == -1)
@@ -716,7 +728,7 @@ Page({
716 728
     return {
717 729
       title: app.globalData.ShareTitle,
718 730
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
719
-      imageUrl: app.globalData.ShareImageUrl,
731
+      imageUrl: app.globalData.ShareImage,
720 732
     }
721 733
   },
722 734
 })

+ 1 - 1
pages/main/help.js

@@ -38,7 +38,7 @@ Page({
38 38
     return {
39 39
       title: app.globalData.ShareTitle,
40 40
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
41
-      imageUrl: app.globalData.ShareImageUrl,
41
+      imageUrl: app.globalData.ShareImage,
42 42
     }
43 43
   },
44 44
 });

+ 1 - 1
pages/main/item.js

@@ -314,7 +314,7 @@ Page({
314 314
     return {
315 315
       title: app.globalData.ShareTitle,
316 316
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
317
-      imageUrl: app.globalData.ShareImageUrl,
317
+      imageUrl: app.globalData.ShareImage,
318 318
     }
319 319
   },
320 320
 })

+ 1 - 1
pages/main/list.js

@@ -156,7 +156,7 @@ Page({
156 156
     return {
157 157
       title: app.globalData.ShareTitle,
158 158
       path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
159
-      imageUrl: app.globalData.ShareImageUrl,
159
+      imageUrl: app.globalData.ShareImage,
160 160
     }
161 161
   },
162 162
 })