hyperf-view/app/Mall/Controller/IndexController.php

63 lines
1.9 KiB
PHP

<?php
/**
* SAAS应用系统 --- 十年开发经验汇集巨献!
* ==========================================================
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
* ----------------------------------------------------------
* 官方网址: https://www.zoomtk.com
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
* ==========================================================
*/
namespace App\Mall\Controller;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Builder\BaseController;
use Builder\Entity\UISettingEntity;
use Builder\Entity\UserEntity;
use Builder\View;
use Builder\View\Layout\Content;
use Builder\View\Components\Widgets\Alert;
use Builder\Entity\MenuEntity;
use Builder\Entity\MenuItemEntity;
use Hyperf\HttpServer\Annotation\AutoController;
/**
* Class IndexController
* @AutoController()
* @package App\Mall\Controller
*/
#[Controller(prefix: "mall")]
class IndexController extends BaseController
{
#[GetMapping("index")]
public function Index(){
$setting = new UISettingEntity();
$setting->setHomeUrl('index');
$user=new UserEntity();
$setting->setUser($user);
return View::make($setting);
}
// #[GetMapping("test")]
public function test()
{
$content = new Content();
$content->showHeader()
->title('888')
->body(
Alert::make()
->type('error')
->title('这里是警告信息')
->description('我是提示消息哈哈哈')
);
return $content;
}
#[GetMapping("grid")]
public function grid(){
var_dump(555);
return 111;
}
}