<template>
  <div class="success-container">
    <img src="images/applets/success.png" alt="" />
    <p>{{txt}}</p>
    <van-button type="default" @click="sureBtn">确定</van-button>
  </div>
</template>
<script>
export default {
  data(){
    return {
      txt:'',
      url:''
    }
  },
  mounted(){
    this.txt = this.$route.query.txt || '操作成功'
    this.url = this.$route.query.url || '/commit'
  },
  methods:{
    sureBtn(){
      this.$router.push(this.url)
    }
  }
};
</script>
<style lang="scss">
.success-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  img {
    width: 50%;
    margin-top: 200px;
  }
  p {
    margin-top: 30px;
    font-size: 18px;
    color: #333;
  }
  .van-button--normal {
      background: #a4151d;
      border-radius: 4px;
      height: 40px;
      width: 85%;
      color: #fff;
      border: none;
      font-size: 16px;
      margin-top: 30px;
    }
}
</style>

