<template>
  <div>
    <common current-name="agricultural">
      <template #main>
        <div class="pay-success-warp">
          <userHeader :title="'订单支付成功'"></userHeader>

          <div class="pay-success-content">
            <div class="icon-img">
              <el-icon><CircleCheckFilled /></el-icon>
            </div>
            <div class="success-txt">
              <div class="title">恭喜，支付成功！</div>
              <div class="tips">查看订单详情，请前往“个人中心”的“我的订单”</div>
            </div>
            <div class="success-do">
              <div class="success-do-pos">
                <div class="do-item">
                  <el-button @click="toLink('/sub-operation-service/userCenter')">查看订单</el-button>
                </div>
                <div class="do-item">
                  <el-button type="primary" @click="toLink('/sub-operation-service/smartFarm/main')">返回首页</el-button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </template>
    </common>
  </div>
</template>
<script setup>
import common from './components/common.vue';
import { ref, reactive } from 'vue';
import { isEmpty, getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
import userHeader from './components/userHeader.vue';
const route = useRoute();
const router = useRouter();

let total = ref(99);

const toLink = (path) => {
  if (path && path != '') {
    router.push(path);
  }
};
</script>
<style lang="scss" scoped>
.pay-success-warp {
  width: 100%;
  .pay-success-content {
    margin-top: 16px;
    padding: 16px;
    padding-top: 64px;
    width: 100%;
    height: calc(100vh - 136px);
    border-radius: 16px;
    text-align: center;
    background: $color-fff;
    .icon-img {
      .el-icon {
        font-size: 80px;
        color: $color-main;
      }
    }
    .success-txt {
      .title {
        font-size: 38px;
        color: $color-main;
      }
      .tips {
        font-size: 24px;
        color: $color-999;
      }
    }
    .success-do {
      display: inline-flex;
      justify-content: center;
      margin: 64px 0;
      width: 100%;
      .success-do-pos {
        display: inline-flex;
        justify-content: flex-start;
        gap: 64px;
        .do-item {
          display: inline-block;
          vertical-align: middle;
          .el-button {
            padding: 20px 48px !important;
            font-size: 20px;
            border-radius: 8px !important;
          }
        }
      }
    }
  }
}
</style>
