Merge remote-tracking branch 'origin/master'
Showing
13 changed files
with
29 additions
and
55 deletions
compile/m.yohobuy.com/1.3.36/place.php
0 → 100644
compile/m.yohobuy.com/1.3.37/place.php
0 → 100644
@@ -156,15 +156,19 @@ class RegData | @@ -156,15 +156,19 @@ class RegData | ||
156 | * @param string $area 地区号 如"86" | 156 | * @param string $area 地区号 如"86" |
157 | * @param string $mobile 手机号 | 157 | * @param string $mobile 手机号 |
158 | * @param string $password 登录密码 | 158 | * @param string $password 登录密码 |
159 | + * @param string $shoppingKey 未登录用户唯一识别码, 默认为空 | ||
159 | * @return array | 160 | * @return array |
160 | */ | 161 | */ |
161 | - public static function regMobile($area, $mobile, $password) | 162 | + public static function regMobile($area, $mobile, $password, $shoppingKey = null) |
162 | { | 163 | { |
163 | $param = Yohobuy::param(); | 164 | $param = Yohobuy::param(); |
164 | $param['method'] = 'app.passport.register'; | 165 | $param['method'] = 'app.passport.register'; |
165 | $param['area'] = $area; | 166 | $param['area'] = $area; |
166 | $param['profile'] = $mobile; | 167 | $param['profile'] = $mobile; |
167 | $param['password'] = $password; | 168 | $param['password'] = $password; |
169 | + if (!empty($shoppingKey)) { | ||
170 | + $param['shopping_key'] = $shoppingKey; | ||
171 | + } | ||
168 | $param['client_secret'] = Sign::getSign($param); | 172 | $param['client_secret'] = Sign::getSign($param); |
169 | 173 | ||
170 | return Yohobuy::post(Yohobuy::API_URL, $param); | 174 | return Yohobuy::post(Yohobuy::API_URL, $param); |
@@ -196,7 +196,7 @@ class NewsaleData | @@ -196,7 +196,7 @@ class NewsaleData | ||
196 | $param = Yohobuy::param(); | 196 | $param = Yohobuy::param(); |
197 | $param['method'] = 'app.search.top'; | 197 | $param['method'] = 'app.search.top'; |
198 | $param['gender'] = $gender; | 198 | $param['gender'] = $gender; |
199 | - $param['yh_channel'] = $gender; | 199 | + $param['yh_channel'] = $channel; |
200 | !empty($sort) && $param['sort'] = $sort; | 200 | !empty($sort) && $param['sort'] = $sort; |
201 | !empty($tab_id) && $param['tab_id'] = $tab_id; | 201 | !empty($tab_id) && $param['tab_id'] = $tab_id; |
202 | $param['page'] = $page; | 202 | $param['page'] = $page; |
@@ -169,23 +169,4 @@ function main() { | @@ -169,23 +169,4 @@ function main() { | ||
169 | 169 | ||
170 | loading.showLoadingMask(); | 170 | loading.showLoadingMask(); |
171 | 171 | ||
172 | -$(document).ready(main); | ||
173 | - | ||
174 | -$('.box').on('click', function () { | ||
175 | - var url = $('.payapp-list a').attr('href'), | ||
176 | - theRequest = [], | ||
177 | - orderCode, | ||
178 | - payment; | ||
179 | - | ||
180 | - if (url.indexOf("?") != -1) { | ||
181 | - theRequest = url.split('?')[1].split("&"); | ||
182 | - orderCode = theRequest[0].split('=')[1]; | ||
183 | - payment = theRequest[1].split('=')[1]; | ||
184 | - } | ||
185 | - | ||
186 | - $.ajax({ | ||
187 | - url: '/shopping/pay/addPaymentInterval?orderCode=' + orderCode + '&payment=' + payment, | ||
188 | - method: 'get' | ||
189 | - }); | ||
190 | -}); | ||
191 | - | 172 | +$(document).ready(main); |
@@ -53,32 +53,11 @@ | @@ -53,32 +53,11 @@ | ||
53 | </section> | 53 | </section> |
54 | 54 | ||
55 | <ul class="cost block"> | 55 | <ul class="cost block"> |
56 | - <li> | ||
57 | - 商品总金额 | ||
58 | - <span>{{sumPrice}}</span> | ||
59 | - </li> | ||
60 | - {{#if salePrice}} | ||
61 | - <li> | ||
62 | - 活动金额 | ||
63 | - <span>{{salePrice}}</span> | ||
64 | - </li> | ||
65 | - {{/if}} | ||
66 | - <li> | ||
67 | - 运费 | ||
68 | - <span>{{freight}}</span> | 56 | + {{#each orderBalance}} |
57 | + <li> {{promotion}}: | ||
58 | + <span>{{account}}</span> | ||
69 | </li> | 59 | </li> |
70 | - {{#if promo_code_amount}} | ||
71 | - <li> | ||
72 | - 优惠码 | ||
73 | - <span>{{promo_code_amount}}</span> | ||
74 | - </li> | ||
75 | - {{/if}} | ||
76 | - {{#if coupon}} | ||
77 | - <li> | ||
78 | - 优惠券 | ||
79 | - <span>{{coupon}}</span> | ||
80 | - </li> | ||
81 | - {{/if}} | 60 | + {{/each}} |
82 | <li> | 61 | <li> |
83 | 实付金额 | 62 | 实付金额 |
84 | <span>{{price}}</span> | 63 | <span>{{price}}</span> |
@@ -290,9 +290,10 @@ class RegController extends AbstractAction | @@ -290,9 +290,10 @@ class RegController extends AbstractAction | ||
290 | UdpLog::info('【注册】密码不符合规范setpassword','password:'.$password); | 290 | UdpLog::info('【注册】密码不符合规范setpassword','password:'.$password); |
291 | break; | 291 | break; |
292 | } | 292 | } |
293 | - | 293 | + //购物车key |
294 | + $shoppingKey = Helpers::getShoppingKeyByCookie(); | ||
294 | /* 验证注册的标识码是否有效 */ | 295 | /* 验证注册的标识码是否有效 */ |
295 | - $data = RegData::regMobile($area, $mobile, $password); | 296 | + $data = RegData::regMobile($area, $mobile, $password, $shoppingKey); |
296 | if (!isset($data['code']) || $data['code'] != 200) { | 297 | if (!isset($data['code']) || $data['code'] != 200) { |
297 | break; | 298 | break; |
298 | } | 299 | } |
@@ -58,6 +58,11 @@ class PayController extends AbstractAction | @@ -58,6 +58,11 @@ class PayController extends AbstractAction | ||
58 | $this->helpJsRedirect('订单已经取消', 'window.location="' . Helpers::url('/home/orders/detail', array('order_code' => $orderCode)) .'";'); | 58 | $this->helpJsRedirect('订单已经取消', 'window.location="' . Helpers::url('/home/orders/detail', array('order_code' => $orderCode)) .'";'); |
59 | break; | 59 | break; |
60 | } | 60 | } |
61 | + | ||
62 | + //锁单接口 | ||
63 | + $paymentId = $this->get('payment_type', 0); | ||
64 | + $prePayInfo = CartData::savePrePayInfo($uid, $orderCode, $paymentId); | ||
65 | + UdpLog::info("【锁订单接口】,orderCode:{$orderCode}", array('prePayInfo' => $prePayInfo)); | ||
61 | 66 | ||
62 | $totalFee = $orderDetail['data']['payment_amount'] * 100; | 67 | $totalFee = $orderDetail['data']['payment_amount'] * 100; |
63 | $reqParams = new AliwapReqparams($orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], '', false); | 68 | $reqParams = new AliwapReqparams($orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], '', false); |
@@ -120,6 +125,10 @@ class PayController extends AbstractAction | @@ -120,6 +125,10 @@ class PayController extends AbstractAction | ||
120 | UdpLog::info('【wechat支付】获取wechat标识为空', 'orderCode:'.$orderCode.'uid:'.$uid.'返回openId:'.$openId); | 125 | UdpLog::info('【wechat支付】获取wechat标识为空', 'orderCode:'.$orderCode.'uid:'.$uid.'返回openId:'.$openId); |
121 | break; | 126 | break; |
122 | } | 127 | } |
128 | + | ||
129 | + //锁单接口 | ||
130 | + $prePayInfo = CartData::savePrePayInfo($uid, $orderCode, 22); | ||
131 | + UdpLog::info("【微信锁订单接口】,orderCode:{$orderCode}", array('prePayInfo' => $prePayInfo)); | ||
123 | 132 | ||
124 | //统一下单 | 133 | //统一下单 |
125 | $tools = new JsApiPay(); | 134 | $tools = new JsApiPay(); |
@@ -162,7 +171,7 @@ class PayController extends AbstractAction | @@ -162,7 +171,7 @@ class PayController extends AbstractAction | ||
162 | UdpLog::info('【支付时间校验】参数校验', 'orderCode:'.$orderCode.'uid:'.$uid.'payment:'.$payment); | 171 | UdpLog::info('【支付时间校验】参数校验', 'orderCode:'.$orderCode.'uid:'.$uid.'payment:'.$payment); |
163 | break; | 172 | break; |
164 | } | 173 | } |
165 | - | 174 | + |
166 | $res = CartData::savePrePayInfo($uid, $orderCode, $payment); | 175 | $res = CartData::savePrePayInfo($uid, $orderCode, $payment); |
167 | $data = array('code'=>$res['code'],'message'=>$res['message'],'data'=>$res['data']); | 176 | $data = array('code'=>$res['code'],'message'=>$res['message'],'data'=>$res['data']); |
168 | 177 |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.35" | 53 | +application.version = "1.3.37" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.35" | 53 | +application.version = "1.3.37" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.35" | 53 | +application.version = "1.3.37" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.35" | 53 | +application.version = "1.3.37" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
-
Please register or login to post a comment