Authored by Rock Zhang

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

... ... @@ -19,16 +19,18 @@ class BindData
/**
* 绑定前检查
*
* @param string $mobile 绑定输入手机号
* @param string $openId 第三方唯一识别码
* @param string $sourceType 登录方式 qq,sina,alipay,wechat
* @param string $mobile 绑定输入手机号
* @return array 登录返回结果
* @param int $area 所在地区
* @return array 登录返回结果
*/
public static function bindCheck($mobile, $openId, $sourceType)
public static function bindCheck($mobile, $openId, $sourceType, $area)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.check';
$param['area'] = $area;
$param['mobile'] = $mobile;
$param['open_id'] = $openId;
$param['source_type'] = $sourceType;
... ... @@ -45,7 +47,6 @@ class BindData
public static function sendBindMsg($area, $mobile)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.smsbind';
$param['mobile'] = $mobile;
$param['area'] = $area;
... ... @@ -61,7 +62,6 @@ class BindData
public static function checkBindCode($area, $mobile, $code)
{
$param = Yohobuy::param();
$param['method'] = 'app.register.validRegCode';
$param['mobile'] = $mobile;
$param['code'] = $code;
... ... @@ -73,8 +73,9 @@ class BindData
/**
* 第三方绑定手机号
* @param string $nickname 姓名
*
* @param string $openId 第三方唯一识别码
* @param string $nickname 姓名
* @param string $sourceType 登录方式
* @param string $mobile 手机号
* @param string $area 国别码
... ... @@ -90,11 +91,9 @@ class BindData
$param['nickname'] = $nickname;
$param['source_type'] = $sourceType;
$param['area'] = $area;
if (!empty($password))
{
if (!empty($password)) {
$param['password'] = $password;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
... ... @@ -109,11 +108,9 @@ class BindData
public static function changeCheck($mobile, $area)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.changeCheck';
$param['mobile'] = $mobile;
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
... ... @@ -123,9 +120,9 @@ class BindData
/**
* 换绑手机
* @param string $uid 用户Id
* @param string $code 验证码
* @param string $mobile 手机号
* @param string $area 国别码
* @param string $code 验证码
*/
public static function changeMobile($uid, $mobile, $area, $code)
{
... ... @@ -136,7 +133,6 @@ class BindData
$param['uid'] = $uid;
$param['code'] = $code;
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
... ...
... ... @@ -18,6 +18,7 @@ var $chosePanel = $('#chose-panel'),
$chosed,
$imgsThumb,
$leftNum,
$leftNumHtml,
leftNum,
confirming,
curColorIndex,
... ... @@ -41,6 +42,7 @@ function init() {
$allChoseItems = $('.chose-items');
$sizeRowList = $('.size-list ul');
$leftNum = $('#left-num');
$leftNumHtml =
$sizeRowList.eq(0).toggleClass('hide');
}
... ... @@ -305,7 +307,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
promotionId,
isEdit = 0,
numInCart = $('.num-tag').html() - 0,
num = $num.val();
num = parseInt($num.val(), 10);
//颜色尺码没有选择
if (!checkColorSizeNum()) {
... ... @@ -321,7 +323,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return;
}
leftNum = $('#left-num').val();
leftNum = $('#left-num').val() - 0;
if (num > leftNum) {
tip.show('您选择的数量超过了最大库存量~');
... ...
... ... @@ -125,7 +125,7 @@ class BindController extends AbstractAction
break;
}
$res = BindData::bindCheck($phoneNum, $openId, $sourceType);
$res = BindData::bindCheck($phoneNum, $openId, $sourceType, $areaCode);
if (!isset($res['code'])) {
break;
}
... ...