浏览代码

fix: 修复官网Taro示例跳转问题

yangjinjun3 3 年之前
父节点
当前提交
f5dd696430
共有 1 个文件被更改,包括 1 次插入1 次删除
  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' && location.href.includes('nutui.jd.com')) {
+      if (Taro.getEnv() === 'WEB' && parent.location.href.includes('zh-CN')) {
         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()}`;
       }
       }
     };
     };