Operational.php 982 Bytes
<?php
namespace app\admin\controller;
use think\Db;
use think\facade\Request;
class Operational extends Common
{
    /********************************可发送消息列表*******************************/
    //打印机型号列表
    public function messagelist($sys_id=1){
        if(Request::isAjax()) {
            $list= file_get_contents(ON_LINE.'App.Prints.QueryPrintsList');
            $array = json_decode($list,TRUE);
            foreach ($array['data'] as $key => $value) {
                if($value['type']==1)
                    $array['data'][$key]['type'] = '50';
                elseif($value['type']==2)
                    $array['data'][$key]['type'] = '80';
                $array['data'][$key]['cdate'] = date('Y-m-d H:i:s',$value['cdate']);
            }
            return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$array['data'],'rel'=>1];
        }
        $this->assign('title','打印机型号列表');
        return $this->fetch();
    }
}