1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Description: 系统基础
  4. // +----------------------------------------------------------------------
  5. // | Author: Michael_xu | gengxiaoxu@5kcrm.com
  6. // +----------------------------------------------------------------------
  7. namespace app\admin\model;
  8. use app\admin\model\Common;
  9. use think\Db;
  10. class System extends Common
  11. {
  12. protected $name = 'admin_system';
  13. //列表
  14. public function getDataList()
  15. {
  16. $list = Db::name('AdminSystem')->select();
  17. $temp = array();
  18. foreach ($list as $key => $value) {
  19. $temp[$value['name']] = $value['value'];
  20. }
  21. $temp['logo'] = !empty($temp['logo']) ? getFullPath($temp['logo']) : '';
  22. return $temp;
  23. }
  24. //新建
  25. public function createData($param)
  26. {
  27. if( isset($param['name'])){
  28. $data['name'] = 'name';
  29. $data['value'] = $param['name'];
  30. $data['description'] = '网站名称';
  31. $this->where('id=1')->update($data);
  32. }
  33. return true;
  34. }
  35. }