<template>
  <div class="container"></div>
</template>

<script>
import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin";
import qs from "qs";
import { isXyqb } from "@/service/validation";
export default {
  name: "PayWaiting",
  mixins: [detailPayMixin],
  data() {
    return {
      orderInfo: {}
    };
  },
  mounted() {
    if (document.referrer.length > 0) {
      window.location.href =
        window.location.origin +
        "/payWaiting" +
        qs.stringify(this.$route.query, { encode: true, addQueryPrefix: true });
    }
    this.setIsPayWait(true);
    this.orderInfo = this.$route.query;
    if (this.orderInfo.isXyqb == 1 && !isXyqb) {
      window.location.href = "xyqb://my";
      return;
    }
    if (!this.orderInfo.payOrderNo) {
      this.$notify({ type: "warning", message: "正在跳转..." });
      setTimeout(() => {
        window.location.href = "/policy";
      }, 1000);
      return;
    }
    this.getPayResult();
  }
};
</script>
<style lang="less" src="./index.less" scoped></style>
