Browse Source

fix: 修复启动Taro+h5后,点击组件空白问题

yangjinjun3 3 years ago
parent
commit
faefc3453c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/sites/mobile-taro/vue/src/pages/index/index.vue

+ 1 - 1
src/sites/mobile-taro/vue/src/pages/index/index.vue

@@ -68,7 +68,7 @@ export default {
         url: `/${enName}/pages/${name.toLowerCase()}/index`
         url: `/${enName}/pages/${name.toLowerCase()}/index`
       });
       });
 
 
-      if (Taro.getEnv() === 'WEB') {
+      if (Taro.getEnv() === 'WEB' && location.href.includes('nutui.jd.com')) {
         parent.location.href = `${parent.location.origin}/vue_taro/index.html#/zh-CN/component/${name.toLowerCase()}`;
         parent.location.href = `${parent.location.origin}/vue_taro/index.html#/zh-CN/component/${name.toLowerCase()}`;
       }
       }
     };
     };