123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- namespace app\admin\controller;
- /**
- * 站点管理
- */
- class Config extends Admin{
- protected $Config = null;
- protected function _initialize(){
- parent::_initialize();
- $this->Config = model('Config');
- }
- public function save(){
- if ($this->request->isPost()) {
- $value = input('post.value/a',[]);
- $key = input('post.key');
- $result = cnf($key,$value);
- if ($result) {
- return json(['data'=>null,'code'=>0,'msg'=>'设置成功']);
- }
- return json(['data'=>$_POST,'code'=>1,'msg'=>'设置失败']);
- }
- }
- public function site(){
- $setting = $this->Config->where(['key'=>'site'])->find();
- $site = $setting->value;
- $this->assign('site',$site);
- $this->assign('meta_title','站点设置');
- return $this->fetch();
- }
- public function withdraw(){
- $withdraw = cnf('withdraw');
- $this->assign('withdraw',$withdraw);
- $this->assign('meta_title','提现配置');
- return $this->fetch();
- }
-
- public function recharge(){
- $recharge = cnf('recharge');
- $this->assign('recharge',$recharge);
- $this->assign('meta_title','充值配置');
- return $this->fetch();
- }
-
- public function sms(){
- $sms = cnf('sms');
- $this->assign('sms',$sms);
- $this->assign('meta_title','短信配置');
- return $this->fetch();
- }
- public function invite(){
- $invite = cnf('invite');
- $this->assign('invite',$invite);
- $this->assign('meta_title','邀请配置');
- return $this->fetch();
- }
- public function order(){
- $order = cnf('order');
- $this->assign('order',$order);
- $this->assign('meta_title','订单配置');
- return $this->fetch();
- }
- public function express(){
- $express = cnf('express');
- $this->assign('express',$express);
- $this->assign('meta_title','快递配置');
- return $this->fetch();
- }
- public function app(){
- $app = cnf('app');
- $this->assign('app',$app);
- $this->assign('meta_title','APP配置');
- return $this->fetch();
- }
- public function signin(){
- $signin = cnf('signin');
- $this->assign('signin',$signin);
- $this->assign('meta_title','签到配置');
- return $this->fetch();
- }
- public function other(){
- $other = cnf('other');
- $this->assign('other',$other);
- $this->assign('meta_title','其他配置');
- return $this->fetch();
- }
-
- }
|