PHP code example of hahadu / think-jump-class

1. Go to this page and download the library: Download hahadu/think-jump-class library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hahadu / think-jump-class example snippets


$code = 1;
return \Hahadu\ThinkJumpPage\JumpPage::jumpPage($code,'/index',3); 

return \Hahadu\ThinkJumpPage\JumpPage::jumpPage($code,$url,$wait_second)->send();


jump_page($code);
//或者jump_page($code)->send();

      //是否开启ajax返回 true 开启/ false关闭
      'ajax'=>true,
      //支持json|jsonp|xml3种类型、开启ajax有效
      'ajax_type'=> 'json', 


//config/jumpPage.php
return [
    //是否开启ajax返回 true 开启/ false关闭
    'ajax'=>true,
    //支持json|jsonp|xml3种类型、开启ajax有效
    'ajax_type'=> 'json',
    //自定义跳转模板文件路径 ,开启ajax自动失效
    'dispatch_tpl' => 'you_jump_tpl_path.tpl' ,
];

namespace app\controller;

class HomeNavController extends AdminBaseController
{
    use \Hahadu\ThinkJumpPage\TraitJump; //引入TraitJump
    public function index (){
        $this->success('操作成功','/index/index'); 
    }

}