InstallController.class.php
2.86 KB
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
<?php
/**
* 套件应用安装初始化数据
* 直播
* @author zhoutao
* @date 2017-09-27 10:05:30
*/
namespace Rpc\Controller\Common;
use Common\Common\Vhall;
use Common\Service\MainService;
use Common\Service\RangeService;
use Common\Service\StudioPlaybackService;
use Common\Common\Constant;
use Common\Service\VhallService;
class InstallController extends AbstractController
{
public function Index()
{
$vhall_service = new VhallService();
$postData = [
'liveName' => '【系统预设】员圈直播使用教学',
'liveDesc' => '【员圈直播】适用于企业内部培训、产品发布、营销推广、渠道招商等多样化的适用场景,让传播更直观和生动。
具备以下特性:
(1)主讲人专属PC直播间,支持“文档+视频”、“单视频”、“文档+语音”三种直播布局;
(2)权限控制,高度保密,限企业内部员工观看;
(3)支持在线实时互动,主讲人可发起公告、禁言、踢人等操作
(4)直播间支持文档演示、白板演示、签到功能;
(5)直播视频支持回放,内容可沉淀二次传播。
此内容为系统预设内容,旨在帮助使用者熟悉了解「员圈直播」应用',
'liveStartTime' => MILLI_TIME+60*10000,
'liveTimeLength' => '10', // 时长分钟
'liveLayout' => '3', // 视频+文档
'liveCover' => 'https://st.vchangyi.com/yuanquan/live/banner.jpg', // 封面图
'livePassword' => 'yq0001', // 直播命令
'livePublished' => '0', // 草稿
'liveScopeAll' => '1', // 全公司
'liveHost'=>'员圈小助手'
];
$liveInfo = Vhall::instance()->add($postData);
try {
$vhall_service->start_trans();
$setting = [
'vh_id' => $liveInfo['id'],
'teacher_id' => '',
'teacher_type' => Constant::OUT_TEACHER_TYPE, // 外部讲师
'teacher_name' => '员圈小助手', // 外部讲师
'teacher_face' => 'https://st.vchangyi.com/yuanquan/face.png', // 讲师图像
'teacher_desc' => '高级培训讲师',
'notice_posting' => Constant::NOTICE_POSTING_TRUE, // 不推送消息
'notice_will_type' => Constant::NOTICE_WILL_TYPE_OFF, // 关闭开始前分钟数
'notice_will_start' => 0,
'notice_start' => Constant::NOTICE_START_TRUE, // 直播开始时不推送消息提醒
'recomend' => Constant::RECOMEND_TRUE, // 移动端首页不推荐
];
$vhall_service->insert($setting);
$vhall_service->commit();
} catch (\Exception $e) {
$vhall_service->rollback();
E($e->getCode() . ':' . $e->getMessage());
}
return true;
}
}