diff --git a/app/Http/Admin/Services/AuthNode.php b/app/Http/Admin/Services/AuthNode.php index 427c9924..136538a5 100644 --- a/app/Http/Admin/Services/AuthNode.php +++ b/app/Http/Admin/Services/AuthNode.php @@ -34,14 +34,14 @@ class AuthNode extends Service 'title' => '分类列表', 'type' => 'button', 'route' => 'admin.category.list', - 'params' => ['type' => 'course'], + 'params' => ['type' => 1], ], [ 'id' => '1-2-2', 'title' => '添加分类', 'type' => 'button', 'route' => 'admin.category.add', - 'params' => ['type' => 'course'], + 'params' => ['type' => 1], ], [ 'id' => '1-2-3', @@ -90,7 +90,7 @@ class AuthNode extends Service 'id' => '1-1-5', 'title' => '删除课程', 'type' => 'button', - 'route' => 'admin.course.edit', + 'route' => 'admin.course.delete', ], [ 'id' => '1-1-6', @@ -529,6 +529,12 @@ class AuthNode extends Service ], [ 'id' => '3-2-3', + 'title' => '交易详情', + 'type' => 'button', + 'route' => 'admin.trade.show', + ], + [ + 'id' => '3-2-4', 'title' => '交易退款', 'type' => 'button', 'route' => 'admin.trade.refund', diff --git a/app/Http/Admin/Services/Role.php b/app/Http/Admin/Services/Role.php index 86bade39..c9459b33 100644 --- a/app/Http/Admin/Services/Role.php +++ b/app/Http/Admin/Services/Role.php @@ -143,23 +143,24 @@ class Role extends Service if (in_array('admin.course.list', $routes)) { $list[] = 'admin.course.chapters'; $list[] = 'admin.chapter.lessons'; + $list[] = 'admin.chapter.resources'; } if (array_intersect(['admin.course.add', 'admin.course.edit'], $routes)) { $list[] = 'admin.chapter.add'; $list[] = 'admin.chapter.edit'; + $list[] = 'admin.chapter.create'; + $list[] = 'admin.chapter.update'; $list[] = 'admin.chapter.content'; - } - - if (array_intersect(['admin.chapter.add', 'admin.chapter.edit'], $routes)) { $list[] = 'admin.resource.create'; $list[] = 'admin.resource.update'; - $list[] = 'admin.resource.delete'; } if (in_array('admin.course.delete', $routes)) { $list[] = 'admin.chapter.delete'; $list[] = 'admin.chapter.restore'; + $list[] = 'admin.resource.delete'; + $list[] = 'admin.resource.restore'; } if (in_array('admin.category.list', $routes)) { @@ -175,6 +176,18 @@ class Role extends Service $list[] = 'admin.category.list'; } + if (in_array('admin.order.show', $routes)) { + $list[] = 'admin.order.status_history'; + } + + if (in_array('admin.trade.show', $routes)) { + $list[] = 'admin.trade.status_history'; + } + + if (in_array('admin.refund.show', $routes)) { + $list[] = 'admin.refund.status_history'; + } + $list = array_unique($list); return array_values($list); diff --git a/app/Services/ChapterVod.php b/app/Services/ChapterVod.php index fe711dc6..89d6d292 100644 --- a/app/Services/ChapterVod.php +++ b/app/Services/ChapterVod.php @@ -41,9 +41,12 @@ class ChapterVod extends Service $vodTemplates = $this->getVodTemplates(); + /** + * 腾讯云播放器只支持[od|hd|sd],遇到fd替换为od + */ foreach ($vodTemplates as $key => $template) { if ($height >= $template['height']) { - return $key; + return $key == 'fd' ? $default : $key; } }