PHPackages                             zzstudio/think-jump - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. zzstudio/think-jump

ActiveLibrary[Framework](/categories/framework)

zzstudio/think-jump
===================

The ThinkPHP6+ Jump Package

v1.0.5(6y ago)1209Apache-2.0PHPPHP &gt;=7.1.0

Since Nov 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zz-studio/think-jump)[ Packagist](https://packagist.org/packages/zzstudio/think-jump)[ RSS](/packages/zzstudio-think-jump/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

think-jump
==========

[](#think-jump)

Installation
------------

[](#installation)

Use composer to manage your dependencies and download think-jump:

```
composer require zzstudio/think-jump
```

### 生成配置

[](#生成配置)

系统安装后会自动在 config 目录中生成 jump.php 的配置文件， 如果系统未生成可在命令行执行

```
php think jump:config
```

可快速生成配置文件

### 公共配置

[](#公共配置)

```
// jump配置
return [
    // 默认成功 code
    'default_success_code'  => 0,
    // 默认失败 code
    'default_error_code'    => 1,
    // 默认输出类型
    'default_return_type'   => 'html',
    // 默认AJAX 数据返回格式,可选json xml ...
    'default_ajax_return'   => 'json',
    // 默认跳转页面对应的模板文件
    'dispatch_success_tpl'  => app()->getRootPath().'/vendor/zzstudio/think-jump/src/tpl/dispatch_jump.tpl',
    'dispatch_error_tpl'    => app()->getRootPath().'/vendor/zzstudio/think-jump/src/tpl/dispatch_jump.tpl',
];

```

Example
-------

[](#example)

在所需控制器内引用该扩展即可：

```
