<template>
  <div>
    <span>正在跳转中...</span>
  </div>
</template>

<script>
const zlog = console.log.bind(console);
export default {
  name: "voucherInfo",
  data() {
    return {
      QRCodeMsg:''
    };
  },
  created() {
    // alert("--->voucherInfo: Created.");
    // wx.miniProgram.navigateTo({url: '/path/to/page'})
    // wx.miniProgram.navigateTo({url: '/pages/coupon/detail/detailid=100000338&actionid=97'})
  },
  mounted() {
    wx.miniProgram.navigateTo({url: '/pages/coupon/detail/detailid=100000338&actionid=97'})

  },
  methods: {
    redirect() {
      //  wx.miniProgram.navigateTo({url: '/pages/coupon/detail/detailid=100000338&actionid=97'})
      // alert('--->voucherInfo: redirect: IN.')

      window.location.href = 'https://mp.weixin.qq.com/a/~PLEzZIqxoasdl5QDu_HZEw~~';

      // wx.navigateToMiniProgram({
      //   appId: "1000004",
      //   path: "page/index/index?id=123",
      //   extraData: {
      //     foo: "bar"
      //   },
      //   success(res) {
      //     alert(`--->voucherInfo: navigateToMiniProgram: res.`)
      //     alert(`--->voucherInfo: navigateToMiniProgram: res =${JSON.stringify(res)}`)
      //     // 打开成功
      //   },
      //   fail(err) {
      //     alert(`--->voucherInfo: navigateToMiniProgram: err.`)
      //     alert(`--->voucherInfo: navigateToMiniProgram: err =${JSON.stringify(err)}`)
      //     // 打开成功
      //   }
      // });
    }
  }
};
</script>

<style scoped>
  #qrcode{
    width: 100px;
    height: 100px;
  }
.main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
</style>
