娄梦宁 3 years ago
parent
commit
bd6a03835d
3 changed files with 40 additions and 14 deletions
  1. +18
    -0
      application/admin/controller/auth/Admin.php
  2. +6
    -0
      application/admin/controller/general/Config.php
  3. +16
    -14
      application/extra/site.php

+ 18
- 0
application/admin/controller/auth/Admin.php View File

@@ -293,4 +293,22 @@ class Admin extends Backend
$this->dataLimitField = 'id';
return parent::selectpage();
}


public function getList(){
$name=$this->request->post('name');
$keyValue=$this->request->post('keyValue');
$this->model->field('id,nickname as name');
if($keyValue){
$this->model->where(['id'=>$keyValue]);
}elseif($name){
$this->model->where(['nickname'=>['like','%'.$name.'%']]);
}
$result= $this->model->select();
// print_r($result);
if($keyValue){
return json(['list' => $result]);
}
return json(['list' => $result]);
}
}

+ 6
- 0
application/admin/controller/general/Config.php View File

@@ -298,4 +298,10 @@ class Config extends Backend
$fieldList = Db::query($sql, [$dbname, $table]);
$this->success("", null, ['fieldList' => $fieldList]);
}

public function getConfig(){
$key= $this->request->request('key');
$config = \think\Config::get($key);
return json(['data' => json_decode($config)]);
}
}

+ 16
- 14
application/extra/site.php View File

@@ -15,24 +15,19 @@ return array (
'fixedpage' => 'dashboard',
'categorytype' =>
array (
'default' => 'Default',
'page' => 'Page',
'article' => 'Article',
'default' => '默认',
'page' => '单页',
'article' => '文章',
'test' => 'Test',
),
'configgroup' =>
array (
'basic' => 'Basic',
'email' => 'Email',
'dictionary' => 'Dictionary',
'user' => 'User',
'example' => 'Example',
),
'attachmentcategory' =>
array (
'category1' => 'Category1',
'category2' => 'Category2',
'custom' => 'Custom',
'basic' => '基础配置',
'email' => '邮件配置',
'dictionary' => '字典配置',
'user' => '会员配置',
'example' => '示例分组',
'hotel' => '酒店信息配置',
),
'mail_type' => '1',
'mail_smtp_host' => 'smtp.qq.com',
@@ -41,4 +36,11 @@ return array (
'mail_smtp_pass' => 'password',
'mail_verify_type' => '2',
'mail_from' => '10000@qq.com',
'attachmentcategory' =>
array (
'category1' => '分类一',
'category2' => '分类二',
'custom' => '自定义',
),
'item_category' => '{"1":"一日游","2":"交通接驳","3":"租车","4":"门票"}',
);

Loading…
Cancel
Save