TP 5はマルチキャスト図インタフェース及び展示情報を実現する

5143 ワード

次のように作成されたクラスです.
<?php

namespace app\index\controller;

use controller\BasicIndex;

use think\Db;

class Photo extends BasicIndex
{
	//  
	public function Plantingmap()
    {
 
       $list = Db::name('Adver')
            ->where(array('status' => 1,'type'=>0))->order('id desc')
            ->limit(request()->post('size', 5))
            ->select();
        $json = json_encode($list);
        return $json;
    }

    //  
    public function Advertisement()
    {
       $re = Db::name('adver')
       			->where('status',1)
       			->paginate(4);
       $json = json_encode($re);
       return $json;
    }
}

インタフェースドキュメントは次のとおりです.
###   ####

    :http://www.ysshopcode.hk/index/photo/Plantingmap
    :get
    :json
    :
	img    
	url     
	
   json  :
----------json

もう少しで挫折に负けそう!!!がんばってください.か