lizhen_gitee 7 달 전
부모
커밋
55b9e40bbd

+ 5 - 2
application/api/controller/worker/Baseconfig.php

@@ -9,14 +9,17 @@ use think\Db;
  */
 class Baseconfig extends Apiw
 {
-    protected $noNeedLogin = ['*'];
+    protected $noNeedLogin = ['app_version'];
     protected $noNeedRight = ['*'];
 
    
     public function index(){
+        //维保公司的客服
+        $kefu = Db::name('pc_admin')->where('company_id',$this->auth->company_id)->order('is_kefu desc,id asc')->find();
 
         $config = [
-
+            'company_im_kefu'      => 'kefu_'.$kefu['id'],
+            'company_mobile'      => $kefu['mobile'],
         ];
 
         $this->success('success',$config);

+ 2 - 2
application/api/controller/worker/Jiance.php

@@ -18,8 +18,8 @@ class Jiance extends Apiw
     public function index(){
         $map = [];
 
-        $status = input('status',0);
-        if(!empty($status)){
+        $status = input('status','all');
+        if($status != 'all'){
             $map['jiance.status'] = $status;
         }
 

+ 13 - 1
application/company/controller/Usercompany.php

@@ -12,7 +12,7 @@ use think\Exception;
 class Usercompany extends Apic
 {
     protected $noNeedLogin = [];
-    protected $noNeedRight = ['find_user'];
+    protected $noNeedRight = ['selectpage'];
 
     protected $table = 'user_company';
 
@@ -53,6 +53,18 @@ class Usercompany extends Apic
         $this->success(1,$rs);
     }
 
+    //下拉
+    public function selectpage(){
+
+        $list = Db::name($this->table)
+            ->field('id,projectname')
+            ->where('company_id',$this->auth->company_id)
+            ->where('deletetime',NULL)
+            ->select();
+
+        $this->success(1,$list);
+    }
+
     //添加客户
     public function add(){
         $mobile = input('user_mobile','');