Index.php 447 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\redirect\controller;
  3. use app\common\controller\Frontend;
  4. use think\Cache;
  5. use Yansongda\Supports\Str;
  6. class Index extends Frontend
  7. {
  8. protected $noNeedLogin = '*';
  9. protected $noNeedRight = '*';
  10. public function index()
  11. {
  12. $key=input('key');
  13. $html=Cache::get($key);
  14. if(!Str::startsWith($key,'payment_')||!$html){
  15. $this->redirect('/');
  16. }
  17. return $html;
  18. }
  19. }