<?php
 namespace App\Http\Controllers\Admin; use TechOnline\Laravel\Type\TypeUtil; use TechSoft\Laravel\Admin\Cms\ConfigCms; use TechSoft\Laravel\Admin\Cms\Field\FieldSwitch; use TechSoft\Laravel\Admin\Cms\Field\FieldText; use TechSoft\Laravel\Admin\Support\AdminCheckController; use TechSoft\Laravel\Admin\Traits\ConfigEmailTrait; use TechSoft\Laravel\Admin\Traits\ConfigMemberSettingTrait; use TechSoft\Laravel\Admin\Traits\ConfigOauthTrait; use TechSoft\Laravel\Admin\Traits\ConfigPayTrait; use TechSoft\Laravel\Admin\Traits\ConfigSettingTrait; use TechSoft\Laravel\Admin\Traits\ConfigSmsTrait; use TechSoft\Laravel\Admin\Traits\ConfigSSOTrait; use TechSoft\Laravel\Admin\Traits\ConfigVisitLimitTrait; use TechSoft\Laravel\Admin\Traits\ConfigVisitTrait; use TechSoft\Laravel\Sms\SmsSender; class ConfigController extends AdminCheckController { use ConfigSettingTrait; use ConfigVisitTrait; use ConfigEmailTrait; use ConfigVisitLimitTrait; use ConfigSmsTrait; use ConfigOauthTrait; use ConfigMemberSettingTrait; use ConfigSSOTrait; use ConfigPayTrait; public function sms_(ConfigCms $configCms) { return self::sms($configCms, [ SmsSender::SOFT_API => defined('__BASE_SITE_VENDOR__') ? __BASE_SITE_VENDOR__ . '接口' : TypeUtil::name(SmsSender::class, SmsSender::SOFT_API), ]); } public function setting_(ConfigCms $configCms, $param = []) { return self::setting($configCms, [ 'siteTemplateOptions' => [ 'default' => '默认模板', 'dark' => '炫酷黑色', ] ]); } public function memberVipSetting(ConfigCms $configCms) { return $configCms->execute($this, [ 'group' => 'memberVipSetting', 'pageTitle' => '会员VIP功能设置', 'fields' => [ 'moduleMemberVipEnable' => ['type' => FieldSwitch::class, 'title' => '开启会员VIP', 'desc' => ''], ] ]); } public function vipArticleSetting(ConfigCms $configCms) { return $configCms->execute($this, [ 'group' => 'vipArticleSetting', 'pageTitle' => '付费文章设置', 'fields' => [ 'moduleVipArticleEnable' => ['type' => FieldSwitch::class, 'title' => '开启付费文章', 'desc' => ''], ] ]); } public function search(ConfigCms $configCms) { return $configCms->execute($this, [ 'group' => 'search', 'pageTitle' => '列表与搜索', 'fields' => [ 'tikuQuestionMaxPage' => ['type' => FieldText::class, 'title' => '题目列表最大显示页数', 'desc' => '默认为20'], 'tikuSearchQuestionMaxPage' => ['type' => FieldText::class, 'title' => '题目搜索最大显示页数', 'desc' => '默认为20'], 'tikuSearchPaperMaxPage' => ['type' => FieldText::class, 'title' => '试卷搜索最大显示页数', 'desc' => '默认为20'], 'tikuSearchVipArticleMaxPage' => ['type' => FieldText::class, 'title' => '付费文章搜索最大显示页数', 'desc' => '默认为20'], ] ]); } }