success.vue 1001 Bytes
Newer Older
乐宝呗666's avatar
乐宝呗666 committed
1 2
<template>
  <div class="success-container">
3
    <img src="@/assets/images/applets/success.png" alt="" />
乐宝呗666's avatar
乐宝呗666 committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    <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;
乐宝呗666's avatar
乐宝呗666 committed
41
    padding: 30px;
乐宝呗666's avatar
乐宝呗666 committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55
  }
  .van-button--normal {
      background: #a4151d;
      border-radius: 4px;
      height: 40px;
      width: 85%;
      color: #fff;
      border: none;
      font-size: 16px;
      margin-top: 30px;
    }
}
</style>