<template>
  <view>
    <van-sticky>
      <view class="top-bar justify-center bg-white sh">
        <van-icon class="top-left" name="arrow-left" @tap="goBack" />
        <view class="top-center">{{ state.title }}</view>
      </view>
    </van-sticky>
    <van-image width="100%" src="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/issue.png" />
    <to-top />
  </view>
</template>

<script setup lang="ts">
import { reactive } from 'vue';
import toTop from '@/components/tool/toTop.vue';
import { PageUtils } from '@/utils/utils';
import { onPageScroll } from '@dcloudio/uni-app'
onPageScroll(e => { }) // uniapp的Bug，这句话不要去掉，否则to-top不生效

const state = reactive({
  title: PageUtils.getTitle(),
})

function goBack() {
  PageUtils.goBack()
}
</script>

<style lang="scss" scoped>
.mail_box {
  position: relative;
  height: 185rpx;
  width: 100%;
}
</style>
