<template>
  <view class="record">
    <view
      class="record-bg"
      :style="{
        backgroundImage: `url(${baseUrl}/farqbxzczytcami/images/bg-6.png)`,
      }"
    ></view>
    <view class="record-content">
      <view class="card">
        <view class="title">签到成功！</view>
        <view class="image">
          <image src="@/assets/reservation-images/sign.png" mode="widthFix" />
        </view>
        <view class="desc"
          >您已签到成功 <br />
          请尽情体验您的飞鹤之旅吧~</view
        >
      </view>
      <view class="buttons">
        <!-- <view style="margin-bottom: 37rpx" @click.stop="handleDetail">
          <fh-button>查看预约详情</fh-button>
        </view> -->
        <view @click.stop="handleHome">
          <fh-button>返回首页</fh-button>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { baseUrl } from '@/reservation/config'
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import fhButton from '../components/fh-button.vue'
defineOptions({
  name: 'record',
})

const id = ref(0)

onLoad((options) => {
  id.value = options.id
  console.log(id.value)
})

const handleDetail = () => {
  uni.redirectTo({
    url: '/reservation/record/detail?id=' + id.value,
  })
}
const handleHome = () => {
  uni.reLaunch({ url: '/reservation/home/index' })
}
</script>

<style lang="less" scoped>
@import './index.less';
</style>
