This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/api/controller/Page.php

32 lines
699 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\api\controller;
use app\api\model\WxappPage;
/**
* 页面控制器
* Class Index
* @package app\api\controller
*/
class Page extends Controller
{
/**
* 页面数据
* @param null $page_id
* @return array
* @throws \app\common\exception\BaseException
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index($page_id = null)
{
// 页面元素
$data = WxappPage::getPageData($this->getUser(false), $page_id);
return $this->renderSuccess($data);
}
}