<template>
  <div class="app-container">
    <div id="AliPay" v-html ="apply">
      loading
    </div>
  </div>
</template>

<script>
  import {buyTool} from "@/api/toolInfo/market";
  export default {
        name: "buyTool",
      data() {
          return {
             order: {},
             apply: ''
          }
      },
      created() {
        let data = JSON.parse(this.$route.query.res)
        this.order = Object.assign({}, data)
        },
      mounted() {
        buyTool(this.order).then(response => {
          this.apply = response.data;
          this.$nextTick(()=>{
            document.forms[0].submit()
          })
          // this.$notify({
          //   title: '购买成功',
          //   message: '请在我的工具中查看',
          //   align: 'center',
          //   type: 'success'
          // });
        })
      }
    }
</script>

<style scoped>

</style>
