1
|
-
|
|
|
2
|
-
|
|
|
3
|
- var tipMessage = $('#tipMessage').html();
|
|
|
4
|
- var activityID = $('#activityID').html();
|
|
|
5
|
- $('#phone').bind('input propertychange', function() {
|
|
|
6
|
- if ($(this).val().length === 11) {
|
|
|
7
|
- $('.input-content div').eq('0').addClass('verification-code');
|
|
|
8
|
- } else {
|
|
|
9
|
- $('.input-content div').eq('0').removeClass();
|
|
|
10
|
- if ($(this).val().length >= 1) {
|
|
|
11
|
- $('.input-content i').eq('0').removeClass('hidden');
|
|
|
12
|
- } else {
|
|
|
13
|
- $('.input-content i').eq('0').addClass('hidden');
|
|
|
14
|
- }
|
|
|
15
|
- }
|
|
|
16
|
- });
|
|
|
17
|
- $('#verification').bind('input propertychange', function() {
|
|
|
18
|
- if ($(this).val().length === 4) {
|
|
|
19
|
- $('.input-content div').eq('1').addClass('get');
|
|
|
20
|
- } else {
|
|
|
21
|
- $('.input-content div').eq('1').removeClass();
|
|
|
22
|
- if ($(this).val().length >= 1) {
|
|
|
23
|
- $('.input-content i').eq('1').removeClass('hidden');
|
|
|
24
|
- } else {
|
|
|
25
|
- $('.input-content i').eq('1').addClass('hidden');
|
|
|
26
|
- }
|
|
|
27
|
- }
|
|
|
28
|
- });
|
|
|
29
|
-
|
|
|
30
|
- if ($('#activityEnded').html()) {
|
|
|
31
|
- $('.tip-wrap').removeClass('hidden');
|
|
|
32
|
- $('.tip-wrap .title').html(tipMessage);
|
1
|
+var tipMessage = $('#tipMessage').html();
|
|
|
2
|
+var activityID = $('#activityID').html();
|
|
|
3
|
+$('#phone').bind('input propertychange', function() {
|
|
|
4
|
+ if ($(this).val().length === 11) {
|
|
|
5
|
+ $('.input-content div').eq('0').addClass('verification-code');
|
|
|
6
|
+ } else {
|
|
|
7
|
+ $('.input-content div').eq('0').removeClass();
|
|
|
8
|
+ if ($(this).val().length >= 1) {
|
|
|
9
|
+ $('.input-content i').eq('0').removeClass('hidden');
|
|
|
10
|
+ } else {
|
|
|
11
|
+ $('.input-content i').eq('0').addClass('hidden');
|
33
|
}
|
12
|
}
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
- function showToast(messages, time) {
|
|
|
37
|
- $('#dialog').removeClass('hidden');
|
|
|
38
|
- $('.mask').removeClass('hidden');
|
|
|
39
|
- $('#dialog .content').html('<p class="phone-error">' + messages + '<p>');
|
|
|
40
|
- setTimeout(function() {
|
|
|
41
|
- $('.messages').addClass('hidden');
|
|
|
42
|
- $('.mask').addClass('hidden');
|
|
|
43
|
- $('#dialog .content').html(' ');
|
|
|
44
|
- }, time);
|
13
|
+ }
|
|
|
14
|
+});
|
|
|
15
|
+$('#verification').bind('input propertychange', function() {
|
|
|
16
|
+ if ($(this).val().length === 4) {
|
|
|
17
|
+ $('.input-content div').eq('1').addClass('get');
|
|
|
18
|
+ } else {
|
|
|
19
|
+ $('.input-content div').eq('1').removeClass();
|
|
|
20
|
+ if ($(this).val().length >= 1) {
|
|
|
21
|
+ $('.input-content i').eq('1').removeClass('hidden');
|
|
|
22
|
+ } else {
|
|
|
23
|
+ $('.input-content i').eq('1').addClass('hidden');
|
45
|
}
|
24
|
}
|
46
|
-
|
|
|
47
|
- $(function(){
|
|
|
48
|
-
|
|
|
49
|
- $.ajax({
|
|
|
50
|
- url: '/activity/tencentMkt/TencentMktController/getActivityInfo',
|
|
|
51
|
- data: {
|
|
|
52
|
- activityCode: activityCode
|
|
|
53
|
- },
|
|
|
54
|
- success: function(data) {
|
|
|
55
|
- data = getPageInfo(data);
|
|
|
56
|
-
|
|
|
57
|
- if (data.code === 200 || data.code === 502 || data.code === 503) {
|
|
|
58
|
- /*if (window._yas) {
|
|
|
59
|
- window._yas.sendCustomInfo({
|
|
|
60
|
- activityID: activityID,
|
|
|
61
|
- returnCode: data.returnCode
|
|
|
62
|
- }, false);
|
|
|
63
|
- }*/
|
|
|
64
|
- if (data.code === 200) {
|
|
|
65
|
- $('.receive-coupon-page .bg-contain img').attr('src', data.bgImg);
|
|
|
66
|
- $('.gain-coupon-centent .coupon img').attr('src', data.couponPic);
|
|
|
67
|
- $('#activityEnded').text(data.ended);
|
|
|
68
|
- $('#newUser').text(data.newUser);
|
|
|
69
|
- $('#tipMessage').text(data.message);
|
|
|
70
|
- $('#activityID').text(data.activityID);
|
|
|
71
|
- $('#shareTitle').val(data.shareTitle);
|
|
|
72
|
- $('#shareDesc').val(data.shareDesc);
|
|
|
73
|
- $('#shareImg').val(data.shareImg);
|
|
|
74
|
- $('#shareLink').val(data.shareLink);
|
|
|
75
|
- $('#activityCode').val(data.activityCode);
|
|
|
76
|
- $('.gain-coupon-centent .use-coupon-btn .use-coupon').attr('href', data.buttonLink);
|
|
|
77
|
- $('.gain-coupon-centent .go-wep').attr('href', data.pcLink);
|
|
|
78
|
- $('.tip .title').html(data.message);
|
|
|
79
|
- $('#activityDesc').html(data.activityDesc);
|
|
|
80
|
- if(data.ended) {
|
|
|
81
|
- $('.tip-wrap').removeClass('hidden');
|
|
|
82
|
- $('.tip-wrap .title').html(data.message);
|
|
|
83
|
- }
|
|
|
84
|
- } else {
|
|
|
85
|
- showToast(data.message, 1400);
|
|
|
86
|
- }
|
25
|
+ }
|
|
|
26
|
+});
|
|
|
27
|
+
|
|
|
28
|
+if ($('#activityEnded').html()) {
|
|
|
29
|
+ $('.tip-wrap').removeClass('hidden');
|
|
|
30
|
+ $('.tip-wrap .title').html(tipMessage);
|
|
|
31
|
+}
|
|
|
32
|
+
|
|
|
33
|
+
|
|
|
34
|
+function showToast(messages, time) {
|
|
|
35
|
+ $('#dialog').removeClass('hidden');
|
|
|
36
|
+ $('.mask').removeClass('hidden');
|
|
|
37
|
+ $('#dialog .content').html('<p class="phone-error">' + messages + '<p>');
|
|
|
38
|
+ setTimeout(function() {
|
|
|
39
|
+ $('.messages').addClass('hidden');
|
|
|
40
|
+ $('.mask').addClass('hidden');
|
|
|
41
|
+ $('#dialog .content').html(' ');
|
|
|
42
|
+ }, time);
|
|
|
43
|
+}
|
|
|
44
|
+
|
|
|
45
|
+$(function() {
|
|
|
46
|
+
|
|
|
47
|
+ $.ajax({
|
|
|
48
|
+ url: '/activity/tencentMkt/TencentMktController/getActivityInfo',
|
|
|
49
|
+ data: {
|
|
|
50
|
+ activityCode: activityCode
|
|
|
51
|
+ },
|
|
|
52
|
+ success: function(data) {
|
|
|
53
|
+ data = getPageInfo(data);
|
|
|
54
|
+
|
|
|
55
|
+ if (data.code === 200 || data.code === 502 || data.code === 503) {
|
|
|
56
|
+ /*if (window._yas) {
|
|
|
57
|
+ window._yas.sendCustomInfo({
|
|
|
58
|
+ activityID: activityID,
|
|
|
59
|
+ returnCode: data.returnCode
|
|
|
60
|
+ }, false);
|
|
|
61
|
+ }*/
|
|
|
62
|
+ if (data.code === 200) {
|
|
|
63
|
+ $('.receive-coupon-page .bg-contain .img1').attr('src', data.bgImg);
|
|
|
64
|
+ if (data.secondScreenPic) {
|
|
|
65
|
+ $('.receive-coupon-page .bg-contain .img2').attr('src', data.secondScreenPic);
|
87
|
} else {
|
66
|
} else {
|
88
|
- showToast('网络错误,稍后再试!', 1400);
|
67
|
+ $('.receive-coupon-page .bg-contain .img2').addClass('hidden');
|
89
|
}
|
68
|
}
|
90
|
- },
|
|
|
91
|
- error: function() {
|
|
|
92
|
- showToast('网络错误,稍后再试!', 1400);
|
|
|
93
|
- },
|
|
|
94
|
- dataType : "json"
|
|
|
95
|
- });
|
|
|
96
|
- });
|
|
|
97
|
-
|
|
|
98
|
- $('#getCoupon').on('click', function() {
|
|
|
99
|
- phone = $(this).siblings('input').val();
|
|
|
100
|
- reg = /[0-9]{11}/;
|
|
|
101
|
- if (!reg.test(phone)) {
|
|
|
102
|
- showToast('手机号错误,请重新输入。', 1400);
|
|
|
103
|
- return;
|
|
|
104
|
- }
|
|
|
105
|
- $.ajax({
|
|
|
106
|
- url: '/activity/tencentMkt/TencentMktController/sendSms',
|
|
|
107
|
- data: {
|
|
|
108
|
- mobile: $('#phone').val(),
|
|
|
109
|
- activityCode: activityCode
|
|
|
110
|
- },
|
|
|
111
|
- success: function(data) {
|
|
|
112
|
- if (data.code === 200 || data.code === 502 || data.code === 503 || data.code === 404) {
|
|
|
113
|
- if (window._yas) {
|
|
|
114
|
- window._yas.sendCustomInfo({
|
|
|
115
|
- activityID: activityID,
|
|
|
116
|
- returnCode: data.returnCode
|
|
|
117
|
- }, false);
|
|
|
118
|
- }
|
|
|
119
|
- if (data.code === 200) {
|
|
|
120
|
-
|
|
|
121
|
- $('.coupon-centent .phone-input-content').addClass('hidden');
|
|
|
122
|
- $('.coupon-centent .vertify-input-content').removeClass('hidden');
|
|
|
123
|
-
|
|
|
124
|
- } else {
|
|
|
125
|
- showToast(data.message, 1400);
|
|
|
126
|
- }
|
|
|
127
|
- } else {
|
|
|
128
|
- showToast('网络错误,稍后再试!', 1400);
|
69
|
+ $('.gain-coupon-centent .coupon img').attr('src', data.couponPic);
|
|
|
70
|
+ $('#activityEnded').text(data.ended);
|
|
|
71
|
+ $('#newUser').text(data.newUser);
|
|
|
72
|
+ $('#tipMessage').text(data.message);
|
|
|
73
|
+ $('#activityID').text(data.activityID);
|
|
|
74
|
+ $('#shareTitle').val(data.shareTitle);
|
|
|
75
|
+ $('#shareDesc').val(data.shareDesc);
|
|
|
76
|
+ $('#shareImg').val(data.shareImg);
|
|
|
77
|
+ $('#shareLink').val(data.shareLink);
|
|
|
78
|
+ $('#activityCode').val(data.activityCode);
|
|
|
79
|
+ $('.gain-coupon-centent .use-coupon-btn .use-coupon').attr('href', data.buttonLink);
|
|
|
80
|
+ $('.gain-coupon-centent .go-wep').attr('href', data.pcLink);
|
|
|
81
|
+ $('.tip .title').html(data.message);
|
|
|
82
|
+ $('#activityDesc .message').html(data.formatActivityDesc);
|
|
|
83
|
+ if (data.ended) {
|
|
|
84
|
+ $('.tip-wrap').removeClass('hidden');
|
|
|
85
|
+ $('.tip-wrap .title').html(data.message);
|
129
|
}
|
86
|
}
|
130
|
- },
|
|
|
131
|
- error: function() {
|
|
|
132
|
- showToast('网络错误,稍后再试!', 1400);
|
|
|
133
|
- },
|
|
|
134
|
- dataType : "json"
|
|
|
135
|
- });
|
|
|
136
|
- });
|
|
|
137
|
- $('.input-content').on('click', '.get', function() {
|
|
|
138
|
- $('.input-content div').eq('1').removeClass('get');
|
|
|
139
|
- if ($(this).siblings('input').val().length === 4) {
|
|
|
140
|
- $.ajax({
|
|
|
141
|
- url: '/activity/tencentMkt/TencentMktController/validRegCodeAndSendCode',
|
|
|
142
|
- data: {
|
|
|
143
|
- code: $('#verification').val(),
|
|
|
144
|
- mobile: $('#phone').val(),
|
|
|
145
|
- activityCode: activityCode
|
|
|
146
|
- },
|
|
|
147
|
- dataType: 'json',
|
|
|
148
|
- success: function(data) {
|
|
|
149
|
- if (data.code === 200) {
|
|
|
150
|
- if (window._yas) {
|
|
|
151
|
- window._yas.sendCustomInfo({
|
|
|
152
|
- activityID: activityID,
|
|
|
153
|
- returnCode: data.returnCode
|
|
|
154
|
- }, false);
|
|
|
155
|
- }
|
|
|
156
|
- $('.coupon-centent').addClass('hidden');
|
|
|
157
|
- $('.gain-coupon-centent').removeClass('hidden');
|
|
|
158
|
-
|
|
|
159
|
- } else {
|
|
|
160
|
- showToast(data.message, 1400);
|
|
|
161
|
- }
|
|
|
162
|
- },
|
|
|
163
|
- error: function() {
|
|
|
164
|
- showToast('网络错误,稍后再试!', 1400);
|
|
|
165
|
- },
|
|
|
166
|
- dataType : "json"
|
|
|
167
|
- });
|
87
|
+ } else {
|
|
|
88
|
+ showToast(data.message, 1400);
|
|
|
89
|
+ }
|
168
|
} else {
|
90
|
} else {
|
169
|
showToast('网络错误,稍后再试!', 1400);
|
91
|
showToast('网络错误,稍后再试!', 1400);
|
170
|
}
|
92
|
}
|
171
|
- });
|
|
|
172
|
- $('.close').on('click', function() {
|
|
|
173
|
- $('.dialog').addClass('hidden');
|
|
|
174
|
- $('.mask').addClass('hidden');
|
|
|
175
|
- $('#dialog .content').html(' ');
|
|
|
176
|
- });
|
|
|
177
|
- $('.description-btn').on('click', function() {
|
|
|
178
|
- $('#message').removeClass('hidden');
|
|
|
179
|
- $('.mask').removeClass('hidden');
|
|
|
180
|
- });
|
|
|
181
|
-
|
|
|
182
|
- $('.gain-description-btn').on('click', function() {
|
|
|
183
|
- $('#message').removeClass('hidden');
|
|
|
184
|
- $('.mask').removeClass('hidden');
|
|
|
185
|
- });
|
|
|
186
|
- $('.description').on('click', function() {
|
|
|
187
|
- $('#message').removeClass('hidden');
|
|
|
188
|
- $('.mask').removeClass('hidden');
|
|
|
189
|
- });
|
93
|
+ },
|
|
|
94
|
+ error: function() {
|
|
|
95
|
+ showToast('网络错误,稍后再试!', 1400);
|
|
|
96
|
+ },
|
|
|
97
|
+ dataType: "json"
|
|
|
98
|
+ });
|
|
|
99
|
+});
|
|
|
100
|
+
|
|
|
101
|
+$('#getCoupon').on('click', function() {
|
|
|
102
|
+ phone = $(this).siblings('input').val();
|
|
|
103
|
+ reg = /[0-9]{11}/;
|
|
|
104
|
+ if (!reg.test(phone)) {
|
|
|
105
|
+ showToast('手机号错误,请重新输入。', 1400);
|
|
|
106
|
+ return;
|
|
|
107
|
+ }
|
|
|
108
|
+ $.ajax({
|
|
|
109
|
+ url: '/activity/tencentMkt/TencentMktController/sendSms',
|
|
|
110
|
+ data: {
|
|
|
111
|
+ mobile: $('#phone').val(),
|
|
|
112
|
+ activityCode: activityCode
|
|
|
113
|
+ },
|
|
|
114
|
+ success: function(data) {
|
|
|
115
|
+ if (data.code === 200 || data.code === 502 || data.code === 503 || data.code === 404) {
|
|
|
116
|
+ if (window._yas) {
|
|
|
117
|
+ window._yas.sendCustomInfo({
|
|
|
118
|
+ activityID: activityID,
|
|
|
119
|
+ returnCode: data.returnCode
|
|
|
120
|
+ }, false);
|
|
|
121
|
+ }
|
|
|
122
|
+ if (data.code === 200) {
|
190
|
|
123
|
|
191
|
- $('.use-coupon-btn').on('click', function() {
|
|
|
192
|
- if (window._yas) {
|
|
|
193
|
- window._yas.sendCustomInfo({
|
|
|
194
|
- activityID: activityID
|
|
|
195
|
- }, true);
|
|
|
196
|
- }
|
|
|
197
|
- });
|
124
|
+ $('.coupon-centent .phone-input-content').addClass('hidden');
|
|
|
125
|
+ $('.coupon-centent .vertify-input-content').removeClass('hidden');
|
198
|
|
126
|
|
199
|
- $('.input-content .clear-mobile').on('click', function() {
|
|
|
200
|
- $('.input-content input').eq('0').val('');
|
|
|
201
|
- $(this).addClass('hidden');
|
|
|
202
|
- $('.input-content div').eq('0').removeClass();
|
|
|
203
|
- });
|
|
|
204
|
-
|
|
|
205
|
- $('.input-content .clear-verify').on('click', function() {
|
|
|
206
|
- $('.input-content input').eq('1').val('');
|
|
|
207
|
- $(this).addClass('hidden');
|
|
|
208
|
- $('.input-content div').eq('1').removeClass();
|
|
|
209
|
- });
|
|
|
210
|
-
|
|
|
211
|
- /**
|
|
|
212
|
- * 分享页面基础参数
|
|
|
213
|
- * @param {object} sizeInfo [接口原始数据]
|
|
|
214
|
- * @return {object} [description]
|
|
|
215
|
- */
|
|
|
216
|
- function getPageInfo(pageInfo) {
|
|
|
217
|
- var dest = {};
|
|
|
218
|
-
|
|
|
219
|
- dest.shareTitle = pageInfo.data.shareTitle;
|
|
|
220
|
- dest.shareDesc = pageInfo.data.shareContent;
|
|
|
221
|
- dest.shareImg = pageInfo.data.shareImgUrl;
|
|
|
222
|
- dest.shareLink = pageInfo.data.shareUrl;
|
|
|
223
|
- dest.code = pageInfo.code;
|
|
|
224
|
- dest.activityID = pageInfo.id;
|
|
|
225
|
- dest.title = pageInfo.data.h5Title;
|
|
|
226
|
- dest.activityDesc = pageInfo.data.activityDesc;
|
|
|
227
|
- dest.couponPic = pageInfo.data.couponPic;
|
|
|
228
|
- dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic;
|
|
|
229
|
- dest.mobile = pageInfo.data.mobile;
|
|
|
230
|
- dest.pcLink = pageInfo.data.pcLink;
|
|
|
231
|
- dest.buttonLink = pageInfo.data.buttonLink;
|
|
|
232
|
-
|
|
|
233
|
- if (pageInfo.data.flag === 1) {
|
|
|
234
|
- dest.bgImg = pageInfo.data.activityNormalPic;
|
127
|
+ } else {
|
|
|
128
|
+ showToast(data.message, 1400);
|
|
|
129
|
+ }
|
235
|
} else {
|
130
|
} else {
|
236
|
- dest.bgImg = pageInfo.data.activityEndPic;
|
|
|
237
|
- dest.ended = true;
|
131
|
+ showToast('网络错误,稍后再试!', 1400);
|
238
|
}
|
132
|
}
|
239
|
- dest.message = pageInfo.data.returnMsg;
|
133
|
+ },
|
|
|
134
|
+ error: function() {
|
|
|
135
|
+ showToast('网络错误,稍后再试!', 1400);
|
|
|
136
|
+ },
|
|
|
137
|
+ dataType: "json"
|
|
|
138
|
+ });
|
|
|
139
|
+});
|
|
|
140
|
+$('.input-content').on('click', '.get', function() {
|
|
|
141
|
+ $('.input-content div').eq('1').removeClass('get');
|
|
|
142
|
+ if ($(this).siblings('input').val().length === 4) {
|
|
|
143
|
+ $.ajax({
|
|
|
144
|
+ url: '/activity/tencentMkt/TencentMktController/validRegCodeAndSendCode',
|
|
|
145
|
+ data: {
|
|
|
146
|
+ code: $('#verification').val(),
|
|
|
147
|
+ mobile: $('#phone').val(),
|
|
|
148
|
+ activityCode: activityCode
|
|
|
149
|
+ },
|
|
|
150
|
+ dataType: 'json',
|
|
|
151
|
+ success: function(data) {
|
|
|
152
|
+ if (data.code === 200) {
|
|
|
153
|
+ if (window._yas) {
|
|
|
154
|
+ window._yas.sendCustomInfo({
|
|
|
155
|
+ activityID: activityID,
|
|
|
156
|
+ returnCode: data.returnCode
|
|
|
157
|
+ }, false);
|
|
|
158
|
+ }
|
|
|
159
|
+ $('.coupon-centent').addClass('hidden');
|
|
|
160
|
+ $('.gain-coupon-centent').removeClass('hidden');
|
240
|
|
161
|
|
241
|
- // 清空变量,释放内存
|
|
|
242
|
- pageInfo = {};
|
|
|
243
|
- return dest;
|
|
|
244
|
- }; |
|
|
|
|
162
|
+ } else {
|
|
|
163
|
+ showToast(data.message, 1400);
|
|
|
164
|
+ }
|
|
|
165
|
+ },
|
|
|
166
|
+ error: function() {
|
|
|
167
|
+ showToast('网络错误,稍后再试!', 1400);
|
|
|
168
|
+ },
|
|
|
169
|
+ dataType: "json"
|
|
|
170
|
+ });
|
|
|
171
|
+ } else {
|
|
|
172
|
+ showToast('网络错误,稍后再试!', 1400);
|
|
|
173
|
+ }
|
|
|
174
|
+});
|
|
|
175
|
+$('.close').on('click', function() {
|
|
|
176
|
+ $('.dialog').addClass('hidden');
|
|
|
177
|
+ $('.mask').addClass('hidden');
|
|
|
178
|
+ $('#dialog .content').html(' ');
|
|
|
179
|
+});
|
|
|
180
|
+$('.description-btn').on('click', function() {
|
|
|
181
|
+ $('#message').removeClass('hidden');
|
|
|
182
|
+ $('.mask').removeClass('hidden');
|
|
|
183
|
+});
|
|
|
184
|
+
|
|
|
185
|
+$('.gain-description-btn').on('click', function() {
|
|
|
186
|
+ $('#message').removeClass('hidden');
|
|
|
187
|
+ $('.mask').removeClass('hidden');
|
|
|
188
|
+});
|
|
|
189
|
+$('.description').on('click', function() {
|
|
|
190
|
+ $('#message').removeClass('hidden');
|
|
|
191
|
+ $('.mask').removeClass('hidden');
|
|
|
192
|
+});
|
|
|
193
|
+
|
|
|
194
|
+$('.use-coupon-btn').on('click', function() {
|
|
|
195
|
+ if (window._yas) {
|
|
|
196
|
+ window._yas.sendCustomInfo({
|
|
|
197
|
+ activityID: activityID
|
|
|
198
|
+ }, true);
|
|
|
199
|
+ }
|
|
|
200
|
+});
|
|
|
201
|
+
|
|
|
202
|
+$('.input-content .clear-mobile').on('click', function() {
|
|
|
203
|
+ $('.input-content input').eq('0').val('');
|
|
|
204
|
+ $(this).addClass('hidden');
|
|
|
205
|
+ $('.input-content div').eq('0').removeClass();
|
|
|
206
|
+});
|
|
|
207
|
+
|
|
|
208
|
+$('.input-content .clear-verify').on('click', function() {
|
|
|
209
|
+ $('.input-content input').eq('1').val('');
|
|
|
210
|
+ $(this).addClass('hidden');
|
|
|
211
|
+ $('.input-content div').eq('1').removeClass();
|
|
|
212
|
+});
|
|
|
213
|
+
|
|
|
214
|
+/**
|
|
|
215
|
+ * 分享页面基础参数
|
|
|
216
|
+ * @param {object} sizeInfo [接口原始数据]
|
|
|
217
|
+ * @return {object} [description]
|
|
|
218
|
+ */
|
|
|
219
|
+function getPageInfo(pageInfo) {
|
|
|
220
|
+ var dest = {};
|
|
|
221
|
+
|
|
|
222
|
+ dest.shareTitle = pageInfo.data.shareTitle;
|
|
|
223
|
+ dest.shareDesc = pageInfo.data.shareContent;
|
|
|
224
|
+ dest.shareImg = pageInfo.data.shareImgUrl;
|
|
|
225
|
+ dest.shareLink = pageInfo.data.shareUrl;
|
|
|
226
|
+ dest.code = pageInfo.code;
|
|
|
227
|
+ dest.activityID = pageInfo.id;
|
|
|
228
|
+ dest.title = pageInfo.data.h5Title;
|
|
|
229
|
+ dest.activityDesc = pageInfo.data.activityDesc;
|
|
|
230
|
+ dest.couponPic = pageInfo.data.couponPic;
|
|
|
231
|
+ dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic;
|
|
|
232
|
+ dest.mobile = pageInfo.data.mobile;
|
|
|
233
|
+ dest.pcLink = pageInfo.data.pcLink;
|
|
|
234
|
+ dest.buttonLink = pageInfo.data.buttonLink;
|
|
|
235
|
+ dest.secondScreenPic = pageInfo.data.secondScreenPic;
|
|
|
236
|
+ dest.formatActivityDesc = pageInfo.data.formatActivityDesc;
|
|
|
237
|
+
|
|
|
238
|
+ if (pageInfo.data.flag === 1) {
|
|
|
239
|
+ dest.bgImg = pageInfo.data.activityNormalPic;
|
|
|
240
|
+ } else {
|
|
|
241
|
+ dest.bgImg = pageInfo.data.activityEndPic;
|
|
|
242
|
+ dest.ended = true;
|
|
|
243
|
+ }
|
|
|
244
|
+ dest.message = pageInfo.data.returnMsg;
|
|
|
245
|
+
|
|
|
246
|
+ // 清空变量,释放内存
|
|
|
247
|
+ pageInfo = {};
|
|
|
248
|
+ return dest;
|
|
|
249
|
+}; |