Authored by 毕凯

合并代码

... ... @@ -443,13 +443,13 @@ class Helpers
* @param string $areaMobile
* @return boolean
*/
public static function verifyAreaMobile($areaMobile)
public static function verifyAreaMobile($areaMobile, $area)
{
if (empty($areaMobile)) {
return false;
}
if (!strpos($areaMobile, '-')) {
return self::areaMobielVerify($areaMobile);
return self::areaMobielVerify($areaMobile, $area);
} else {
$mobileData = explode('-', $areaMobile);
if (count($mobileData) != 2) {
... ...
... ... @@ -8,13 +8,13 @@ var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
Hammer = require('yoho.hammer');
var chosePanel = require('./chose-panel'),
cartInfo = require('./cart-info').cartInfo;
var chosePanel = require('./chose-panel');
var $cartContent = $('.cart-content');
var navHammer,
cartType = 'ordinary';
cartType = 'ordinary',
cartInfo;
require('./good');
... ... @@ -28,6 +28,12 @@ navHammer.on('tap', function(e) {
return;
}
if (cartType === 'ordinary') {
cartType = 'advance';
} else {
cartType = 'ordinary';
}
$this.siblings('.active').removeClass('active');
$this.addClass('active');
... ... @@ -41,7 +47,7 @@ navHammer.on('tap', function(e) {
$('.btn-balance').on('touchend', function() {
window.location.href = '/shoppingCart/orderEnsure?cartType=' + cartType;
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
});
//$('.advance-buy').on('touchend', function() {
... ... @@ -66,4 +72,4 @@ $('.chose').on('touchend', function() {
cartInfo = 0;
\ No newline at end of file
cartInfo = 0;
... ...
... ... @@ -44,7 +44,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
$.ajax({
type: 'GET',
url: '/shoppingCart/select',
url: '/cart/index/select',
data: {
id: id
}
... ... @@ -58,7 +58,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
}
$.ajax({
type: 'GET',
url: '/shoppingCart/getCartData',
url: '/cart/index/getCartData',
data: {
id: id
},
... ... @@ -79,18 +79,22 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
});
}).on('touchstart', '.icon-edit', function() {
var $this = $(this),
$cartgood = $this.closest('.shopping-cart-good'),
$viewGood = $cartgood.find('.deps'),
$editGoot = $cartgood.find('.calculate-num');
if ($viewGood.hasClass('show')) {
$viewGood.removeClass('show').addClass('hide');
$editGoot.removeClass('hide').addClass('show');
} else {
$viewGood.removeClass('hide').addClass('show');
$editGoot.removeClass('show').addClass('hide');
}
//var $this = $(this);
//
//var $cartgood = $this.closest('.shopping-cart-good');
//
////var id = $this.closest('.shopping-cart-good').data('id');
//
//var $viewGood = $cartgood.find('.deps');
// $editGoot = $cartgood.find('.calculate-num');
//
//if ($viewGood.hasClass('show')) {
// $viewGood.removeClass('show').addClass('hide');
// $editGoot.removeClass('hide').addClass('show');
//} else {
// $viewGood.removeClass('hide').addClass('show');
// $editGoot.removeClass('show').addClass('hide');
//}
}).on('touchstart', '.icon-del', function(e) {
... ... @@ -116,7 +120,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
$.ajax({
method: 'post',
url: '/shoppingCart/del',
url: '/cart/index/del',
data: {
id: id
}
... ... @@ -163,11 +167,6 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
// });
//})
$('.btn-balance').on('touchend', function() {
window.location.href = '/shoppingCart/orderEnsure?cartType=' + 'ordinary';
});
$('.down').on('touchend', function() {
chosePanel.show();
});
... ... @@ -176,7 +175,7 @@ $('.cut').on('touchend', function() {
$.ajax({
type: 'GET',
url: '/shoppingCart/modify',
url: '/cart/index/modify',
data: {
old_product_sku: id,
new_product_sku: id,
... ...
... ... @@ -199,9 +199,9 @@ $yohoPage.on('touchstart', '.tap-hightlight', function() {
$(this).removeClass('highlight');
});
$('.nav-home').on('touchstart', function() {
$('.homebuttom').toggleClass('none');
});
// $('.nav-home').on('touchstart', function() {
// $('.homebuttom').toggleClass('none');
// });
(function() {
var lastTime = 0,
... ...
... ... @@ -47,7 +47,7 @@
{{/if}}
<span class="iconfont icon-edit">&#xe61e;</span>
<span class="iconfont icon-del">&#xe621;</span>
</p>
<p class="row">
... ...
... ... @@ -4,14 +4,14 @@
<a href="{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}" class="iconfont nav-back">&#xe610;</a>
{{/navBack}}
{{#navHome}}
<a class="iconfont nav-home">&#xe611;</a>
<a href="{{.}}" class="iconfont nav-home">&#xe611;</a>
{{/navHome}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
{{/navTitle}}
{{# navBtn}}
<!-- <span class="nav-btn">{{.}}</span> -->
<i class="iconfont nav-home">&#xe638;</i>
<!-- <i class="iconfont nav-home">&#xe638;</i> -->
{{/ navBtn}}
</header>
<div class="homebuttom none">
... ...
... ... @@ -41,11 +41,12 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this->setTitle('个人中心');
$this->setNavHeader('个人中心', SITE_MAIN . '/?go=1', '', true);
$this->setNavHeader('个人中心', SITE_MAIN . '/?go=1');
$data = array(
'myIndexPage' => true,
'showDownloadApp' => true,
'navHome' => true,
'pageFooter' => true,
'cartUrl' => Helpers::url('/cart/index/index', null),
'signinUrl' => Helpers::url('/signin.html', array('refer' => Helpers::url('/home'))),
... ...
... ... @@ -385,7 +385,11 @@ class UserModel
// 处理YOHO币数据
if(isset($yohoCoin['data']) && !empty($yohoCoin['data'])){
$coinList = $yohoCoin['data']['coinlist'];
$data['money'] = $yohoCoin['data']['total'];
// 获取有货币总数
$total = self::getYohoCoinData($uid);
$data['money'] = !empty($total) ? $total['yohoCoin']['coinNum'] : 0;
foreach($coinList as $key => $val){
$result[$key]['title'] = $val['message'];
$result[$key]['time'] = $val['date'];
... ...
... ... @@ -167,7 +167,6 @@ class DetailModel
$colorStorageNum = 0;
$totalStorageNum = 0; // 总库存数
foreach ($baseInfo['goodsList'] as $value) {
$sizeList = array();
$colorStorageNum = 0;
$sizeStorageStr = '';
... ...
... ... @@ -286,7 +286,7 @@ class IndexController extends AbstractAction
$uid = $this->getUid(true);
$cartGoods = CartModel::getCartData($uid, $shoppingKey);
if (empty($cartGoods) || isset($cartGoods['isEmptyCart'])) {
$this->go(Helpers::url('/shoppingcart'));
$this->go(Helpers::url('/cart/index/index'));
}
$cartType = $this->get('cartType', 'ordinary');
... ...
... ... @@ -113,7 +113,7 @@ class LoginController extends AbstractAction
/* 判断参数是否有效 */
$verifyEmail = Helpers::verifyEmail($profile);
$verifyMobile = ($area === '86') ? Helpers::verifyMobile($profile) : Helpers::verifyAreaMobile($profile);
$verifyMobile = ($area === '86') ? Helpers::verifyMobile($profile) : Helpers::verifyAreaMobile($profile, $area);
if (!$verifyEmail && !$verifyMobile) {
break;
}
... ...