Authored by hf

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

... ... @@ -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) {
... ...
... ... @@ -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'];
... ...
... ... @@ -276,7 +276,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;
}
... ...