<?php
/** 店铺登录
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author xiaoq <570035208@qq.com>
 */

namespace App\Model;
use Think\Model;
class MessageModel extends Model{
    protected $tableName = 'message';
	// 获取门店列表
    public function message_lists(){
		$result=array('status'=>3,'msg'=>'');
		$result['status'] = 1;
		$map['id'] = array('gt',0);
		$pagesize=empty($pagesize)?C('WEB_ARTICLE_PAGE'):$pagesize;
        $list=page_list('Message',$map,'id desc','id,title,content,addtime,status',$pagesize,'',1);
		if($list['list']){
			foreach($list['list'] as $k => $v){
				$list['list'][$k]['addtime'] = time_format($v['addtime']);
			}
		}
        if($list['list']){$return['status']=1; $return['data'] = $list['list'];}
        else{$return=array('status'=>2,'msg'=>'暂无数据');}
        return $return;
	}
}
?>