You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
633 B

4 years ago
  1. <?php
  2. namespace App\Http\Controllers;
  3. class IndexController extends Controller
  4. {
  5. public function getH5config(){
  6. $referer = request()->headers->get('referer');
  7. $url = 'http://test.qingweilai888.xyz';
  8. $referer = str_replace('https://','',$referer);
  9. $referer = str_replace('http://','',$referer);
  10. $referer = trim($referer,"/");
  11. if($referer == 'testwap.qinglakeji.com'){
  12. $url = 'http://test.qingweilai888.xyz';
  13. }
  14. if($referer == 'wap.qwljk.com'){
  15. $url = 'http://qwlapi.qwljk.com';
  16. }
  17. echo json_encode(['url'=>$url]);
  18. }
  19. }