|
@@ -606,6 +606,14 @@ class OrdersController extends Controller
|
|
|
if (substr_count($url, '?') > 1) {
|
|
|
$url = str_replace_last('?', '&', $url);
|
|
|
}
|
|
|
+ $order_info = OrderService::getByTradeNo($order);
|
|
|
+ $uid = $order_info->uid;
|
|
|
+ $bind_info = UserBindPhoneService::bindInfo($uid);
|
|
|
+ $page = 'pay.order.wait';
|
|
|
+ if(!$bind_info){
|
|
|
+ $page = 'pay.order.bindPhone';
|
|
|
+ }
|
|
|
+
|
|
|
$url_info = parse_url($url);
|
|
|
if (isset($url_info['query']) && !empty($url_info['query'])) {
|
|
|
parse_str($url_info['query'], $path);
|
|
@@ -615,20 +623,21 @@ class OrdersController extends Controller
|
|
|
$path['cid'] = $chapter_info->prev_cid;
|
|
|
$url = sprintf('%s://%s/reader?%s', $url_info['scheme'], $url_info['host'], http_build_query($path));
|
|
|
}
|
|
|
- return redirect($url);
|
|
|
+ if(!$bind_info){
|
|
|
+ return view('pay.order.bindPhone', compact('order', 'url'));
|
|
|
+ }else{
|
|
|
+ return redirect($url);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (isset($url_info['path']) && str_contains($url_info['path'], 'pay')) {
|
|
|
$url = sprintf('%s://%s/recent', $url_info['scheme'], $url_info['host']);
|
|
|
- return redirect($url);
|
|
|
- }
|
|
|
-
|
|
|
- $order_info = OrderService::getByTradeNo($order);
|
|
|
- $uid = $order_info->uid;
|
|
|
- $bind_info = UserBindPhoneService::bindInfo($uid);
|
|
|
- $page = 'pay.order.wait';
|
|
|
- if(!$bind_info){
|
|
|
- $page = 'pay.order.bindPhone';
|
|
|
+ //return redirect($url);
|
|
|
+ if(!$bind_info){
|
|
|
+ return view('pay.order.bindPhone', compact('order', 'url'));
|
|
|
+ }else{
|
|
|
+ return redirect($url);
|
|
|
+ }
|
|
|
}
|
|
|
return view($page, compact('order', 'url'));
|
|
|
}
|