12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- namespace app\api\controller\worker;
- use app\common\controller\Apiw;
- use think\Db;
- /**
- * 基础配置接口
- */
- class Baseconfig extends Apiw
- {
- 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();
- $company = Db::name('company')->where('id',$this->auth->company_id)->find();
- $config = [
- '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(){
- $config = [
- 'android_update_num' => config('site.worker_android_update_num'), //android版本迭代号
- 'android_update_version' => config('site.worker_android_update_version'), //android展示版本号
- 'android_download_url' => config('site.worker_android_download_url'), //android下载链接
- 'android_update_force' => config('site.worker_android_update_force'), //android是否强制更新
- 'android_update_title' => config('site.worker_android_update_title'), //android更新标题
- 'android_update_info' => config('site.worker_android_update_info'), //android更新描述
- 'ios_update_num' => config('site.worker_ios_update_num'), //ios版本迭代号
- 'ios_update_version' => config('site.worker_ios_update_version'), //ios展示版本号
- 'ios_download_url' => config('site.worker_ios_download_url'), //ios下载链接
- 'ios_update_force' => config('site.worker_ios_update_force'), //ios是否强制更新
- 'ios_update_title' => config('site.worker_ios_update_title'), //ios更新标题
- 'ios_update_info' => config('site.worker_ios_update_info'), //ios更新描述
- ];
- $this->success('success',$config);
- }
- //启动广告图
- public function start_advert(){
- $info = Db::name('start_advert')->where('is_show',1)->order('id desc')->find();
- $info = info_domain_image($info,['images','video_file']);
- $this->success_find('success',$info);
- }
- //关键字过滤
- public function keyworld_config(){
- $config = config('keyworld');
- $this->success('success',$config);
- }
- }
|