From 4d7fa19afb8bfa4aaa072d4a5c23327f419f366b Mon Sep 17 00:00:00 2001 From: tang <28718949@qq.com> Date: Mon, 15 Jan 2024 16:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E7=BA=A6=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/Signing.php | 15 +++ modules/admin/models/ThemeCustomiseForm.php | 40 +++--- modules/admin/views/theme/customise.php | 15 ++- modules/api/controllers/SigningController.php | 123 ++++++++++++++++++ modules/api/models/SigningForm.php | 103 +++++++++++++++ 5 files changed, 279 insertions(+), 17 deletions(-) create mode 100644 models/Signing.php create mode 100644 modules/api/controllers/SigningController.php create mode 100644 modules/api/models/SigningForm.php diff --git a/models/Signing.php b/models/Signing.php new file mode 100644 index 0000000..fe3cb10 --- /dev/null +++ b/models/Signing.php @@ -0,0 +1,15 @@ + '域名', 'siteName' => '站点名称', 'siteShortName' => '站点简称', - 'siteDomain' => '站点域名', - 'siteWapDomain' => '移动站点域名', + 'siteDomain' => '站点域名', + 'siteWapDomain' => '移动站点域名', 'siteBriefIntro' => '一句话介绍站点', 'siteDescription' => '站点描述', 'siteKeywords' => '站点关键词', @@ -88,20 +93,23 @@ class ThemeCustomiseForm extends AdminModel 'siteEmail' => '站点联系邮箱', 'sitePostcode' => '站点联系邮编', 'siteCompanyIntro' => '公司介绍', + 'siteSigning' => '签约须知', + 'siteSigningType' => '签约类型', ]; } - + public function save() { - if($this->validate()){ + if ($this->validate()) { $attrs = $this->attributes; - foreach ($attrs as $key => $value){ - if(empty($value)) + + foreach ($attrs as $key => $value) { + if (empty($value)) continue; $key = Utils::hump2underline($key); $key = strtoupper($key); $f = Option::setOption($key, $value, $this->cx_mch_id); - if(!$f){ + if (!$f) { return [ 'code' => 1, 'msg' => $key . '保存失败' @@ -114,7 +122,7 @@ class ThemeCustomiseForm extends AdminModel ]; } else { return $this->getModelError(); - } + } } - + } \ No newline at end of file diff --git a/modules/admin/views/theme/customise.php b/modules/admin/views/theme/customise.php index 133f229..fc11a92 100644 --- a/modules/admin/views/theme/customise.php +++ b/modules/admin/views/theme/customise.php @@ -136,7 +136,20 @@ $this->params['breadcrumbs'][] = $this->title;