|
@@ -0,0 +1,38 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\api\controller\company;
|
|
|
+
|
|
|
+use app\common\controller\Apic;
|
|
|
+use think\Db;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 评价,门店印象
|
|
|
+ */
|
|
|
+class Comment extends Apic
|
|
|
+{
|
|
|
+ protected $noNeedLogin = [];
|
|
|
+ protected $noNeedRight = '*';
|
|
|
+
|
|
|
+ //门店印象
|
|
|
+ public function lists(){
|
|
|
+ $field = [
|
|
|
+ 'cc.*','user.nickname','user.avatar',
|
|
|
+ ];
|
|
|
+ $list = Db::name('company_comment')->alias('cc')
|
|
|
+ ->join('user','cc.user_id = user.id','LEFT')
|
|
|
+ ->field($field)->where('cc.company_id',$this->auth->company_id)->autopage()->select();
|
|
|
+ $list = list_domain_image($list,['images']);
|
|
|
+
|
|
|
+ $this->success(1,$list);
|
|
|
+ }
|
|
|
+
|
|
|
+ //回复评价
|
|
|
+ public function delete(){
|
|
|
+ $id = input('id',0);
|
|
|
+ Db::name('company_comment')->where('id',$id)->delete();
|
|
|
+ $this->success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|