|
@@ -36,6 +36,8 @@ class Video extends Apic
|
|
|
public function addone(){
|
|
|
$name = input('name','');
|
|
|
$video_file = input('video_file','');
|
|
|
+ $size = input('size','');
|
|
|
+ $second = input('second',0,'intval');
|
|
|
|
|
|
if(!$name || !$video_file){
|
|
|
$this->error('标题和视频必填');
|
|
@@ -47,6 +49,8 @@ class Video extends Apic
|
|
|
'createtime' => time(),
|
|
|
'coach_id' => $this->auth->id,
|
|
|
//获取视频大小和秒数
|
|
|
+ 'size' => $size,
|
|
|
+ 'second' => $second,
|
|
|
];
|
|
|
|
|
|
$id = Db::name('video')->insertGetId($data);
|