1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
| <?php
|
| namespace app\operations\controller\plus\live;
|
| use app\operations\controller\Controller;
| use app\operations\model\settings\Setting as SettingModel;
|
| /**
| * 直播设置
| */
| class Setting extends Controller
| {
| /**
| *获取直播设置
| */
| public function getSetting()
| {
| $vars['values'] = SettingModel::getItem('live');
| // 声网录制存储
| $storage = $this->getStorage();
| return $this->renderSuccess('', compact('vars', 'storage'));
| }
|
| /**
| * 直播设置
| */
| public function index()
| {
| if($this->request->isGet()){
| return $this->getSetting();
| }
| $model = new SettingModel;
| $data = $this->request->param();
| if ($model->edit('live', $data)) {
| return $this->renderSuccess('操作成功');
| }
| return $this->renderError('操作失败');
| }
|
| /**
| * 声网录制存储
| */
| private function getStorage(){
| $storage = [
| 'qiniu' => [
| 'vendor' => '0',
| 'name' => '七牛云',
| 'region' => [
| '华东' => '0',
| '华北' => '1',
| '华南' => '2',
| '北美' => '3',
| '东南亚' => '4',
| ]
| ],
| 'aliyun' => [
| 'vendor' => '2',
| 'name' => '阿里云',
| 'region' => [
| '杭州' => '0',
| '上海' => '1',
| '青岛' => '2',
| '北京' => '3',
| '张家界' => '4',
| '呼和浩特' => '5',
| '深圳' => '6',
| '香港' => '7',
| ]
| ],
| 'qcloud' => [
| 'vendor' => '3',
| 'name' => '腾讯云',
| 'region' => [
| '北京' => '1',
| '上海' => '2',
| '广州' => '3',
| '成都' => '4',
| '重庆' => '5',
| '深圳金融' => '6',
| '上海金融' => '7',
| '北京金融' => '8',
| '香港' => '9',
| ]
| ]
| ];
| return $storage;
| }
| }
|
|