Authored by 郭成尧

git-user-info

... ... @@ -30,13 +30,13 @@ $('.nav-back').on('touchend', function() {
{
href: '/',
text: '放弃',
class: '',
class: ''
},
{
href: '/',
href: '',
text: '马上支付',
class: 'order-tip-btnred',
},
class: 'order-tip-btnred'
}
]
);
});
... ...
... ... @@ -35,21 +35,33 @@ function show(con, btn) {
});
}
if (btn && $.isArray(btn)) {
if (btn.length === 1) {
buttons += '<a href="' + btn[0].href
+ '" class="order-tip-btn1 ' + btn[0].class
+ '"><span>' + btn[0].text
if (btn && $.isArray(btn) && btn.length === 1) {
if (!btn[0].href) {
buttons += '<a class="order-tip-btn1 ' + btn[0].class
+ '"><span>' + btn[0].text
+ '</span></a>';
} else {
$.each(btn, function(key, value) {
buttons += '<a href="' + value.href
+ '" class="' + value.class
+ '"><span>' + value.text
+ '</span></a>';
});
buttons += '<a href="' + btn[0].href
+ '" class="order-tip-btn1 ' + btn[0].class
+ '"><span>' + btn[0].text
+ '</span></a>';
}
}
if (btn && $.isArray(btn) && btn.length > 1) {
$.each(btn, function(key, value) {
if (!value.href) {
buttons += '<a class="' + value.class
+ '"><span>' + value.text
+ '</span></a>';
} else {
buttons += '<a href="' + value.href
+ '" class="' + value.class
+ '"><span>' + value.text
+ '</span></a>';
}
});
}
$tipMsg.html(content);
$tipBtns.html(buttons);
... ...
... ... @@ -605,21 +605,21 @@ class IndexController extends AbstractAction
public function orderSubAction()
{
/* TODO TAR DELETE THIS !!! */
/* $this->echoJson(array(
'code' => 409,
'msg' => array('XXX 商品已被抢光,', '继续结算剩余商品。'),
'btns' => array(
// array(
// 'href' => '/',
// 'text' => '重新选择商品',
// 'color' => '',
// ),
array(
'href' => '#',
'text' => '知道了',
'class' => 'order-tip-btnred'
)),
));exit;*/
// $this->echoJson(array(
// 'code' => 409,
// 'msg' => array('XXX 商品已被抢光,', '继续结算剩余商品。'),
// 'btns' => array(
// // array(
// // 'href' => '/',
// // 'text' => '重新选择商品',
// // 'color' => '',
// // ),
// array(
// 'href' => '',
// 'text' => '知道了',
// 'class' => 'order-tip-btnred'
// )),
// ));exit;
if ($this->isAjax()) {
$uid = $this->getUid(true);
$addressId = $this->post('addressId', null);
... ...