ConfigService::get('config', 'default_avatar', FileService::getFileUrl(config('project.default_image.default_avatar'))), 'default_coach_avatar' => ConfigService::get('config', 'default_coach_avatar', FileService::getFileUrl(config('project.default_image.default_coach_avatar'))), 'default_shop_avatar' => ConfigService::get('config', 'default_shop_avatar', FileService::getFileUrl(config('project.default_image.default_shop_avatar'))), ]; return $config; } /** * @notes 设置用户设置 * @param array $postData * @return bool * @author cjhao * @date 2021/7/27 17:58 */ public function setConfig(array $params):bool { ConfigService::set('config', 'default_avatar', $params['default_avatar']); ConfigService::set('config', 'default_coach_avatar', $params['default_coach_avatar']); ConfigService::set('config', 'default_shop_avatar', $params['default_shop_avatar']); return true; } /** * @notes 获取注册配置 * @return array * @author ljj * @date 2022/2/17 3:32 下午 */ public function getRegisterConfig():array { $config = [ // 'default_avatar' => ConfigService::get('login', 'default_avatar', FileService::getFileUrl(config('project.default_image.user_avatar'))), // 登录方式 'login_way' => ConfigService::get('login', 'login_way', config('project.login.login_way')), // 注册强制绑定手机 'coerce_mobile' => ConfigService::get('login', 'coerce_mobile', config('project.login.coerce_mobile')), // 政策协议 // 'login_agreement' => ConfigService::get('login', 'login_agreement', config('project.login.login_agreement')), // 第三方登录 开关 'third_auth' => ConfigService::get('login', 'third_auth', config('project.login.third_auth')), // 微信授权登录 'wechat_auth' => ConfigService::get('login', 'wechat_auth', config('project.login.wechat_auth')), // qq授权登录 // 'qq_auth' => ConfigService::get('login', 'qq_auth', config('project.login.qq_auth')), ]; return $config; } /** * @notes 设置登录注册 * @param array $params * @return bool * @author cjhao * @date 2021/9/14 17:20 */ public static function setRegisterConfig(array $params):bool { // 登录方式:1-账号密码登录;2-手机短信验证码登录 // ConfigService::set('login', 'default_avatar', $params['default_avatar']); ConfigService::set('login', 'login_way', $params['login_way']); // 注册强制绑定手机 ConfigService::set('login', 'coerce_mobile', $params['coerce_mobile']); // 政策协议 // ConfigService::set('login', 'login_agreement', $params['login_agreement']); // 第三方授权登录 ConfigService::set('login', 'third_auth', $params['third_auth']); // 微信授权登录 ConfigService::set('login', 'wechat_auth', $params['wechat_auth']); // qq登录 // ConfigService::set('login', 'qq_auth', $params['qq_auth']); return true; } /** * @notes 提现配置 * @return array * @author cjhao * @date 2024/8/27 17:54 */ public function getWithdrawConfig() { $config = [ 'way_list' => ConfigService::get('withdraw', 'way_list'), 'min_money' => ConfigService::get('withdraw', 'min_money'), 'max_money' => ConfigService::get('withdraw', 'max_money'), 'service_charge' => ConfigService::get('withdraw', 'service_charge'), 'withdraw_cycle_type' => ConfigService::get('withdraw', 'withdraw_cycle_type'), 'withdraw_cycle_date' => ConfigService::get('withdraw', 'withdraw_cycle_date'), ]; return $config; } /** * @notes 设置提现配置 * @return void * @author cjhao * @date 2024/8/27 17:54 */ public function setWithdrawConfig($params) { ConfigService::set('withdraw', 'way_list',$params['way_list']); ConfigService::set('withdraw', 'min_money',$params['min_money']); ConfigService::set('withdraw', 'max_money',$params['max_money']); ConfigService::set('withdraw', 'service_charge',$params['service_charge']); ConfigService::set('withdraw', 'withdraw_cycle_type',$params['withdraw_cycle_type']); ConfigService::set('withdraw', 'withdraw_cycle_date',$params['withdraw_cycle_date']); } }