// 微信关注页面
<template>
  <div class="error">
    <div class="main">
      <h3 class="mch-name">{{ mchName }}</h3>
      <img class="error-img" :src="qrCode" alt />
      <div class="msg">
        请长按二维码，关注“
        <span style="color:red">{{ mchName }}</span
        >”微信公众号，在公众号中点击‘防伪查询’菜单，进行防伪查询
      </div>
    </div>
  </div>
</template>

<script>
import apiHelper from "@/assets/js/apiHelper.js";
import _ErrorCode from "@/assets/js/errorCode.js";
export default {
  name: "WxSubscribe",
  data: function() {
    return {
      qrCode: "http://image.supercarrier8.com/antifaketemplae/error.png",
      mchName: ""
    };
  },
  created() {
    // this.msg = "请长按二维码，关注公众号后扫码";
    // this.qrCode = this.sup8.context.wx_user.qr_code;
    // this.mchName = this.sup8.context.wx_user.mch_name;
    this.getWechatConfigInfoByEnterpriseNo();
  },
  mounted() {
    document.title = "关注公众号";
  },
  methods: {
    // 获取公众号信息
    getWechatConfigInfoByEnterpriseNo() {
      this.sup8.WechatConfig = {};
      if (sessionStorage.WechatConfig) {
        this.sup8.WechatConfig = JSON.parse(sessionStorage.WechatConfig) || {};
      }

      this.qrCode = this.sup8.WechatConfig.WxQrCode;
      this.mchName = this.sup8.WechatConfig.Mch_Name;
      // apiHelper.getWechatConfigInfoByEnterpriseNo( this.sup8.context.eno,(res)=> {
      // 	if (res.flag) {
      // 		this.qrCode=res.data.WxQrCode;
      // 		this.mchName=res.data.Mch_Name;
      // 	}
      // });
    }
  }
};
</script>

<style>
@import "./assets/css/index.css";
</style>
<style scoped>
.main {
  margin: 0;
  /* background-color: #f8f8f8; */
  text-align: center;
}

.mch-name {
  text-align: center;
  margin-top: 10%;
}

.error-img {
  width: 60%;
  /* background-color: #f3f3f3; */
  padding: 2% 0 12% 0;
}

.msg {
  font-size: 1rem;
  text-align: left;
  margin-top: 1rem;
  color: #bebebe;
  width: 70%;
  margin: 0% auto;
}
</style>
