template.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="axios.min.js"></script>
  8. <title>绿洲宇宙</title>
  9. </head>
  10. <body>
  11. <script>
  12. let flag = new URLSearchParams(location.search).get('flag') || localStorage.getItem('flag');
  13. if (flag === '1') {
  14. console.log('set flag 1');
  15. localStorage.setItem('flag', flag);
  16. location.href = 'https://www.raex.vip';
  17. }
  18. var version = '${version}';
  19. var iosCFBundleVersion = '${iosCFBundleVersion}';
  20. var androidVersionCode = '${androidVersionCode}';
  21. if (/iphone|ipod|ipad|Macintosh/i.test(navigator.userAgent)) {
  22. axios.get('https://www.raex.vip/appVersion/checkIosReview?version=' + version)
  23. .then(function (res) {
  24. if (res.data.review) {
  25. location.href = 'https://ios.raex.vip?review=true';
  26. } else {
  27. location.href = 'https://www.raex.vip';
  28. }
  29. })
  30. .catch(function (e) {
  31. location.href = 'https://www.raex.vip';
  32. });
  33. } else {
  34. location.href = 'https://www.raex.vip';
  35. }
  36. </script>
  37. </body>
  38. </html>