Baseconfig.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 基础配置接口
  7. */
  8. class Baseconfig extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. public function index(){
  13. $config = [
  14. 'appversion' => config('site.appversion'),
  15. 'name' => config('site.name'),
  16. ];
  17. $config['kefu_mobile'] = config('site.kefu_mobile');
  18. $config['kefu_time'] = config('site.kefu_time');
  19. $config['kefu_qq'] = config('site.kefu_qq');
  20. $config['kefu_weixin'] = localpath_to_netpath(config('site.kefu_weixin'));
  21. $config['index_dingwei'] = config('site.index_dingwei');
  22. $config['app_wechatpay'] = config('site.app_wechatpay');
  23. $config['usercenter_image'] = localpath_to_netpath(config('site.usercenter_image'));
  24. $this->success('success',$config);
  25. }
  26. //服务类型枚举
  27. public function servicetype(){
  28. $list = Db::name('servicetype')->order('id asc')->select();
  29. $this->success(1,$list);
  30. }
  31. //客户来源枚举
  32. public function customer_comefrom(){
  33. $data = [
  34. '线下新客','老带新','平台引流','自然进店'
  35. ];
  36. $this->success(1,$data);
  37. }
  38. }