|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Http\Controllers\Wap\Pay;
|
|
|
|
|
|
+use App\Modules\Book\Services\ChapterService;
|
|
|
use App\Modules\Subscribe\Services\SubstituteOrderService;
|
|
|
use App\Modules\User\Services\ReadRecordService;
|
|
|
use Illuminate\Routing\Controller;
|
|
@@ -523,9 +524,14 @@ class OrdersController extends Controller
|
|
|
$url = str_replace_last('?','&',$url);
|
|
|
}
|
|
|
$url_info = parse_url($url);
|
|
|
- if(isset($url_info['query']) && !empty($url_info['query']) ){
|
|
|
- parse_str($url_info['query'],$path);
|
|
|
- if(isset($path['success']) && $path['success'] == 0){
|
|
|
+ if (isset($url_info['query']) && !empty($url_info['query'])) {
|
|
|
+ parse_str($url_info['query'], $path);
|
|
|
+ if (isset($path['success']) && $path['success'] == 0) {
|
|
|
+ if (isset($url_info['path']) && str_contains($url_info['path'], 'reader') && isset($path['cid']) && !empty($path['cid'])) {
|
|
|
+ $chapter_info = ChapterService::getChapterNameByIdNoCheck($path['cid']);
|
|
|
+ $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);
|
|
|
}
|
|
|
}
|