<style lang="less">
.arrow {
  position: fixed;
  left: 16px;
}
</style>
<template>
<div class="arrow" style="top:{{barTop}}px" @click="goBack"><van-icon name="arrow-left" size="20"/></div>
</template>

<script>
import wepy from '@wepy/core';
import store from '@/store';
import config from '@/config';

wepy.component({
  store,
  props: {},
  data: {
    h5StaticPath: config.h5StaticPath + '/page-home/',
    barTop: 0,
  },
  ready() {
    debugger;
    // 胶囊按钮位置信息
    const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
    // console.log('menuButtonInfo', menuButtonInfo);
    this.barTop = menuButtonInfo.top + 4;
  },
  detached() {
    debugger;
    console.log('detacheddetached');
  },
  watch: {},
  methods: {
    goBack() {
      wx.navigateBack();
    },
  },
});
</script>
<config>
{
"navigationStyle":"custom",
usingComponents: {
  "van-icon": "module:@vant/weapp/dist/icon",
}
}
</config>
