diff --git a/library/Action/AbstractAction.php b/library/Action/AbstractAction.php index 96e08be..78d8a12 100644 --- a/library/Action/AbstractAction.php +++ b/library/Action/AbstractAction.php @@ -376,8 +376,8 @@ class AbstractAction extends Controller_Abstract * 设置网站SEO的描述内容 * * @param string $description 描述内容 - * @param string $sign 连接的字符串 * @param bool $showMore 是否显示更多内容 + * @param string $sign 连接的字符串 * @return void */ protected function setDescription($description, $showMore = true, $sign = ' ') diff --git a/static/js/cart/chose-panel.js b/static/js/cart/chose-panel.js index 6c7b576..4310044 100644 --- a/static/js/cart/chose-panel.js +++ b/static/js/cart/chose-panel.js @@ -119,7 +119,7 @@ function resetColorZeroStock($siblingBlock) { // 选择了颜色切换商品图片 function changeGoodImgWhenClickColor() { - if (hasChooseColor && curColorIndex) { + if (hasChooseColor && curColorIndex >= 0) { $imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide'); } } diff --git a/static/js/cart/order-ensure.js b/static/js/cart/order-ensure.js index e1496de..ecbafb5 100644 --- a/static/js/cart/order-ensure.js +++ b/static/js/cart/order-ensure.js @@ -93,8 +93,7 @@ function orderCompute() { }).then(function(res) { var priceHtml; - if (!res) { - tip.show('网络出错'); + if (!res.length) { window.location.reload(); } else { /*if (res.order_amount) { @@ -106,8 +105,12 @@ function orderCompute() { if (res.last_order_amount) { res.last_order_amount = (+res.last_order_amount).toFixed(2); } - $coinCheck.find('em').html('- ¥ ' + res.use_yoho_coin); - $coinUsed.html('已抵¥' + res.use_yoho_coin); + if (res.use_yoho_coin) { + $coinCheck.find('em').html('- ¥ ' + res.use_yoho_coin); + $coinUsed.html('已抵¥' + res.use_yoho_coin); + $coinCheck.find('em').show(); + $coinUsed.show(); + } priceHtml = priceTmpl({ cartPayData: res.promotion_formula_list, price: res.last_order_amount @@ -116,7 +119,6 @@ function orderCompute() { $price.html(priceHtml); } }).fail(function() { - tip.show('网络出错'); window.location.reload(); }); } @@ -163,7 +165,6 @@ function submitOrder() { var url; if (!res) { - loading.hideLoadingMask(); tip.show('网络出错'); return; } @@ -177,13 +178,13 @@ function submitOrder() { } window.setCookie('order-info', ''); window.location.href = url; - } else { - loading.hideLoadingMask(); - tip.show(res.message || '网络出错'); + } else if (res.message) { + tip.show(res.message); } }).fail(function() { - loading.hideLoadingMask(); tip.show('网络出错'); + }).always(function() { + loading.hideLoadingMask(); }); } @@ -215,9 +216,7 @@ $('.coin').on('touchend', function() { if ($this.find('.checkbox').hasClass('icon-cb-checked')) { orderInfo('yohoCoin', $this.data('yoho-coin')); - $this.find('.coin-check em').show(); $this.find('.can-use').hide(); - $this.find('.used').show(); } else { orderInfo('yohoCoin', 0); $this.find('.coin-check em').hide(); diff --git a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php index f5e4660..3a7fe05 100644 --- a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php +++ b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php @@ -26,7 +26,7 @@ class LoginController extends AbstractAction $data = array( 'loginIndex' => true, // 模板中使用JS的标识 - 'backUrl' => '/', // 返回的URL链接 + 'backUrl' => 'javascript:history.go(-1)', // 返回的URL链接 'showHeaderImg' => true, // 控制显示头部图片 'isPassportPage' => true, // 模板中模块标识 'registerUrl' => '/reg.html', // 注册的URL链接 @@ -56,7 +56,7 @@ class LoginController extends AbstractAction $data = array(); $data['loginInternational'] = true; // 模板中使用JS的标识 - $data['backUrl'] = '/'; // 返回的URL链接 + $data['backUrl'] = 'javascript:history.go(-1)'; // 返回的URL链接 $data['headerText'] = '登录'; // 头部信息 $data['isPassportPage'] = true; // 模板中模块标识 $data['areaCode'] = '+86'; // 默认区号 diff --git a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php index 4b64df8..b5b051d 100644 --- a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php +++ b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php @@ -19,7 +19,7 @@ class RegController extends AbstractAction $data = array(); $data['regIndex'] = true; // 模板中使用JS的标识 - $data['backUrl'] = '/'; // 返回的URL链接 + $data['backUrl'] = 'javascript:history.go(-1)'; // 返回的URL链接 $data['headerText'] = '注册'; // 头部信息 $data['isPassportPage'] = true; // 模板中模块标识 $data['areaCode'] = '+86'; // 默认的区号 @@ -56,7 +56,7 @@ class RegController extends AbstractAction $data = array( 'regCode' => true, // 模板中使用JS的标识 - 'backUrl' => '/', // 返回的URL链接 + 'backUrl' => SITE_MAIN . '/?go=1', // 返回的URL链接 'headerText' => '注册', // 头部信息 'isPassportPage' => true, // 模板中模块标识 'areaCode' => '+' . $area, // 地区编号