1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- /**
- * WebpageModel.php UTF-8
- * 页面model
- *
- * @date : 2018/1/26 9:31
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : linjiebin <ljb@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace huo\model\page;
- use huo\model\common\CommonModel;
- class WebpageModel extends CommonModel {
- protected $name = 'web_page';
- public function getPage($code = '') {
- if (empty($code)) {
- return [
- 'title' => '',
- 'content' => '',
- ];
- }
- $_map['code'] = $code;
- $_map['status'] = 2;
- $_info = $this->where($_map)->find()->toArray();
- if (!empty($_info)) {
- return $_info;
- }
- return [
- 'title' => '',
- 'content' => '',
- ];
- }
- public function getPages($codes = []) {
- if (empty($codes)) {
- return [
- ];
- }
- $_map['code'] = ['in',$codes];
- $_map['status'] = 2;
- $_pages = $this->where($_map)->select()->toArray();
- if (!empty($_pages)) {
- return $_pages;
- }
- return [
- ];
- }
- }
|