hangb 7 years ago
parent
commit
364dbb680d
2 changed files with 16 additions and 1 deletions
  1. 15 0
      app.html
  2. 1 1
      nuxt.config.js

+ 15 - 0
app.html

@@ -10,6 +10,8 @@
   <script>
     var _hmt = _hmt || [];
     (function (w, d) {
+      // var heads = document.
+
       if (/(MSIE)|(Trident)/.test(w.navigator.userAgent)) {
         var head = d.getElementsByTagName('head')[0]
         var appendScript = function (src) {
@@ -76,5 +78,18 @@
     }
     el.setAttribute('style', 'display:block;')
   }
+  if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
+    // console.log('iOS')
+    var script=document.createElement("script");
+    script.setAttribute("src", "https://platformcdn.bgycc.com/docs/1528355768709cordovaios(1).js");
+    var heads = document.getElementById("result");
+    heads.appendChild(script);
+  } else {
+    // console.log('android')
+    var script=document.createElement("script");
+    script.setAttribute("src", "https://platformcdn.bgycc.com/test/1527575617170cordovaandroidtest.js");
+    var heads = document.getElementById("result");
+    heads.appendChild(script);
+  }
 </script>
 </html>

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'http://10.1.51.50:8081/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'https://sso.ubtob.com/')
 
 module.exports = {
   router: {