index.vue 1.61 KB
Newer Older
xd's avatar
xd committed
1 2 3 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
<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>