|
@@ -15,16 +15,36 @@ class Baseconfig extends Apiw
|
|
|
|
|
|
public function index(){
|
|
|
//维保公司的客服
|
|
|
- $kefu = Db::name('pc_admin')->where('company_id',$this->auth->company_id)->order('is_kefu desc,id asc')->find();
|
|
|
+// $kefu = Db::name('pc_admin')->where('company_id',$this->auth->company_id)->order('is_kefu desc,id asc')->find();
|
|
|
+
|
|
|
+ $company = Db::name('company')->where('id',$this->auth->company_id)->find();
|
|
|
|
|
|
$config = [
|
|
|
- 'company_im_kefu' => 'kefu_'.$kefu['id'],
|
|
|
- 'company_mobile' => $kefu['mobile'],
|
|
|
+ 'company_im_kefu' => 'kefu_'.$this->auth->company_id,
|
|
|
+ 'company_mobile' => $company['mobile'],
|
|
|
];
|
|
|
|
|
|
$this->success('success',$config);
|
|
|
}
|
|
|
|
|
|
+ //给师傅端用的usersig
|
|
|
+ //user_用户端小程序,master_师傅,kefu_客服
|
|
|
+ public function tenim_usersig(){
|
|
|
+ $user_id = "master_".$this->auth->id;
|
|
|
+
|
|
|
+ // 获取配置信息
|
|
|
+ $config = config("tencent_im");
|
|
|
+// $usersigObj = new getusersig($config["sdkappid"],$config["key"]);
|
|
|
+// $usersig = $usersigObj->genUserSig($user_id);
|
|
|
+
|
|
|
+ $rs = [
|
|
|
+// 'usersig' => $usersig,
|
|
|
+ 'sdkappid' => $config['sdkappid'],
|
|
|
+ ];
|
|
|
+
|
|
|
+ $this->success(1,$rs);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//师傅端版本
|
|
|
public function app_version(){
|