<template>
  <view class="container">
    <view class="main_box">
      <view class="make_msg_box">
        <image class="success_icon" :src="iconUrl.icon_circleActive"></image>
        <text class="title">已成功提交退费申请</text>
      </view>
      <image v-if="pageType == 'yygh'" class="division_icon" :src="iconUrl.icon_division"></image>
      <view class="tips_box">
        <view class="tips_boxTit">温馨提示</view>
        <text>请等待审核结果，如审核未通过会短信通知您;审核通过后预计将在7 个工作日退款到账，具体以银行实际到账时间为准，请耐心等待。</text>
      </view>
      <text class="determine backgroundCustom" @click="btnClick">返回首页</text>
      <text class="determine backgroundCustom" @click="btnClickRecord">查看申请记录</text>
    </view>
  </view> 
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { common } from '@/utils';
import icon from '@/utils/icon';

const iconUrl = ref(icon);
const pageType = ref('');

onLoad((options) => {
  if (options && options.pageType) {
    pageType.value = options.pageType;
  }
});

/**
 * 回首页
 */
const btnClick = () => {
  common.goToUrl('/pages/st1/business/tabbar/homePage/homePage', { skipWay: "reLaunch" });
};

const btnClickRecord = () => {
  common.goToUrl(`/pagesPatient/st1/business/refund/refundApplicationRecord/refundApplicationRecord`, { skipWay: 'redirectTo' });
};
</script>

<style>
.main_box {
  width: 100%;
  height: 100%;
  padding: 30upx;
  box-sizing: border-box;
  padding-bottom: 210upx;
  overflow: auto;
}
.division_icon {
  width: 100%;
  height: 48upx;
}
.make_msg_box {
  width: 100%;
  padding: 64upx 0upx 30upx 0upx;
  box-sizing: border-box;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 24upx;
}
.make_msg_box .success_icon {
  width: 120upx;
  height: 120upx;
  margin-bottom: 30upx;
}
.make_msg_box .title {
  text-align: center;
  font-size: 36upx;
  font-family: PingFang SC;
  font-weight: bold;
  color: #333;
  text-align: left;
}

.tips_box {
  background: white;
  padding: 30upx;
  box-sizing: border-box;
  border-radius: 24upx;
}
.tips_boxTit{
  font-size: 32upx;
  text-align: center;
  margin: 30upx 0;
}
.tips_box text {
  line-height: 48upx;
  font-size: 30upx;
  color: #333;
  text-align: justify;
  display: block;
}

/* 按钮 */

.determine {
  display: block;
  margin: 40upx 0 0 ;
  line-height: 88upx;
  height: 88upx;
  font-size: 32upx;
  font-family: PingFang SC;
  font-weight: bold;
  text-align: center;
  border-radius: 44upx;
}
</style>
