Authored by uedxwg

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -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 = ' ')
... ...
... ... @@ -579,7 +579,8 @@ class Helpers
$oneGoods['color'] = $value['color_name'];
$oneGoods['size'] = $value['size_name'];
$oneGoods['checked'] = $value['selected'] === 'Y';
$oneGoods['price'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['last_vip_price']);
$oneGoods['isVipPrice'] = $value['sales_price'] !== $value['last_vip_price'];
$oneGoods['count'] = $value['buy_number'];
if ($isValid) { // 库存不足
... ...
... ... @@ -65,6 +65,11 @@ $('.freebie').on('touchend', function() {
});
$('.btn-balance').on('touchend', function() {
if ($('.low-stocks').length > 0) {
tip.show('请先删除库存不足商品');
return false;
}
if (hasChecked) {
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
} else {
... ...
... ... @@ -119,7 +119,7 @@ function resetColorZeroStock($siblingBlock) {
// 选择了颜色切换商品图片
function changeGoodImgWhenClickColor() {
if (hasChooseColor && curColorIndex) {
if (hasChooseColor && curColorIndex >= 0) {
$imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide');
}
}
... ...
... ... @@ -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();
... ...
... ... @@ -120,7 +120,7 @@
.freebie-and-advance-buy {
padding: 20rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
//border-bottom: 1px solid #e0e0e0;
> li {
box-sizing: border-box;
... ... @@ -152,6 +152,7 @@
}
.activity-title{
border-top: 1px solid #e0e0e0;
font-size: 32rem / $pxConvertRem;
padding: 20rem / $pxConvertRem 20rem / $pxConvertRem 0;
}
... ...
... ... @@ -110,7 +110,7 @@
</ul>
<form id="msg" action="" method="post">
<textarea name="msg" rows="2" maxlength="40" placeholder="留言">{{msg}}</textarea>
<input type="text" name="msg" value="{{msg}}" maxlength="40" placeholder="留言">
</form>
</section>
... ...
... ... @@ -42,6 +42,7 @@
{{/if}}
{{/ promotionInfo}}
{{#if promotionInfo}}
<div class="activity">
<ul>
{{# promotionInfo}}
... ... @@ -49,6 +50,7 @@
{{/ promotionInfo}}
</ul>
</div>
{{/if}}
<div class="price-compute">
<p>
... ...
... ... @@ -413,6 +413,7 @@ class CartModel
//gift=>是否赠品,advanceBuy=>是否加价购;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['gift'] = true;
$oneGoods['price'] = Helpers::transPrice($single['sale_price']);
} elseif ($single['goods_type'] == 'price_gift') {
$oneGoods['advanceBuy'] = true;
$oneGoods['price'] = Helpers::transPrice($single['sale_price']);
... ...
... ... @@ -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'; // 默认区号
... ...
... ... @@ -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, // 地区编号
... ...