xiongzhu il y a 3 ans
Parent
commit
c38192fee4

+ 6 - 4
config.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<widget id="vip.raex.nft" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" ios-CFBundleIdentifier="com.raex.meta" ios-CFBundleVersion="138" android-versionCode="1116">
-	<name>RAEX绿洲宇宙</name>
+<widget id="vip.raex.nft" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" ios-CFBundleIdentifier="com.raex.meta" ios-CFBundleVersion="145" android-versionCode="1146">
+	<name>绿洲宇宙</name>
 	<description>
         A sample Apache Cordova application that responds to the deviceready event.
     </description>
@@ -18,8 +18,7 @@
 	<allow-navigation href="https://www.raex.vip/*"/>
 	<allow-navigation href="https://test.raex.vip/*"/>
 	<allow-navigation href="https://ios.raex.vip/*"/>
-	<allow-navigation href="http://192.168.50.146:8082/*"/>
-	<allow-navigation href="http://192.168.50.116:8082/*"/>
+	<allow-navigation href="http://192.168.6.116:8082/*"/>
 	<allow-navigation href="http://192.168.6.116:8081/*"/>
 	<allow-navigation href="http://192.168.6.116:8080/*"/>
 	<preference name="AppendUserAgent" value="#cordova#"/>
@@ -28,6 +27,9 @@
 	<preference name="Orientation" value="portrait"/>
 	<preference name="AutoHideSplashScreen" value="false"/>
 	<preference name="ShowSplashScreenSpinner" value="false"/>
+	<preference name="AndroidXEnabled" value="true"/>
+	<preference name="WECHATAPPID" value="wx6816dbdc07254dcb"/>
+	<preference name="UNIVERSALLINK" value="https://www.raex.vip/9th/"/>
 	<splash src="res/splash/ios/Default@2x~universal~anyany.png"/>
 	<hook src="scripts/deleteDSStore.js" type="before_prepare"/>
 	<hook src="scripts/changeVersion.js" type="before_prepare"/>

BIN
icon.png


+ 110 - 26
makeIcons.js

@@ -400,8 +400,8 @@
     },
     "cordova-ios": {
       "version": "6.2.0",
-      "resolved": "https://registry.npmmirror.com/cordova-ios/download/cordova-ios-6.2.0.tgz",
-      "integrity": "sha1-Oq7HN2uaICzcryj6q2p5gjsExRk=",
+      "resolved": "https://registry.npmmirror.com/cordova-ios/-/cordova-ios-6.2.0.tgz",
+      "integrity": "sha512-sLjZg2QBI1SpQVwfe0MSn89YNVkBGLW9Q1vcFJBsqKBrhvoEOJ5Ytq0gwqdhgTOGzlwJUfxC6OHM3jcsRjtYrw==",
       "dev": true,
       "requires": {
         "cordova-common": "^4.0.2",
@@ -542,6 +542,23 @@
       "integrity": "sha512-nzkeWeyLA6+1FryzO0aeB6NS8MZ45gnBYeq2VZqfdNbddZEgtpI4XPYdBVxvm9NhcVoJ3tdA1OBnQD9JryoV0Q==",
       "dev": true
     },
+    "cordova-plugin-wechat": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmmirror.com/cordova-plugin-wechat/-/cordova-plugin-wechat-3.0.0.tgz",
+      "integrity": "sha512-GZtQOaQAURvbi9rJU2HbQI9tHUhS4/i2TiH4R9k12jLY6rTJ4VmhSgEO3xAGBKlVn9bXofYnKZBWXtU3GvFP7A==",
+      "dev": true,
+      "requires": {
+        "shelljs": "^0.5.3"
+      },
+      "dependencies": {
+        "shelljs": {
+          "version": "0.5.3",
+          "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.5.3.tgz",
+          "integrity": "sha512-C2FisSSW8S6TIYHHiMHN0NqzdjWfTekdMpA2FJTbRWnQMLO1RRIXEB9eVZYOlofYmjZA7fY3ChoFu09MeI3wlQ==",
+          "dev": true
+        }
+      }
+    },
     "cordova-plugin-whitelist": {
       "version": "1.3.5",
       "resolved": "https://registry.nlark.com/cordova-plugin-whitelist/download/cordova-plugin-whitelist-1.3.5.tgz",
@@ -901,6 +918,12 @@
         }
       }
     },
+    "function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+      "dev": true
+    },
     "gauge": {
       "version": "2.7.4",
       "resolved": "https://registry.npmmirror.com/gauge/download/gauge-2.7.4.tgz?cache=0&sync_timestamp=1636989373302&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fgauge%2Fdownload%2Fgauge-2.7.4.tgz",
@@ -1017,6 +1040,15 @@
       "integrity": "sha1-5BK40z9eAGWTy9PO5t+fLOu+gCo=",
       "dev": true
     },
+    "has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1"
+      }
+    },
     "has-unicode": {
       "version": "2.0.1",
       "resolved": "https://registry.nlark.com/has-unicode/download/has-unicode-2.0.1.tgz",
@@ -1123,10 +1155,16 @@
       "resolved": "https://registry.npm.taobao.org/ini/download/ini-1.3.8.tgz?cache=0&sync_timestamp=1607907788001&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fini%2Fdownload%2Fini-1.3.8.tgz",
       "integrity": "sha1-op2kJbSIBvNHZ6Tvzjlyaa8oQyw="
     },
+    "interpret": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmmirror.com/interpret/-/interpret-1.4.0.tgz",
+      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
+      "dev": true
+    },
     "ios-sim": {
       "version": "8.0.2",
-      "resolved": "https://registry.npmmirror.com/ios-sim/download/ios-sim-8.0.2.tgz",
-      "integrity": "sha1-4jlKy220N4919MP/hhC79PR5XEM=",
+      "resolved": "https://registry.npmmirror.com/ios-sim/-/ios-sim-8.0.2.tgz",
+      "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==",
       "dev": true,
       "requires": {
         "bplist-parser": "^0.0.6",
@@ -1137,14 +1175,14 @@
       "dependencies": {
         "bplist-parser": {
           "version": "0.0.6",
-          "resolved": "https://registry.npmmirror.com/bplist-parser/download/bplist-parser-0.0.6.tgz",
-          "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=",
+          "resolved": "https://registry.npmmirror.com/bplist-parser/-/bplist-parser-0.0.6.tgz",
+          "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==",
           "dev": true
         },
         "nopt": {
           "version": "1.0.9",
-          "resolved": "https://registry.nlark.com/nopt/download/nopt-1.0.9.tgz?cache=0&sync_timestamp=1624607881839&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnopt%2Fdownload%2Fnopt-1.0.9.tgz",
-          "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=",
+          "resolved": "https://registry.npmmirror.com/nopt/-/nopt-1.0.9.tgz",
+          "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
           "dev": true,
           "requires": {
             "abbrev": "1"
@@ -1163,6 +1201,15 @@
       "resolved": "https://registry.nlark.com/is-arrayish/download/is-arrayish-0.3.2.tgz",
       "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM="
     },
+    "is-core-module": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.8.1.tgz",
+      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
+      "dev": true,
+      "requires": {
+        "has": "^1.0.3"
+      }
+    },
     "is-extglob": {
       "version": "2.1.1",
       "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz",
@@ -1361,8 +1408,8 @@
     },
     "nopt": {
       "version": "5.0.0",
-      "resolved": "https://registry.nlark.com/nopt/download/nopt-5.0.0.tgz?cache=0&sync_timestamp=1624607881839&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnopt%2Fdownload%2Fnopt-5.0.0.tgz",
-      "integrity": "sha1-UwlCu1ilEvzK/lP+IQ8TolNV3Ig=",
+      "resolved": "https://registry.npmmirror.com/nopt/-/nopt-5.0.0.tgz",
+      "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
       "dev": true,
       "requires": {
         "abbrev": "1"
@@ -1527,6 +1574,12 @@
       "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=",
       "dev": true
     },
+    "path-parse": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true
+    },
     "picomatch": {
       "version": "2.3.0",
       "resolved": "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpicomatch%2Fdownload%2Fpicomatch-2.3.0.tgz",
@@ -1726,6 +1779,15 @@
         "util-deprecate": "^1.0.1"
       }
     },
+    "rechoir": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.6.2.tgz",
+      "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
+      "dev": true,
+      "requires": {
+        "resolve": "^1.1.6"
+      }
+    },
     "recursive-fs": {
       "version": "0.1.4",
       "resolved": "https://registry.nlark.com/recursive-fs/download/recursive-fs-0.1.4.tgz",
@@ -1738,6 +1800,17 @@
       "integrity": "sha1-4Mk1QsV0UhvqE98PlIjtgqt3xdo=",
       "dev": true
     },
+    "resolve": {
+      "version": "1.22.0",
+      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.0.tgz",
+      "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
+      "dev": true,
+      "requires": {
+        "is-core-module": "^2.8.1",
+        "path-parse": "^1.0.7",
+        "supports-preserve-symlinks-flag": "^1.0.0"
+      }
+    },
     "reusify": {
       "version": "1.0.4",
       "resolved": "https://registry.nlark.com/reusify/download/reusify-1.0.4.tgz",
@@ -1825,10 +1898,15 @@
       "dev": true
     },
     "shelljs": {
-      "version": "0.2.6",
-      "resolved": "https://registry.npmmirror.com/shelljs/download/shelljs-0.2.6.tgz",
-      "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=",
-      "dev": true
+      "version": "0.8.5",
+      "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.8.5.tgz",
+      "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
+      "dev": true,
+      "requires": {
+        "glob": "^7.0.0",
+        "interpret": "^1.0.0",
+        "rechoir": "^0.6.2"
+      }
     },
     "signal-exit": {
       "version": "3.0.6",
@@ -1836,12 +1914,12 @@
       "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
     },
     "simctl": {
-      "version": "2.0.0",
-      "resolved": "https://registry.nlark.com/simctl/download/simctl-2.0.0.tgz",
-      "integrity": "sha1-4/HGkIc1lp4j4JIrDLEWGEPdDFk=",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/simctl/-/simctl-2.0.3.tgz",
+      "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==",
       "dev": true,
       "requires": {
-        "shelljs": "^0.2.6",
+        "shelljs": "^0.8.5",
         "tail": "^0.4.0"
       }
     },
@@ -2056,10 +2134,16 @@
         }
       }
     },
+    "supports-preserve-symlinks-flag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true
+    },
     "tail": {
       "version": "0.4.0",
-      "resolved": "https://registry.npmmirror.com/tail/download/tail-0.4.0.tgz",
-      "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=",
+      "resolved": "https://registry.npmmirror.com/tail/-/tail-0.4.0.tgz",
+      "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==",
       "dev": true
     },
     "tar-fs": {
@@ -2143,8 +2227,8 @@
     },
     "unorm": {
       "version": "1.6.0",
-      "resolved": "https://registry.nlark.com/unorm/download/unorm-1.6.0.tgz",
-      "integrity": "sha1-ApsolmH7pxTxqa9DnrUdmxbCBa8=",
+      "resolved": "https://registry.npmmirror.com/unorm/-/unorm-1.6.0.tgz",
+      "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==",
       "dev": true
     },
     "unpipe": {
@@ -2160,7 +2244,7 @@
     },
     "uuid": {
       "version": "7.0.3",
-      "resolved": "https://registry.npmmirror.com/uuid/download/uuid-7.0.3.tgz",
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-7.0.3.tgz",
       "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
       "dev": true
     },
@@ -2214,7 +2298,7 @@
     },
     "xcode": {
       "version": "3.0.1",
-      "resolved": "https://registry.npmmirror.com/xcode/download/xcode-3.0.1.tgz",
+      "resolved": "https://registry.npmmirror.com/xcode/-/xcode-3.0.1.tgz",
       "integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==",
       "dev": true,
       "requires": {
@@ -2224,8 +2308,8 @@
     },
     "xml-escape": {
       "version": "1.1.0",
-      "resolved": "https://registry.npm.taobao.org/xml-escape/download/xml-escape-1.1.0.tgz",
-      "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=",
+      "resolved": "https://registry.npmmirror.com/xml-escape/-/xml-escape-1.1.0.tgz",
+      "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==",
       "dev": true
     },
     "xml-writer": {

+ 5 - 0
package.json

@@ -32,6 +32,7 @@
     "cordova-plugin-remote-injection": "git+https://github.com/x1ongzhu/cordova-plugin-remote-injection.git",
     "cordova-plugin-splashscreen": "^6.0.0",
     "cordova-plugin-statusbar": "^3.0.0",
+    "cordova-plugin-wechat": "^3.0.0",
     "cordova-plugin-whitelist": "^1.3.5",
     "cordova-plugin-wkwebview-engine": "^1.2.2",
     "cordova-plugin-x-socialsharing": "^6.0.3",
@@ -57,6 +58,10 @@
       "cordova-plugin-x-socialsharing": {
         "PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
         "PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
+      },
+      "cordova-plugin-wechat": {
+        "WECHATAPPID": "wx6816dbdc07254dcb",
+        "UNIVERSALLINK": "https://www.raex.vip/9th/app"
       }
     },
     "platforms": [

BIN
res/icon/ios/icon-100.png


BIN
res/icon/ios/icon-1024.png


BIN
res/icon/ios/icon-114.png


BIN
res/icon/ios/icon-120.png


BIN
res/icon/ios/icon-144.png


BIN
res/icon/ios/icon-152.png


BIN
res/icon/ios/icon-167.png


BIN
res/icon/ios/icon-180.png


BIN
res/icon/ios/icon-20.png


BIN
res/icon/ios/icon-29.png


BIN
res/icon/ios/icon-40.png


BIN
res/icon/ios/icon-50.png


BIN
res/icon/ios/icon-57.png


BIN
res/icon/ios/icon-58.png


BIN
res/icon/ios/icon-60.png


BIN
res/icon/ios/icon-72.png


BIN
res/icon/ios/icon-76.png


BIN
res/icon/ios/icon-80.png


BIN
res/icon/ios/icon-87.png


+ 8 - 0
scripts/changeVersion.js

@@ -7,6 +7,13 @@ module.exports = function (context) {
     const { ConfigParser } = cordovaCommon;
     const appConfig = new ConfigParser(path.resolve(projectRoot, "config.xml"));
 
+    let baseUrl = "https://www.raex.vip";
+    if (context.cmdLine.includes("--test")) {
+        baseUrl = "https://test.raex.vip";
+    }
+    if (context.cmdLine.includes("--dev")) {
+        baseUrl = "http://192.168.6.116:8082/";
+    }
     fs.writeFileSync(
         path.resolve(projectRoot, "www", "index.html"),
         fs
@@ -15,5 +22,6 @@ module.exports = function (context) {
             .replace("${version}", appConfig.version())
             .replace("${iosCFBundleVersion}", appConfig.ios_CFBundleVersion())
             .replace("${androidVersionCode}", appConfig.android_versionCode())
+            .replace(/\$\{baseUrl\}/g, baseUrl)
     );
 };

+ 16 - 12
www/index.html

@@ -6,6 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <script src="axios.min.js"></script>
+    <script src="cordova.js"></script>
     <title>绿洲宇宙</title>
 </head>
 
@@ -15,27 +16,30 @@
         if (flag === '1') {
             console.log('set flag 1');
             localStorage.setItem('flag', flag);
-            location.href = 'https://www.raex.vip';
+            location.href = 'http://192.168.6.116:8082/';
         }
 
-        var version = '1.0.1';
-        var iosCFBundleVersion = '137';
-        var androidVersionCode = '1116';
-        if (/iphone|ipod|ipad|Macintosh/i.test(navigator.userAgent)) {
-            axios.get('https://www.raex.vip/appVersion/checkIosReview?version=' + version)
+        var version = '1.0.2';
+        var iosCFBundleVersion = '145';
+        var androidVersionCode = '1145';
+        document.addEventListener('deviceready', function () {
+            axios.get('http://192.168.6.116:8082//appVersion/getVersion?version=' + version + '&platform=' + cordova.platformId)
                 .then(function (res) {
                     if (res.data.review) {
-                        location.href = 'index1.html';
+                        if ('ios' === cordova.platformId) {
+                            location.href = 'https://ios.raex.vip?review=true';
+                        } else {
+                            location.href = 'http://192.168.6.116:8082/?review=true';
+                        }
                     } else {
-                        location.href = 'https://www.raex.vip';
+                        location.href = 'http://192.168.6.116:8082/';
                     }
                 })
                 .catch(function (e) {
-                    location.href = 'https://www.raex.vip';
+                    location.href = 'http://192.168.6.116:8082/';
                 });
-        } else {
-            location.href = 'https://www.raex.vip';
-        }
+        });
+
     </script>
 </body>
 

+ 13 - 9
www/template.html

@@ -6,6 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <script src="axios.min.js"></script>
+    <script src="cordova.js"></script>
     <title>绿洲宇宙</title>
 </head>
 
@@ -15,27 +16,30 @@
         if (flag === '1') {
             console.log('set flag 1');
             localStorage.setItem('flag', flag);
-            location.href = 'https://www.raex.vip';
+            location.href = '${baseUrl}';
         }
 
         var version = '${version}';
         var iosCFBundleVersion = '${iosCFBundleVersion}';
         var androidVersionCode = '${androidVersionCode}';
-        if (/iphone|ipod|ipad|Macintosh/i.test(navigator.userAgent)) {
-            axios.get('https://www.raex.vip/appVersion/checkIosReview?version=' + version)
+        document.addEventListener('deviceready', function () {
+            axios.get('${baseUrl}/appVersion/getVersion?version=' + version + '&platform=' + cordova.platformId)
                 .then(function (res) {
                     if (res.data.review) {
-                        location.href = 'index1.html';
+                        if ('ios' === cordova.platformId) {
+                            location.href = 'https://ios.raex.vip?review=true';
+                        } else {
+                            location.href = '${baseUrl}?review=true';
+                        }
                     } else {
-                        location.href = 'https://www.raex.vip';
+                        location.href = '${baseUrl}';
                     }
                 })
                 .catch(function (e) {
-                    location.href = 'https://www.raex.vip';
+                    location.href = '${baseUrl}';
                 });
-        } else {
-            location.href = 'https://www.raex.vip';
-        }
+        });
+
     </script>
 </body>