import Vue from "vue";
import QRCode from "qrcode";
export default Vue.extend({
  data() {
    return {
      tradeInTotalList: [
        {
          name: "总接收",
          value: "100YCC",
        },
        {
          name: "总发送",
          value: "100YCC",
        },
        {
          name: "交易数量",
          value: "100YCC",
        },
        {
          name: "总价值",
          value: "100YCC",
        },
      ],
    };
  },
  mounted() {
    this.init();
  },
  activated() {
    this.init();
  },
  methods: {
    init() {
      QRCode.toCanvas(
        document.getElementById("qrcode"),
        this.$route.query.address as string,
        {
          color: {
            dark: "#1F3470",
            light: "#0000",
          },
          width: 130,
          margin: 0,
        },
        function(error) {
          if (error) console.error(error);
        }
      );
    },
  },
});
