Przeglądaj źródła

Merge branch 'prod' of http://39.106.8.246:3003/yunxing/wanda-bm-guide-h5 into dev

yunxing 4 lat temu
rodzic
commit
479a82722d
1 zmienionych plików z 9 dodań i 7 usunięć
  1. 9 7
      src/main.ts

+ 9 - 7
src/main.ts

@@ -19,8 +19,10 @@ if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'pr
     // TODO: vConsole
     new VConsole()
 }
+const ua = navigator.userAgent
+
 // 打包后,监听deviceready事件,处理 部分设备 不能使用cordova插件方法的问题
-/* if (process.env.NODE_ENV === 'production') {
+if (process.env.NODE_ENV === 'production' && ua.indexOf('MI 9') !== -1) {
     window.addEventListener('deviceready', function() {
         new Vue({
             router,
@@ -35,9 +37,9 @@ if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'pr
         store,
         render: (h) => h(App),
     }).$mount('#app')
-} */
-new Vue({
-    router,
-    store,
-    render: (h) => h(App),
-}).$mount('#app')
+}
+// new Vue({
+//     router,
+//     store,
+//     render: (h) => h(App),
+// }).$mount('#app')