...
|
...
|
@@ -90,6 +90,7 @@ class Teacher extends Api |
|
|
$param['behind'] = str_replace($http, '', $param['behind']);
|
|
|
$param['thumbnail'] = str_replace($http, '', $param['thumbnail']);
|
|
|
$param['createtime'] = time();
|
|
|
$param['show'] = implode(',',$param['show']);
|
|
|
$data = Db::name('teacher')->insertGetId($param);
|
|
|
if (empty($data)) {
|
|
|
$this->error('提交失败');
|
...
|
...
|
@@ -144,6 +145,7 @@ class Teacher extends Api |
|
|
$data['before'] = $qiniu.$data['before'];
|
|
|
$data['behind'] = $qiniu.$data['behind'];
|
|
|
$data['thumbnail'] = $qiniu.$data['thumbnail'];
|
|
|
$data['show'] = explode(',',$data['show']);
|
|
|
$data['territory_id'] = explode(',',$data['territory_id']);
|
|
|
$this->success('success',$data);
|
|
|
}
|
...
|
...
|
@@ -225,6 +227,7 @@ class Teacher extends Api |
|
|
$param['status'] = 0;
|
|
|
|
|
|
$param['updatetime'] = time();
|
|
|
$param['show'] = implode(',',$param['show']);
|
|
|
$data = Db::name('teacher')->where('id',$param['id'])->update($param);
|
|
|
if (empty($data)) {
|
|
|
$this->error('提交失败');
|
...
|
...
|
|