ConfigService::get('service', 'title', ''), // 服务时间 'business_time' => ConfigService::get('service', 'business_time', ''), // 客服电话 'phone' => ConfigService::get('service', 'phone', ''), // 客服二维码 'qr_code' => $qrCode, // 客服状态 0-关闭 1-开启 'status' => ConfigService::get('service', 'status', 0), ]; return $config; } /** * @notes 客服设置 * @param $params * @author Tab * @date 2021/8/11 17:39 */ public static function setConfig($params) { $allowField = ['status','phone','qr_code','business_time','title']; foreach($params as $key => $value) { if(in_array($key, $allowField)) { ConfigService::set('service', $key, $value); } } } }