Guide.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. // +—————————————————————————————————————————————————————————————————————
  3. // | Created by Yunbao
  4. // +—————————————————————————————————————————————————————————————————————
  5. // | Copyright (c) 2013~2022 http://www.yunbaokj.com All rights reserved.
  6. // +—————————————————————————————————————————————————————————————————————
  7. // | Author: https://gitee.com/yunbaokeji
  8. // +—————————————————————————————————————————————————————————————————————
  9. // | Date: 2022-04-30
  10. // +—————————————————————————————————————————————————————————————————————
  11. class Model_Guide extends PhalApi_Model_NotORM {
  12. /* 引导页 */
  13. public function getGuide() {
  14. $config=DI()->notorm->option
  15. ->select('option_value')
  16. ->where("option_name='guide'")
  17. ->fetchOne();
  18. $config = json_decode($config['option_value'],true);
  19. $where="type={$config['type']}";
  20. $list=DI()->notorm->guide
  21. ->select('thumb,href')
  22. ->where($where)
  23. ->order('orderno asc,uptime desc')
  24. ->fetchAll();
  25. foreach($list as $k=>$v){
  26. $v['thumb']=get_upload_path($v['thumb']);
  27. $v['href']=urldecode($v['href']);
  28. $list[$k]=$v;
  29. }
  30. $config['list']=$list;
  31. return $config;
  32. }
  33. }