mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 20:06:09 +08:00
修复后台权限和低品质视频无法播放
This commit is contained in:
parent
0867063d9c
commit
ae505a4815
@ -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',
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user