www_fpvone_cn/application/index/controller/Tiktok.php

43 lines
983 B
PHP

<?php
namespace app\index\controller;
use app\common\controller\Frontend;
use app\admin\model\cms\Archives;
class Tiktok extends Frontend
{
protected $noNeedLogin = '*';
protected $noNeedRight = '*';
protected $layout = '';
public function index()
{
return $this->view->fetch();
}
public function archive_list(){
$page = $this->request->param("page");
// var_dump($page);exit;
if(empty($page)) $page = 1;
$archive = new Archives();
$total = $archive->where('channel_id','=',57)
->select();
$res = $archive->where('channel_id','=',57)
->limit(10)
->page($page)
->select();
// var_dump($total);exit;
$data = array('total'=>count($total),'list'=>$res);
return json($data);
// var_dump(count($total));
// var_dump(json_encode($res));
}
public function archive_detail(){
}
}