Authored by 郭成尧

冲突解决

... ... @@ -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.
... ... @@ -718,7 +718,8 @@ require("js/guang/list");
require("js/guang/detail");
require("js/guang/star-classroom");
require("js/guang/calendar");
require("js/guang/collocation-list");
require("js/guang/collocation-list");
require("js/guang/check-top");
});
define("js/guang/plus-star/list", ["jquery","lazyload","swiper","index"], function(require, exports, module){
/**
... ... @@ -1947,16 +1948,20 @@ $('.add-intimacy').on('touchstart', function(event) {
// 关闭日历弹出窗事件
$('.pop-intimacy .pop-close, .classroom-mask').on('click', function() {
$('.pop-intimacy').css({
zIndex: '-1'
}).hide();
$('.classroom-mask').css({
zIndex: '-1'
}).hide();
// $('.pop-intimacy').css({
// zIndex: '-1'
// }).hide();
// $('.classroom-mask').css({
// zIndex: '-1'
// }).hide();
$('body').css({
overflow: 'visible'
});
// $('body').css({
// overflow: 'visible'
// });
// location.reload();
history.go(0);
});
function setAvatar() {
... ... @@ -2098,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>
... ... @@ -2109,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',
... ... @@ -2133,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'));
},
... ... @@ -2212,14 +2233,53 @@ $(document).on('touchstart', '.collection', function(event) {
}
if (code === 201) {
window.location = data.data;
if ($('#collocation-link').length <= 0) {
$('body').append('<a href=\'' + data.data + '\' style="display:none;" id="collocation-link">' +
'<span class="collocation-link"></span></a>');
}
$('.collocation-link').click();
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
});
define("js/guang/check-top", ["jquery"], function(require, exports, module){
/**
* 星潮教室-top100
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/4/12
*/
var $ = require("jquery");
$('body').addClass('star-class-body');
function setAvatar($userAvatar) {
var myImage = new Image(),
avatar;
// 部分老用户没有头像,显示默认头像
avatar = $userAvatar.data('avatar');
myImage.src = avatar;
myImage.onload = function() {
$userAvatar.css('background-image', 'url(' + avatar + ')');
};
}
if ($('.ranking-area li').length > 0) {
$.each($('.ranking-area li'), function(key, item) {
setAvatar($(item).find('.rank-avatar'));
});
}
if ($('.user-avatar').attr('data-avatar') !== '') {
setAvatar($('.user-avatar'));
}
});
define("js/home/entry", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
/**
... ... @@ -11873,11 +11933,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'));
});
... ... @@ -11978,7 +12042,7 @@ function phoneHidden(phone) {
$('.info-phone').html(phoneHidden($('.info-phone').html()));
if (orderInfo('address').is_support === 'N') {
if (orderInfo('address') && orderInfo('address').is_support === 'N') {
orderInfo('deliveryId', $('.delivery-id .icon-cb-radio').data('id'));
orderCompute();
}
... ...
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'));
});
... ... @@ -343,7 +347,7 @@ function phoneHidden(phone) {
$('.info-phone').html(phoneHidden($('.info-phone').html()));
if (orderInfo('address').is_support === 'N') {
if (orderInfo('address') && orderInfo('address').is_support === 'N') {
orderInfo('deliveryId', $('.delivery-id .icon-cb-radio').data('id'));
orderCompute();
}
\ No newline at end of file
... ...
... ... @@ -8,13 +8,18 @@ var $ = require('jquery'),
tip = require('../plugin/tip'),
loading = require('../plugin/loading'),
lazyLoad = require('yoho.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',
... ... @@ -32,6 +37,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'));
},
... ... @@ -111,11 +127,16 @@ $(document).on('touchstart', '.collection', function(event) {
}
if (code === 201) {
window.location = data.data;
if ($('#collocation-link').length <= 0) {
$('body').append('<a href=\'' + data.data + '\' style="display:none;" id="collocation-link">' +
'<span class="collocation-link"></span></a>');
}
$('.collocation-link').click();
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
\ No newline at end of file
});
... ...
... ... @@ -12,4 +12,5 @@ require('./list');
require('./detail');
require('./star-classroom');
require('./calendar');
require('./collocation-list');
\ No newline at end of file
require('./collocation-list');
require('./check-top');
\ No newline at end of file
... ...
... ... @@ -251,16 +251,20 @@ $('.add-intimacy').on('touchstart', function(event) {
// 关闭日历弹出窗事件
$('.pop-intimacy .pop-close, .classroom-mask').on('click', function() {
$('.pop-intimacy').css({
zIndex: '-1'
}).hide();
$('.classroom-mask').css({
zIndex: '-1'
}).hide();
// $('.pop-intimacy').css({
// zIndex: '-1'
// }).hide();
// $('.classroom-mask').css({
// zIndex: '-1'
// }).hide();
$('body').css({
overflow: 'visible'
});
// $('body').css({
// overflow: 'visible'
// });
// location.reload();
history.go(0);
});
function setAvatar() {
... ...
... ... @@ -735,11 +735,6 @@
line-height: 46px;
color: #b0b0b0;
margin-top: 10px;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
img {
... ... @@ -749,16 +744,8 @@
.title {
font-size: 40px;
line-height: 48px;
a {
color: #fff;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
color: #fff;
width: 100%;
}
.count-area {
... ... @@ -890,6 +877,7 @@
text-align: center;
color: #fff;
line-height: 32px;
font-size: 20px;
}
}
... ...
... ... @@ -4,7 +4,7 @@
<a href="{{url}}"><img class="lazy" src ="" data-original="{{img}}" /></a>
{{/if}}
<div class="cont-area">
<h2 class="title"><a href="{{url}}">{{title}}</a></h2>
<a href="{{url}}"><h2 class="title">{{title}}</h2></a>
<p class="cont-txt">{{content}}</p>
<div class="count-area">
<span class="time"><i class="iconfont time-ico">&#xe603;</i>{{time}}</span>
... ...
... ... @@ -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);
$orderInfo['paymentType'] = isset($orderInfo['paymentType']) ? $orderInfo['paymentType'] : '';
$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按钮
... ...