Authored by 郭成尧

git-user-info

@@ -30,13 +30,13 @@ $('.nav-back').on('touchend', function() { @@ -30,13 +30,13 @@ $('.nav-back').on('touchend', function() {
30 { 30 {
31 href: '/', 31 href: '/',
32 text: '放弃', 32 text: '放弃',
33 - class: '', 33 + class: ''
34 }, 34 },
35 { 35 {
36 - href: '/', 36 + href: '',
37 text: '马上支付', 37 text: '马上支付',
38 - class: 'order-tip-btnred',  
39 - }, 38 + class: 'order-tip-btnred'
  39 + }
40 ] 40 ]
41 ); 41 );
42 }); 42 });
@@ -35,20 +35,32 @@ function show(con, btn) { @@ -35,20 +35,32 @@ function show(con, btn) {
35 }); 35 });
36 } 36 }
37 37
38 - if (btn && $.isArray(btn)) {  
39 - if (btn.length === 1) { 38 + if (btn && $.isArray(btn) && btn.length === 1) {
  39 + if (!btn[0].href) {
  40 + buttons += '<a class="order-tip-btn1 ' + btn[0].class
  41 + + '"><span>' + btn[0].text
  42 + + '</span></a>';
  43 + } else {
40 buttons += '<a href="' + btn[0].href 44 buttons += '<a href="' + btn[0].href
41 + '" class="order-tip-btn1 ' + btn[0].class 45 + '" class="order-tip-btn1 ' + btn[0].class
42 + '"><span>' + btn[0].text 46 + '"><span>' + btn[0].text
43 + '</span></a>'; 47 + '</span></a>';
44 - } else { 48 + }
  49 + }
  50 +
  51 + if (btn && $.isArray(btn) && btn.length > 1) {
45 $.each(btn, function(key, value) { 52 $.each(btn, function(key, value) {
  53 + if (!value.href) {
  54 + buttons += '<a class="' + value.class
  55 + + '"><span>' + value.text
  56 + + '</span></a>';
  57 + } else {
46 buttons += '<a href="' + value.href 58 buttons += '<a href="' + value.href
47 + '" class="' + value.class 59 + '" class="' + value.class
48 + '"><span>' + value.text 60 + '"><span>' + value.text
49 + '</span></a>'; 61 + '</span></a>';
50 - });  
51 } 62 }
  63 + });
52 } 64 }
53 65
54 $tipMsg.html(content); 66 $tipMsg.html(content);
@@ -605,21 +605,21 @@ class IndexController extends AbstractAction @@ -605,21 +605,21 @@ class IndexController extends AbstractAction
605 public function orderSubAction() 605 public function orderSubAction()
606 { 606 {
607 /* TODO TAR DELETE THIS !!! */ 607 /* TODO TAR DELETE THIS !!! */
608 - /* $this->echoJson(array(  
609 - 'code' => 409,  
610 - 'msg' => array('XXX 商品已被抢光,', '继续结算剩余商品。'),  
611 - 'btns' => array(  
612 - // array(  
613 - // 'href' => '/',  
614 - // 'text' => '重新选择商品',  
615 - // 'color' => '',  
616 - // ),  
617 - array(  
618 - 'href' => '#',  
619 - 'text' => '知道了',  
620 - 'class' => 'order-tip-btnred'  
621 - )),  
622 - ));exit;*/ 608 +// $this->echoJson(array(
  609 +// 'code' => 409,
  610 +// 'msg' => array('XXX 商品已被抢光,', '继续结算剩余商品。'),
  611 +// 'btns' => array(
  612 +// // array(
  613 +// // 'href' => '/',
  614 +// // 'text' => '重新选择商品',
  615 +// // 'color' => '',
  616 +// // ),
  617 +// array(
  618 +// 'href' => '',
  619 +// 'text' => '知道了',
  620 +// 'class' => 'order-tip-btnred'
  621 +// )),
  622 +// ));exit;
623 if ($this->isAjax()) { 623 if ($this->isAjax()) {
624 $uid = $this->getUid(true); 624 $uid = $this->getUid(true);
625 $addressId = $this->post('addressId', null); 625 $addressId = $this->post('addressId', null);