mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 20:00:27 +08:00
Merge branch 'develop' of https://gitee.com/koogua/course-tencent-cloud into demo
# Conflicts: # app/Http/Api/Controllers/ChapterController.php
This commit is contained in:
commit
7ceee5d26e
@ -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' => '没有访问章节权限']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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
Loading…
x
Reference in New Issue
Block a user