Просмотр исходного кода

去掉内嵌本地生活时的顶部导航

xueyihao 4 месяцев назад
Родитель
Сommit
f06e44da05
1 измененных файлов с 0 добавлено и 48 удалено
  1. 0 48
      src/points/pointInfo/billPage.vue

+ 0 - 48
src/points/pointInfo/billPage.vue

@@ -1,14 +1,5 @@
 <template>
-
   <view class="bill-page">
-    <u-navbar :autoBack="true"
-              :bgColor="'#fff'"
-              v-if="currentPlatform !== ''"
-              :placeholder="true"
-              :safeAreaInsetTop="true"
-              title="积分明细"
-              :titleStyle="{ color: '#303133' }"
-              @leftClick="back"/>
     <!-- 顶部积分信息 -->
     <view class="points-header">
       <view class="points-item">
@@ -264,45 +255,6 @@ export default {
         }
       })
     },
-    back() {
-      console.log('back返回----')
-      // 1. 如果在 iframe 里(被 A 项目用 web-view/iframe 打开)
-      if (typeof window !== 'undefined' && window.self !== window.top) {
-        // 1.1 给 App / 小程序容器(有的话)
-        try {
-          webView.postMessage({
-            data: {
-              type: 'back',
-              data: ''
-            }
-          })
-        } catch (e) {}
-        // 1.2 给 H5 父窗口(A 项目)
-        window.parent.postMessage({
-              type: 'back',
-              data: ''
-            },
-            '*' // 线上建议写死成 A 项目的 origin
-        )
-        // 注意:在 iframe 里 **不要再自己后退**,否则就会出现“要点两次”的情况
-        return
-      }
-      // 2. 不在 iframe 里(直接访问 B 项目页面的情况)
-      // 优先用浏览器历史返回
-      if (typeof window !== 'undefined') {
-        if (window.history.length > 1) {
-          window.history.back()
-          return
-        }
-        // 没有历史记录时,兜底:跳到你想要的首页/列表页
-        // window.location.href = 'http://192.168.1.112:8080/custh5/#/' // 换成你 B 项目的首页路由
-        return
-      }
-      // 3. 再兜底 uni.navigateBack(主要给非 H5 平台用)
-      if (typeof uni !== 'undefined' && typeof uni.navigateBack === 'function') {
-        uni.navigateBack()
-      }
-    },
   }
 }
 </script>