Authored by 郭成尧

Merge branch 'feature/coupon' into beta/wap

@@ -95,6 +95,10 @@ $('.coupon-message-op-rel').on('click', function() { @@ -95,6 +95,10 @@ $('.coupon-message-op-rel').on('click', function() {
95 }); 95 });
96 96
97 if ($('#noData').length > 0) { 97 if ($('#noData').length > 0) {
  98 + if (location.href.indexOf('?openby:yohobuy=') <= 0){
98 tip.show('网络异常!'); 99 tip.show('网络异常!');
  100 + }else{
  101 + console.log(location.href.indexOf('?openby:yohobuy='))
  102 + }
99 } 103 }
100 104
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 .just-img{ 10 .just-img{
11 width: 100%; 11 width: 100%;
12 float: left; 12 float: left;
13 - margin: 20px 0; 13 + margin:0;
14 } 14 }
15 .coupon-floor { 15 .coupon-floor {
16 float: left; 16 float: left;
@@ -22,12 +22,9 @@ class CouponController extends AbstractAction @@ -22,12 +22,9 @@ class CouponController extends AbstractAction
22 */ 22 */
23 public function floorAction() 23 public function floorAction()
24 { 24 {
25 -  
26 - if (!$this->isApp()) {  
27 - $this->setNavHeader('领券中心', true, SITE_MAIN);  
28 - }  
29 $receiveData = filter_input_array(INPUT_GET, array( 25 $receiveData = filter_input_array(INPUT_GET, array(
30 - 'code' => FILTER_DEFAULT 26 + 'code' => FILTER_DEFAULT,
  27 + 'title' => FILTER_DEFAULT,
31 )); 28 ));
32 $result = array(); 29 $result = array();
33 $uid = ''; 30 $uid = '';
@@ -39,17 +36,17 @@ class CouponController extends AbstractAction @@ -39,17 +36,17 @@ class CouponController extends AbstractAction
39 $resource = CouponData::getCouponRousource($receiveData['code'], $uid); 36 $resource = CouponData::getCouponRousource($receiveData['code'], $uid);
40 if (isset($resource['code']) && $resource['code'] === 200) { 37 if (isset($resource['code']) && $resource['code'] === 200) {
41 $result = CouponFloorProcess::getContent($resource['data']); 38 $result = CouponFloorProcess::getContent($resource['data']);
42 - }else{  
43 - $this->_view->display('index', array(  
44 - 'content' => array(  
45 - 'noData' => true,  
46 - ),  
47 - 'floorPage' => true  
48 - )); 39 + } else {
  40 + $result['noData'] = true;
49 } 41 }
50 // 分享 42 // 分享
51 $shareData = CouponFloorProcess::getShare($receiveData['code'], '领券中心'); 43 $shareData = CouponFloorProcess::getShare($receiveData['code'], '领券中心');
52 $result[count($result)] = $shareData; 44 $result[count($result)] = $shareData;
  45 + if (!$this->isApp()) {
  46 + $this->setNavHeader($receiveData['title'], true, SITE_MAIN);
  47 + } else {
  48 + $this->setTitle($receiveData['title']);
  49 + }
53 $this->_view->display('index', array( 50 $this->_view->display('index', array(
54 'content' => $result, 51 'content' => $result,
55 'floorPage' => true 52 'floorPage' => true