<template>
  <div class="wrap">
    <div class="top-wrap"></div>
    <div class="center-info">
      <img class="wait_icon" src="@/assets/supplier/successIcon.png" alt="">
      <div class="info-tip">信息录入完成，请等待审核结果。</div>
    </div>
    <div class="btn_wrap">
      <div class="btn" @click="searchInfo">信息查看</div>
    </div>
  </div>
</template>

<script>
  import {myMixins} from "@/utils/myMixins"
  export default {
    name: "supplierAddResult",
    mixins:[myMixins],
    data() {
      return {
        id: '',
        potentialFlag: '',
        name: '',
        qrCodeUrl: '',
        qrCode: '',
        configId: '',
        wechatId: '',
      }
    },
    async mounted() {
      const urlParams = new URLSearchParams(window.location.search);
      this.id = this.$route.query.id || urlParams.get('id');
      this.potentialFlag = this.$route.query.potentialFlag || urlParams.get('potentialFlag') || '';
      if (this.id) {
        localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: this.id, potentialFlag: this.potentialFlag } }));
      }
    },
    methods: {
      async searchInfo() {
        localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierInfo', query: { id: this.id, potentialFlag: this.potentialFlag } }));
        this.goPage('supplierInfo', { id: this.id, potentialFlag: this.potentialFlag })
      }
    }
  }
</script>

<style scoped lang="scss">
  @import "@/styles/mixin.scss";
  @import "@/styles/common.scss";
  .wrap{
    @include wh(100%,100%);
    box-sizing: border-box;
    padding-bottom: 100px;
    overflow-y: auto;
    background: linear-gradient( 180deg, #FBFDFE 0%, #F6FBFF 73%, #F0F7FF 100%);
    backdrop-filter: blur(5.602678571428572px);
  }
  .top-wrap {
    width: 100%;
    height: 175px;
    background: linear-gradient( 180deg, #DAECFF 0%, rgba(233,243,255,0) 100%);
  }
  .center-info {
    text-align: center;
    .wait_icon {
      width: 54px;
      height: 54px;
      margin-bottom: 15px;
    }
    .info-tip {
      font-size: 20px;
      font-weight: 500;
      color: #2C2A53;
    }
  }
  .btn_wrap {
    width: 100%;
    padding: 15px 0;
    position: fixed;
    bottom: 10px;
    z-index: 10000 !important;
    .btn {
      width: calc(100% - 80px);
      margin-left: 40px;
      height: 46px;
      background: #0E76F4;
      border-radius: 5px;
      font-size: 15px;
      color: #FFFFFF;
      text-align: center;
      line-height: 46px;
    }
  }

  .wei_code_wrap {
    margin-top: 10px;
    .wei_title {
      font-size: 15px;
      color: #FF553B;
      text-align: center;
    }
    .wei_code_bg {
      width: 163px;
      height: 173px;
      background-image: url("~@/assets/supplier/weiCodeBg.png");
      background-size: 100% 100%;
      margin: 8px auto;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
</style>
