PHPackages                             xvv/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. xvv/think-jump

ActiveLibrary

xvv/think-jump
==============

ThinkPHP 8 jump/redirect trait package, compatible with PHP 8.4+

v1.0.2(1mo ago)04Apache-2.0HTMLPHP &gt;=8.0.0

Since Mar 17Pushed 1mo agoCompare

[ Source](https://github.com/xvv1314159/think-jump)[ Packagist](https://packagist.org/packages/xvv/think-jump)[ RSS](/packages/xvv-think-jump/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

xvv/think-jump
==============

[](#xvvthink-jump)

ThinkPHP 8 跳转与重定向 Trait 扩展包，兼容 PHP 8.4+。

安装
--

[](#安装)

```
composer require xvv/think-jump
```

使用
--

[](#使用)

在控制器中使用 `Jump` Trait：

```
use think\Jump;

class Index extends BaseController
{
    use Jump;

    public function index()
    {
        $this->success('操作成功', '/index/index');
        $this->error('操作失败');
        $this->redirect('/index/index');
    }
}
```

配置
--

[](#配置)

发布配置文件后编辑 `config/jump.php`：

配置项默认值说明dispatch\_success\_tpl内置模板成功跳转页模板路径dispatch\_error\_tpl内置模板错误跳转页模板路径default\_success\_code0成功响应 code 值default\_error\_code1错误响应 code 值default\_success\_wait3成功跳转等待秒数default\_error\_wait3错误跳转等待秒数default\_return\_typehtml默认响应类型default\_ajax\_returnjsonAJAX 默认响应格式方法
--

[](#方法)

方法说明`success($msg, $url, $data, $wait, $header)`操作成功跳转`error($msg, $url, $data, $wait, $header)`操作失败跳转`result($data, $code, $msg, $type, $header)`封装 API 返回数据`redirect($url, $code, $with)`重定向要求
--

[](#要求)

- PHP &gt;= 8.0
- ThinkPHP &gt;= 8.0

License
-------

[](#license)

Apache-2.0

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance96

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

53d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13141fd359f2fbc148fe1ba9d4bded5fa1e555c75b947f8aa271342f01247ccf?d=identicon)[xvv1314159](/maintainers/xvv1314159)

---

Top Contributors

[![xvv1314159](https://avatars.githubusercontent.com/u/149662018?v=4)](https://github.com/xvv1314159 "xvv1314159 (4 commits)")

---

Tags

redirectthinkphpthinkjump

### Embed Badge

![Health badge](/badges/xvv-think-jump/health.svg)

```
[![Health](https://phpackages.com/badges/xvv-think-jump/health.svg)](https://phpackages.com/packages/xvv-think-jump)
```

###  Alternatives

[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
