Authored by 郝肖肖

h5 购物车支付状态

... ... @@ -65,10 +65,8 @@ class Yohobuy
*/
public static function clientType()
{
if(self::isMobile()) {
return 'h5';
}
else {
return 'web';
... ... @@ -487,7 +485,6 @@ class Yohobuy
return $result;
}
/**
* 获取用户User-Agent
* @return bool
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -1959,7 +1959,9 @@ $('.pop-intimacy .pop-close, .classroom-mask').on('click', function() {
// overflow: 'visible'
// });
location.reload();
// location.reload();
history.go(0);
});
function setAvatar() {
... ... @@ -2101,7 +2103,7 @@ $(document).ready(function() {
exports.calculateMonthDays = CalendarHandler.calculateMonthDays;
});
define("js/guang/collocation-list", ["jquery","lazyload"], function(require, exports, module){
define("js/guang/collocation-list", ["jquery","lazyload","mlellipsis"], function(require, exports, module){
/**
* 星潮教室-星搭配分页加载
* @author: wsl<shuiling.wang@yoho.cn>
... ... @@ -2112,13 +2114,18 @@ var $ = require("jquery"),
tip = require("js/plugin/tip"),
loading = require("js/plugin/loading"),
lazyLoad = require("lazyload"),
ellipsis = require("mlellipsis"),
stopLoading = false;
var page = 1;
ellipsis.init();
$('body').addClass('star-class-body');
function massageAJAX(page) {
var $this, $title, $cont;
loading.showLoadingMask();
$.ajax({
type: 'GET',
... ... @@ -2136,6 +2143,17 @@ function massageAJAX(page) {
}
$('.collocation-list').append(data);
// 限制标题字数
$('.cont-area').each(function() {
$this = $(this);
$title = $this.find('.title');
$cont = $this.find('.cont-txt');
$title[0].mlellipsis(2);
$cont[0].mlellipsis(2);
});
loading.hideLoadingMask();
lazyLoad($('img.lazy'));
},
... ... @@ -2222,7 +2240,8 @@ $(document).on('touchstart', '.collection', function(event) {
tip.show('网络断开连接了~');
}
});
});
});
});
define("js/home/entry", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
/**
... ... @@ -11866,11 +11885,15 @@ if (!orderInfo('addressId')) {
orderInfo('addressId', $addressWrap.data('id'));
}
$('.dispatch-mode').on('touchend', 'li', function() {
$('.delivery-id').on('touchend', 'li', function() {
orderInfo('deliveryId', $(this).data('id'));
orderCompute();
});
$('.payment-type').on('touchend', 'li', function() {
orderInfo('paymentType', $('.icon-cb-radio', this).data('id'));
});
$('.dispatch-time').on('touchend', 'li', function() {
orderInfo('deliveryTimeId', $(this).data('id'));
});
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -238,11 +238,15 @@ if (!orderInfo('addressId')) {
orderInfo('addressId', $addressWrap.data('id'));
}
$('.dispatch-mode').on('touchend', 'li', function() {
$('.delivery-id').on('touchend', 'li', function() {
orderInfo('deliveryId', $(this).data('id'));
orderCompute();
});
$('.payment-type').on('touchend', 'li', function() {
orderInfo('paymentType', $('.icon-cb-radio', this).data('id'));
});
$('.dispatch-time').on('touchend', 'li', function() {
orderInfo('deliveryTimeId', $(this).data('id'));
});
... ...
... ... @@ -12,9 +12,9 @@
{{#currencyDetailPage}}
<a href="/home/helpDetail?code=20111130-152530&caption=如何使用YOHO币支付" class="iconfont nav-home">&#xe639;</a>
{{/currencyDetailPage}}
{{#orderEnsure}}
{{#orderDetail}}
<a href="{{serviceUrl}}" target="_blank" class="iconfont nav-home">&#xe63c;</a>
{{/orderEnsure}}
{{/orderDetail}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
{{/navTitle}}
... ...
... ... @@ -368,9 +368,9 @@ class CartModel
// cookie保存的数据
if (!empty($orderInfo)) {
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
}
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentType'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
}
// 根据地址id查询地址信息
if (isset($orderInfo['address'])) {
$address = $orderInfo['address'];
... ... @@ -392,10 +392,9 @@ class CartModel
// 配送方式
if (isset($payReturn['delivery_way'])) {
$idArr = array();
$defaultKey = 0;
$oneDeliv = array();
$isDeliveryId = true;
$deliveries = $payReturn['delivery_way'];
if (isset($orderCompute['delivery_way']) && !empty($orderCompute['delivery_way'])) {
$deliveries = $orderCompute['delivery_way'];
... ... @@ -412,15 +411,15 @@ class CartModel
$oneDeliv['cost'] = $val['delivery_way_cost'];
($val['default'] === 'Y') && $defaultKey = $key;
$idArr[$key] = $oneDeliv['id'];
if (isset($orderInfo['deliveryId']) && $orderInfo['deliveryId'] === $oneDeliv['id']) {
$oneDeliv['isSelected'] = true;
$isDeliveryId = false;
}
$result['dispatchMode'][$key] = $oneDeliv;
}
if (isset($orderInfo['deliveryId']) && isset($idArr[$orderInfo['deliveryId']])) {
$flag = array_search($orderInfo['deliveryId'], $idArr);
$flag !== false && $result['dispatchMode'][$flag]['isSelected'] = true;
} else {
if ($isDeliveryId) {
$result['dispatchMode'][$defaultKey]['isSelected'] = true;
}
}
... ... @@ -486,6 +485,7 @@ class CartModel
// 支付方式
if (isset($payReturn['payment_way'])) {
$onePay = array();
$isPaymentType = true;
foreach ($payReturn['payment_way'] as $pay) {
if ($pay['is_support'] !== 'Y') {
continue;
... ... @@ -497,12 +497,18 @@ class CartModel
$onePay['name'] = $pay['payment_type_name'];
$onePay['isSupport'] = $pay['is_support'] === 'Y';
// $onePay['default'] = ($pay['default'] === 'Y');
if ($onePay['paymentType'] == 1) {
if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) {
$onePay['recommend'] = true;
$isPaymentType = false;
}
$result['paymentWay'][] = $onePay;
}
//默认第一个
if ($isPaymentType) {
$result['paymentWay'][0]['recommend'] = true;
}
}
// 有货币
... ...
... ... @@ -323,7 +323,6 @@ class IndexController extends AbstractAction
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => $order
);
$this->setTitle('确认订单');
$this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮
... ...