<template>
  <div class="w-full h-screen bg-homeBanner bg-top bg-contain bg-no-repeat bg-app-drak-1 flex flex-col items-center justify-center">
    <template v-if="type === 1">
      <img class="w-24 h-24 mb-6" src="@/assets/success.png" alt="">
      <p class="text-lg text-white mb-7">提交成功</p>
      <p class="text-sm text-white mb-8">您的{{ text || '提案' }}已经提交成功，并且已扣除0.002BTY</p>
      <button class="w-11/12 h-10 bg-app-blue-2 text-white rounded-lg" @click="hide">确  定</button>
    </template>
    <template v-else>
      <img class="w-24 h-24 mb-6" src="@/assets/fail.png" alt="">
      <p class="text-lg text-white mb-7">提交失败</p>
      <p class="text-sm text-white mb-8">{{ res }}</p>
      <button class="w-11/12 h-10 bg-app-blue-2 text-white rounded-lg" @click="hide">确  定</button>
    </template>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    type: {
      default: 1,
      type: Number
    },
    res: {
      type: String
    },
    text: {
      type: String
    }
  },
  // computed: {
  //   text() {
  //     return this.$store.state.app.text
  //   }
  // },
  methods: {
    hide() {
      this.$store.commit('app/HIDE_LOADING')
    }
  }
})
</script>