Authored by 张丽霞

h5分享领券业务逻辑

@@ -18,7 +18,6 @@ const getPageInfo = (pageInfo) => { @@ -18,7 +18,6 @@ const getPageInfo = (pageInfo) => {
18 dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic; 18 dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic;
19 dest.mobile = pageInfo.data.mobile; 19 dest.mobile = pageInfo.data.mobile;
20 if (pageInfo.data.flag === 1) { 20 if (pageInfo.data.flag === 1) {
21 - dest.couponGoing = true;  
22 dest.bgImg = pageInfo.data.activityNormalPic; 21 dest.bgImg = pageInfo.data.activityNormalPic;
23 } else if (pageInfo.data.flag !== 1) { 22 } else if (pageInfo.data.flag !== 1) {
24 dest.bgImg = pageInfo.data.activityEndPic; 23 dest.bgImg = pageInfo.data.activityEndPic;
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 </div> 5 </div>
6 <p class="hidden" id="orderCode">{{ordercode}}</p> 6 <p class="hidden" id="orderCode">{{ordercode}}</p>
7 <p class="hidden" id="oldUserCouponPic">{{oldUserCouponPic}}</p> 7 <p class="hidden" id="oldUserCouponPic">{{oldUserCouponPic}}</p>
  8 + <p class="hidden" id="activityEnded">{{ended}}</p>
8 9
9 <div class="page"> 10 <div class="page">
10 <div class="gain-coupon-centent hidden"> 11 <div class="gain-coupon-centent hidden">
@@ -22,22 +23,25 @@ @@ -22,22 +23,25 @@
22 23
23 <div class="coupon-centent"> 24 <div class="coupon-centent">
24 <div class="title"> 25 <div class="title">
25 - <img src="../img/coupon/coupon-title.png">  
26 </div> 26 </div>
27 27
28 - <div class="input-content phone-input-content">  
29 - <input id="phone" type="text" placeholder="请输入手机号" maxlength="11"/>  
30 - <div>获取红包</div>  
31 - </div> 28 + <div class="under-title">
  29 + <div class="input-content phone-input-content">
  30 + <input id="phone" type="text" placeholder="请输入手机号" maxlength="11"/>
  31 + <div>获取红包</div>
  32 + </div>
32 33
33 - <div class="input-content vertify-input-content hidden">  
34 - <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/>  
35 - <div>验证领红包</div>  
36 - </div> 34 + <div class="input-content vertify-input-content hidden">
  35 + <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/>
  36 + <div>验证领红包</div>
  37 + </div>
37 38
38 - <div class="coupon-description">  
39 - <span></span> 39 + <div class="coupon-description">
  40 + <span></span>
  41 + </div>
40 </div> 42 </div>
  43 +
  44 +
41 </div> 45 </div>
42 </div> 46 </div>
43 47
@@ -63,14 +67,7 @@ @@ -63,14 +67,7 @@
63 <div class="mask hidden"></div> 67 <div class="mask hidden"></div>
64 <div class="dialog hidden" id="message"> 68 <div class="dialog hidden" id="message">
65 <span class="close"></span> 69 <span class="close"></span>
66 - <div class="activity-message">  
67 - <h3>活动说明</h3>  
68 - <div class="message">  
69 - <P>1、活动时间:2016年4月7日到2016年7月7日</P>  
70 - <P>2、仅限新注册用户以及首次购买用户使用</P>  
71 - <P>3、同一手机号限领一次优惠券</P>  
72 - </div>  
73 - </div> 70 + {{{activityDesc}}}
74 </div> 71 </div>
75 72
76 73

83.4 KB | W: | H:

44.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -21,6 +21,11 @@ $('#verification').bind('input propertychange', function() { @@ -21,6 +21,11 @@ $('#verification').bind('input propertychange', function() {
21 } 21 }
22 }); 22 });
23 23
  24 +if ($('#activityEnded').html()) {
  25 + $('.tip-wrap').removeClass('hidden');
  26 + $('.tip-wrap .title').html(data.result.message);
  27 +}
  28 +
24 $('.input-content').on('click', '.verification-code', function() { 29 $('.input-content').on('click', '.verification-code', function() {
25 $('.input-content div').eq('0').removeClass('verification-code'); 30 $('.input-content div').eq('0').removeClass('verification-code');
26 phone = $(this).siblings('input').val(); 31 phone = $(this).siblings('input').val();
@@ -41,15 +41,24 @@ @@ -41,15 +41,24 @@
41 } 41 }
42 42
43 .coupon-centent { 43 .coupon-centent {
  44 + position: relative;
  45 +
44 .title { 46 .title {
45 - padding: 40px 90px;  
46 - height: 111px;  
47 - background: #9d1a15; 47 + position: absolute;
  48 + top: 40px;
  49 + left: 50%;
  50 + margin-left: -200px;
  51 + width: 401px;
  52 + height: 57px;
  53 + background: url("../img/coupon/coupon-title.png");
  54 + }
  55 +
  56 + .under-title {
  57 + position: absolute;
  58 + top: 100px;
  59 + width: 100%;
  60 + height: 463px;
48 61
49 - img {  
50 - width: 100%;  
51 - height: auto;  
52 - }  
53 } 62 }
54 63
55 .input-content { 64 .input-content {
@@ -201,7 +210,9 @@ @@ -201,7 +210,9 @@
201 } 210 }
202 211
203 .activity-message { 212 .activity-message {
204 - overflow: auto; 213 + width: 100%;
  214 + height: 410px;
  215 + overflow: scroll;
205 } 216 }
206 217
207 .activity-message h3 { 218 .activity-message h3 {
@@ -222,8 +233,8 @@ @@ -222,8 +233,8 @@
222 font-size: 26px; 233 font-size: 26px;
223 line-height: 40px; 234 line-height: 40px;
224 235
225 - padding-left: 40px;  
226 - text-indent: -40px; 236 + padding-left: 26px;
  237 + text-indent: -26px;
227 } 238 }
228 239
229 .messages { 240 .messages {