wycto/tp-jump
最新稳定版本:v8.0.2
Composer 安装命令:
composer require wycto/tp-jump
包简介
适用于thinkphp的跳转扩展
README 文档
README
gitee仓库
tp-jump
适用于thinkphp的跳转扩展
安装
//默认thinkphp8 php8 composer require wycto/tp-jump thinkphp 6.0 composer require wycto/tp-jump:^6.0
配置
// 安装之后会在config目录里生成jump.php配置文件 return[ // 默认跳转页面对应的模板文件 'success_tpl' => app()->getRootPath().'/vendor/wycto/tp-jump/src/tpl/success.tpl', 'error_tpl' => app()->getRootPath().'/vendor/wycto/tp-jump/src/tpl/error.tpl', 'jsonMethod' => ['POST'] //哪些请求类型返回json格式 ];
用法示例
使用 use wycto\tp-jump\Jump;
在所需控制器内引用该扩展即可:
<?php namespace app\controller; class Index { use \wycto\jump\Jump; public function index() { //return $this->error('失败','data数据',['username' => 'wycto', 'sex' => '男']); //return $this->success('成功','data数据',['username' => 'wycto', 'sex' => '男'],'index/index'); //return $this->redirect('/admin/index/index',302); //return $this->json(200,'ok','token',['name'=>'占三'],$header = []); return $this->result(200,'成功',['username' => 'wycto', 'sex' => '男']); } }
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2023-08-16