<?php
 namespace Module\Member\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Layout\AdminConfigBuilder; use ModStart\Core\Input\Request; class ConfigController extends Controller { public function setting(AdminConfigBuilder $builder) { $builder->pageTitle('用户功能'); $builder->switch('loginCaptchaEnable', '启用登录验证码'); $builder->switch('registerDisable', '禁用注册'); $builder->switch('registerEmailEnable', '启用邮箱注册'); $builder->switch('registerPhoneEnable', '启用手机注册'); $builder->switch('retrieveDisable', '禁用找回密码'); $builder->switch('retrievePhoneEnable', '启用手机找回密码'); $builder->switch('retrieveEmailEnable', '启用邮箱找回密码'); $builder->formClass('wide'); return $builder->perform(); } public function vip(AdminConfigBuilder $builder) { $builder->pageTitle('用户VIP设置'); $builder->switch('moduleMemberVipEnable', '用户VIP功能开启'); $builder->formClass('wide'); return $builder->perform(); } public function oauthWechatMobile(AdminConfigBuilder $builder) { $builder->pageTitle('微信手机授权登录'); $builder->switch('oauthWechatMobileEnable', '开启微信授权登录'); $builder->text('oauthWechatMobileAppId', 'AppId'); $builder->text('oauthWechatMobileAppSecret', 'AppSecret'); $builder->text('oauthWechatMobileProxy', '授权回调域名代理')->help('如不清楚此参数意义，请留空'); $builder->formClass('wide'); return $builder->perform(); } public function oauthWechat(AdminConfigBuilder $builder) { $builder->pageTitle('微信PC扫码登录'); $builder->switch('oauthWechatEnable', '开启微信授权登录'); $builder->text('oauthWechatAppId', 'AppId'); $builder->text('oauthWechatAppSecret', 'AppSecret'); $builder->text('oauthWechatProxy', '授权回调域名代理')->help('如不清楚此参数意义，请留空'); $builder->formClass('wide'); return $builder->perform(); } public function oauthWechatMiniProgram(AdminConfigBuilder $builder) { $builder->pageTitle('微信小程序登录'); $builder->switch('oauthWechatMiniProgramEnable', '开启微信小程序登录'); $builder->text('oauthWechatMiniProgramAppId', 'AppId'); $builder->text('oauthWechatMiniProgramAppSecret', 'AppSecret'); $builder->formClass('wide'); return $builder->perform(); } public function oauthQQ(AdminConfigBuilder $builder) { $builder->pageTitle('QQ授权登录'); $builder->switch('oauthQQEnable', '开启QQ授权登录')->help('回调地址请填写 <code>' . Request::domainUrl() . '/oauth_callback_qq</code>'); $builder->text('oauthQQKey', 'APP ID'); $builder->text('oauthQQAppSecret', 'APP KEY'); $builder->text('oauthQQAppSecretProxy', '授权回调域名代理')->help('如不清楚此参数意义，请留空'); $builder->formClass('wide'); return $builder->perform(); } public function oauthWeibo(AdminConfigBuilder $builder) { $builder->pageTitle('微博授权登录'); $builder->switch('oauthWeiboEnable', '开启微博授权登录')->help('回调地址请填写 <code>' . Request::domainUrl() . '/oauth_callback_weibo</code>'); $builder->text('oauthWeiboKey', 'Key'); $builder->text('oauthWeiboAppSecret', 'AppSecret'); $builder->text('oauthWeiboProxy', '授权回调域名代理')->help('如不清楚此参数意义，请留空'); $builder->formClass('wide'); return $builder->perform(); } }