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

+ 1 - 1
app.js

@@ -11,7 +11,7 @@ App({
11 11
     this.globalData.systemInfo = wx.getSystemInfoSync();
12 12
   },
13 13
   globalData: {
14
-    Version: "1.2.3",
14
+    Version: "1.2.4",
15 15
     IsProduction: true,
16 16
     ProgramID: 106,
17 17
     AppID: "wx313a8f2c0741efe1",

+ 1 - 0
app.json

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

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
+}

+ 1 - 0
pages/index/index.js

@@ -200,6 +200,7 @@ Page({
200 200
               }, 2000);
201 201
             });
202 202
             that.getPriceList();
203
+            wx.setStorageSync("IsShare", 0);
203 204
           }
204 205
         }
205 206
       });

+ 11 - 0
pages/main/detail.js

@@ -108,6 +108,17 @@ Page({
108 108
       }
109 109
     }
110 110
 
111
+    common.getStorageValue(this, "IsShare", 0, function () {
112
+      if (that.data.IsShare == 0
113
+        && app.globalData.userInfo.IsMember == 0
114
+        && app.globalData.IsShow == 1
115
+        && app.globalData.IsLocked == 1
116
+      ) {
117
+        wx.navigateTo({
118
+          url: '../../package4/main/share',
119
+        })
120
+      }
121
+    });
111 122
   },
112 123
   onShow: function (e) {
113 124
     if (app.globalData.IsSaveCustom) {