<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;
/**
 * 基础配置接口
 */
class Baseconfig extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

   
    public function index(){


        $config = [
            'appversion' => config('site.appversion'),
            'name' => config('site.name'),
        ];
        $config['kefu_mobile'] = config('site.kefu_mobile');
        $config['kefu_time'] = config('site.kefu_time');
        $config['kefu_qq'] = config('site.kefu_qq');
        $config['kefu_weixin'] = localpath_to_netpath(config('site.kefu_weixin'));

        $config['index_dingwei'] = config('site.index_dingwei');
        $config['app_wechatpay'] = config('site.app_wechatpay');
        $config['usercenter_image'] = localpath_to_netpath(config('site.usercenter_image'));

        $this->success('success',$config);
    }

    //服务类型枚举
    public function servicetype(){
        $list = Db::name('servicetype')->order('id asc')->select();
        $this->success(1,$list);
    }

    //客户来源枚举
    public function customer_comefrom(){
        $data = [
            '线下新客','老带新','平台引流','自然进店'
        ];
        $this->success(1,$data);
    }


}