Authored by 徐祁xuqi

Merge remote-tracking branch 'origin/feature/client-type'

... ... @@ -4,6 +4,7 @@ namespace LibModels\Wap\Home;
use Api\Sign;
use Api\Yohobuy;
use Plugin\Helpers;
/**
* 购物车的数据模型
... ... @@ -382,6 +383,9 @@ class CartData
$param = Yohobuy::param();
$param['debug'] = 'Y';
$param['client_type'] = 'h5'; // 需要ERP统计WAP的下单量
if(Helpers::is_weixin()) {
$param['client_type'] = 'wechat';
}
$param['private_key'] = Yohobuy::$privateKeyList['android']; // H5默认使用Android的私钥
$param['method'] = 'app.Shopping.submit';
$param['address_id'] = $addressId;
... ...
... ... @@ -4,6 +4,7 @@ namespace LibModels\Wap\Passport;
use Api\Sign;
use Api\Yohobuy;
use Plugin\Helpers;
/**
* 绑定手机号 数据模型
... ... @@ -28,7 +29,7 @@ class BindData
*/
public static function bindCheck($mobile, $openId, $sourceType, $area)
{
$param = Yohobuy::param();
$param = Yohobuy::param();
$param['method'] = 'app.passport.signCheck';
$param['area'] = $area;
$param['mobile'] = $mobile;
... ... @@ -85,6 +86,9 @@ class BindData
{
$param = Yohobuy::param();
if(Helpers::is_weixin()) {
$param['client_type'] = 'wechat';
}
$param['method'] = 'app.passport.bind';
$param['mobile'] = $mobile;
$param['open_id'] = $openId;
... ...
... ... @@ -995,4 +995,16 @@ class Helpers
}
return $para_filter;
}
/**
* 判断是否是微信客户端
* @return boolean
*/
public static function is_weixin(){
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ) {
return true;
}
return false;
}
}
... ...