1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 20:00:27 +08:00
# Conflicts:
#	app/Http/Api/Controllers/ChapterController.php
This commit is contained in:
xiaochong0302 2020-11-28 17:47:14 +08:00
commit 7ceee5d26e
4 changed files with 10 additions and 17559 deletions

View File

@ -47,9 +47,7 @@ class ChapterController extends Controller
$chapter = $service->handle($id); $chapter = $service->handle($id);
$owned = $chapter['me']['owned'] ?? false; if ($chapter['me']['owned'] == 0) {
if (!$owned) {
return $this->jsonError(['msg' => '没有访问章节权限']); return $this->jsonError(['msg' => '没有访问章节权限']);
} }

View File

@ -67,7 +67,10 @@ class ChapterInfo extends Service
'liked' => 0, 'liked' => 0,
]; ];
if ($user->id) { $me['joined'] = $this->joinedChapter ? 1 : 0;
$me['owned'] = $this->ownedChapter ? 1 : 0;
if ($user->id > 0) {
$likeRepo = new ChapterLikeRepo(); $likeRepo = new ChapterLikeRepo();
@ -84,9 +87,6 @@ class ChapterInfo extends Service
if ($this->chapterUser) { if ($this->chapterUser) {
$me['position'] = $this->chapterUser->position; $me['position'] = $this->chapterUser->position;
} }
$me['joined'] = $this->joinedChapter ? 1 : 0;
$me['owned'] = $this->ownedChapter ? 1 : 0;
} }
$result['me'] = $me; $result['me'] = $me;

View File

@ -102,6 +102,11 @@ class Wxpay extends PayService
'body' => $trade->subject, 'body' => $trade->subject,
]); ]);
/**
* 微信H5支付会检查Referer构造Referer头信息
*/
$result->headers->set('Referer', kg_site_url());
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error('Wxpay Wap Exception', [ Log::error('Wxpay Wap Exception', [

File diff suppressed because it is too large Load Diff