|
@@ -9,7 +9,7 @@ use think\Db;
|
|
|
*/
|
|
|
class Feedback extends Apic
|
|
|
{
|
|
|
- protected $noNeedLogin = ['addone'];
|
|
|
+ protected $noNeedLogin = ['typelist'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
public function typelist(){
|
|
@@ -18,10 +18,9 @@ class Feedback extends Apic
|
|
|
}
|
|
|
|
|
|
public function addone(){
|
|
|
- $type = input('type','');
|
|
|
- $content = input('content','');
|
|
|
+ $type = input('type','');
|
|
|
+ $info = input('info','');
|
|
|
$images = input('images','');
|
|
|
- $mobile = input('mobile','');
|
|
|
|
|
|
if(empty($content)){
|
|
|
//$this->error('内容不能为空');
|
|
@@ -35,21 +34,20 @@ class Feedback extends Apic
|
|
|
|
|
|
$data = [
|
|
|
'doctor_id' => $this->auth->id,
|
|
|
- 'type' => $type,
|
|
|
- 'content' => $content,
|
|
|
- 'images' => $images,
|
|
|
- 'mobile' => $mobile,
|
|
|
+ 'type' => $type,
|
|
|
+ 'info' => $info,
|
|
|
+ 'images' => $images,
|
|
|
'createtime' => time(),
|
|
|
'updatetime' => time(),
|
|
|
];
|
|
|
|
|
|
- $id = Db::name('feedback')->insertGetId($data);
|
|
|
- $this->success();
|
|
|
+ $id = Db::name('doctor_feedback')->insertGetId($data);
|
|
|
+ $this->success('反馈成功');
|
|
|
}
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
//我提出的建议
|
|
|
public function lists(){
|
|
|
- $list = Db::name('feedback')->where('doctor_id',$this->auth->id)->order('id desc')->autopage()->select();
|
|
|
+ $list = Db::name('doctor_feedback')->where('doctor_id',$this->auth->id)->order('id desc')->autopage()->select();
|
|
|
$list = list_domain_image($list,['images']);
|
|
|
$this->success('success',$list);
|
|
|
}
|