Authored by 梁志锋

Merge remote-tracking branch 'origin/master'

... ... @@ -156,15 +156,19 @@ class RegData
* @param string $area 地区号 如"86"
* @param string $mobile 手机号
* @param string $password 登录密码
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
* @return array
*/
public static function regMobile($area, $mobile, $password)
public static function regMobile($area, $mobile, $password, $shoppingKey = null)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.register';
$param['area'] = $area;
$param['profile'] = $mobile;
$param['password'] = $password;
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
... ...
... ... @@ -196,7 +196,7 @@ class NewsaleData
$param = Yohobuy::param();
$param['method'] = 'app.search.top';
$param['gender'] = $gender;
$param['yh_channel'] = $gender;
$param['yh_channel'] = $channel;
!empty($sort) && $param['sort'] = $sort;
!empty($tab_id) && $param['tab_id'] = $tab_id;
$param['page'] = $page;
... ...
... ... @@ -169,23 +169,4 @@ function main() {
loading.showLoadingMask();
$(document).ready(main);
$('.box').on('click', function () {
var url = $('.payapp-list a').attr('href'),
theRequest = [],
orderCode,
payment;
if (url.indexOf("?") != -1) {
theRequest = url.split('?')[1].split("&");
orderCode = theRequest[0].split('=')[1];
payment = theRequest[1].split('=')[1];
}
$.ajax({
url: '/shopping/pay/addPaymentInterval?orderCode=' + orderCode + '&payment=' + payment,
method: 'get'
});
});
$(document).ready(main);
\ No newline at end of file
... ...
{
"name": "yohobuy",
"version": "1.3.35",
"version": "1.3.37",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -53,32 +53,11 @@
</section>
<ul class="cost block">
<li>
商品总金额
<span>{{sumPrice}}</span>
</li>
{{#if salePrice}}
<li>
活动金额
<span>{{salePrice}}</span>
</li>
{{/if}}
<li>
运费
<span>{{freight}}</span>
{{#each orderBalance}}
<li> {{promotion}}:
<span>{{account}}</span>
</li>
{{#if promo_code_amount}}
<li>
优惠码
<span>{{promo_code_amount}}</span>
</li>
{{/if}}
{{#if coupon}}
<li>
优惠券
<span>{{coupon}}</span>
</li>
{{/if}}
{{/each}}
<li>
实付金额
<span>{{price}}</span>
... ...
... ... @@ -290,9 +290,10 @@ class RegController extends AbstractAction
UdpLog::info('【注册】密码不符合规范setpassword','password:'.$password);
break;
}
//购物车key
$shoppingKey = Helpers::getShoppingKeyByCookie();
/* 验证注册的标识码是否有效 */
$data = RegData::regMobile($area, $mobile, $password);
$data = RegData::regMobile($area, $mobile, $password, $shoppingKey);
if (!isset($data['code']) || $data['code'] != 200) {
break;
}
... ...
... ... @@ -58,6 +58,11 @@ class PayController extends AbstractAction
$this->helpJsRedirect('订单已经取消', 'window.location="' . Helpers::url('/home/orders/detail', array('order_code' => $orderCode)) .'";');
break;
}
//锁单接口
$paymentId = $this->get('payment_type', 0);
$prePayInfo = CartData::savePrePayInfo($uid, $orderCode, $paymentId);
UdpLog::info("【锁订单接口】,orderCode:{$orderCode}", array('prePayInfo' => $prePayInfo));
$totalFee = $orderDetail['data']['payment_amount'] * 100;
$reqParams = new AliwapReqparams($orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], '', false);
... ... @@ -120,6 +125,10 @@ class PayController extends AbstractAction
UdpLog::info('【wechat支付】获取wechat标识为空', 'orderCode:'.$orderCode.'uid:'.$uid.'返回openId:'.$openId);
break;
}
//锁单接口
$prePayInfo = CartData::savePrePayInfo($uid, $orderCode, 22);
UdpLog::info("【微信锁订单接口】,orderCode:{$orderCode}", array('prePayInfo' => $prePayInfo));
//统一下单
$tools = new JsApiPay();
... ... @@ -162,7 +171,7 @@ class PayController extends AbstractAction
UdpLog::info('【支付时间校验】参数校验', 'orderCode:'.$orderCode.'uid:'.$uid.'payment:'.$payment);
break;
}
$res = CartData::savePrePayInfo($uid, $orderCode, $payment);
$data = array('code'=>$res['code'],'message'=>$res['message'],'data'=>$res['data']);
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.3.35"
application.version = "1.3.37"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.3.35"
application.version = "1.3.37"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.3.35"
application.version = "1.3.37"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.3.35"
application.version = "1.3.37"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...