|
@@ -130,7 +130,7 @@ class OrdersController extends Controller
|
|
|
$openid = $request->has('openid') ? $request->get('openid') : '';
|
|
|
$bid = $request->has('bid') ? $request->get('bid') : 0;
|
|
|
$hash_bid = $bid;
|
|
|
- $fromtype = $request->has('fromtype') ? $request->get('fromtype') : $request->get('from','main');
|
|
|
+ $fromtype = $request->has('fromtype') ? $request->get('fromtype') : $request->get('from', 'main');
|
|
|
|
|
|
if ($fromtype && strlen($fromtype) > 50) {
|
|
|
try {
|
|
@@ -971,6 +971,14 @@ class OrdersController extends Controller
|
|
|
$page = 'pay.order.bindPhone';
|
|
|
}
|
|
|
$url = urldecode($request->input('redirect'));
|
|
|
+ if (strpos($url, '/reader')) {
|
|
|
+ preg_match('bid=(\w+)', $url, $matchs);
|
|
|
+ $bid = Hashids::decode($matchs[1])[0];
|
|
|
+ $record = ReadRecordService::getRecordByUidBid($uid, $bid);
|
|
|
+ $cid = explode('_', $record)[0];
|
|
|
+ $url = preg_replace('cid=(\d+)', 'cid=' . $cid, $url);
|
|
|
+ Log::info('reader_url :' . $url);
|
|
|
+ }
|
|
|
return view($page, compact('order', 'url', 'from'));
|
|
|
}
|
|
|
} else {
|