Browse Source

多环境打包修改

yunxing 4 years ago
parent
commit
fa83e12345
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/main.ts

+ 6 - 1
src/main.ts

@@ -27,8 +27,13 @@ const ua = navigator.userAgent
 // console.log('height:', window.screen.height)
 // console.log('clientWidth:', document.body.clientWidth)
 // console.log('clientHeight:', document.body.clientHeight)
+
 // 打包后,监听deviceready事件,处理 部分设备 不能使用cordova插件方法的问题
-if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'alyTest') {
+/* 打包后,不是 1.阿里云的test环境(http://60.205.177.43/wandaBmGuideH5Test) 2.完成内网测试环境(http://10.199.204.88/wandaBmGuideH5/) -->
+   即 阿里云的正常环境(http://60.205.177.43/wandaBmGuideH5) , 万达正式环境  
+   使用deviceready 
+*/
+if (process.env.NODE_ENV === 'production' && !['alyTest', 'test'].includes(process.env.VUE_APP_RealEnv)) {
     window.addEventListener('deviceready', function() {
         new Vue({
             router,