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;