Authored by rqq

本地生活领券弹框修改

@@ -4,4 +4,4 @@ var $ = require('jquery'), @@ -4,4 +4,4 @@ var $ = require('jquery'),
4 var arr = code.split('='); 4 var arr = code.split('=');
5 5
6 $('.coupon-input').val(arr[1]); 6 $('.coupon-input').val(arr[1]);
7 -require('../plugin/wx-share');  
  7 +require('../plugin/life-share');
@@ -20,14 +20,13 @@ function get() { @@ -20,14 +20,13 @@ function get() {
20 $('.statu-mark').show(); 20 $('.statu-mark').show();
21 $('.statu-box').show(); 21 $('.statu-box').show();
22 if (data.code === 200) { 22 if (data.code === 200) {
23 - $('.sure').click(function() {  
24 - location.href = '/life/coupon' + '?' + 'code' + '=' + data.data;  
25 - }); 23 + location.href = '/life/coupon' + '?' + 'code' + '=' + data.data;
  24 + } else if (data.code === 401) {
  25 + $('.successed').show();
  26 + } else if (data.code === 403) {
  27 + $('.late').show();
26 } else { 28 } else {
27 - $('.sure').click(function() {  
28 - $('.statu-mark').hide();  
29 - $('.statu-box').hide();  
30 - }); 29 + $('.faill').show();
31 } 30 }
32 } 31 }
33 }); 32 });
@@ -91,40 +91,45 @@ html,body { @@ -91,40 +91,45 @@ html,body {
91 top:40%; 91 top:40%;
92 } 92 }
93 } 93 }
94 - .statu-mark{  
95 - position: fixed;  
96 - z-index: 1;  
97 - background-color: #505050;  
98 - opacity: 0.5;  
99 - width: 100%;  
100 - height:38.125rem; 94 + .successed{
  95 + background-image:resolve('life/login/get.png');
  96 + background-size: 100% 100%;
  97 + position: absolute;
  98 + width: 80%;
  99 + height:20%;
  100 + left: 10%;
  101 + top:33%;
101 display: none; 102 display: none;
102 } 103 }
103 - .statu-box{  
104 - background-color:#464646;  
105 - padding:5%;  
106 - color: #FFFFFF;  
107 - line-height: 1rem; 104 + .faill{
  105 + background-image:resolve('life/login/faill.png');
  106 + background-size: 100% 100%;
108 position: absolute; 107 position: absolute;
109 - width: 70%;  
110 - height:10%;  
111 - z-index: 2;  
112 - display: none; 108 + width: 80%;
  109 + height:20%;
113 left:10%; 110 left:10%;
114 - top:35%;  
115 - font-size: 0.8rem;  
116 - opacity: 0.9;  
117 - .statu{  
118 - margin-top: 1rem;  
119 - }  
120 - .sure{  
121 - position: absolute;  
122 - bottom: 0;  
123 - right: 0;  
124 - background: #464646;  
125 - border: none;  
126 - color:#FFFFFF;  
127 - } 111 + top:33%;
  112 + display: none;
  113 + }
  114 + .late{
  115 + background-image:resolve('life/login/late.png');
  116 + background-size: 100% 100%;
  117 + position: absolute;
  118 + width: 80%;
  119 + height:20%;
  120 + left: 10%;
  121 + top:33%;
  122 + display: none;
  123 + }
  124 + .sure{
  125 + position: absolute;
  126 + display: block;
  127 + width: 42%;
  128 + height: 23%;
  129 + left: 29%;
  130 + bottom: 3%;
  131 + color: #FFFFFF;
  132 + sborder: solid 0.05rem #FFFFFF;
128 } 133 }
129 } 134 }
130 @import "coupon"; 135 @import "coupon";
@@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
3 <input type="text" class="coupon-input" disabled="true"> 3 <input type="text" class="coupon-input" disabled="true">
4 <div class="share">立即将福利券分享给好友</div> 4 <div class="share">立即将福利券分享给好友</div>
5 {{if wxshare}} 5 {{if wxshare}}
6 - <input id="Link" type="hidden" value="{{shareLink}}">  
7 - <input id="Img" type="hidden" value="{{shareImg}}">  
8 - <input id="Title" type="hidden" value="{{shareTitle}}">  
9 - <input id="Desc" type="hidden" value="{{shareDesc}}"> 6 + <input id="link" type="hidden" value="{{shareLink}}">
  7 + <input id="iImg" type="hidden" value="{{shareImg}}">
  8 + <input id="title" type="hidden" value="{{shareTitle}}">
  9 + <input id="desc" type="hidden" value="{{shareDesc}}">
10 </if> 10 </if>
11 </div> 11 </div>
12 {{> layout/footer}} 12 {{> layout/footer}}
@@ -8,10 +8,14 @@ @@ -8,10 +8,14 @@
8 <div class="close"></div> 8 <div class="close"></div>
9 <img src="http://static.dev.yohobuy.com/img/life/login/codemark.jpg"/> 9 <img src="http://static.dev.yohobuy.com/img/life/login/codemark.jpg"/>
10 </div> 10 </div>
11 - <div class="statu-mark"></div>  
12 - <div class="statu-box">  
13 - <p class="statu"></p>  
14 - <button class="sure">确定</button> 11 + <div class="successed">
  12 + <a href="/life/coupon" class="sure"></a>
  13 + </div>
  14 + <div class="faill">
  15 + <a href="/life/index" class="sure"></a>
  16 + </div>
  17 + <div class="late">
  18 + <a href="/life/index" class="sure"></a>
15 </div> 19 </div>
16 </div> 20 </div>
17 {{> layout/footer}} 21 {{> layout/footer}}
@@ -56,7 +56,7 @@ class LifeController extends AbstractAction @@ -56,7 +56,7 @@ class LifeController extends AbstractAction
56 $this->_view->display('coupon', array( 56 $this->_view->display('coupon', array(
57 'wxshare' => array( 57 'wxshare' => array(
58 'shareLink' => 'http://m.yohobuy.com/life/coupon', 58 'shareLink' => 'http://m.yohobuy.com/life/coupon',
59 - 'shareImg' => '', 59 + 'shareImg' => 'http://static.dev.yohobuy.com/img/life/coupon/share-img.png',
60 'shareTitle' => 'YOHO!BUY有货清凉夏日福利券限时派送中 ', 60 'shareTitle' => 'YOHO!BUY有货清凉夏日福利券限时派送中 ',
61 'shareDesc' => '我已成功领取36元清凉夏日福利券,你也快来吧!', 61 'shareDesc' => '我已成功领取36元清凉夏日福利券,你也快来吧!',
62 ), 62 ),