// 客服
<template>
  <x-prompt :visible="visible">
    <div class="head">联系客服</div>
    <div class="body">
      <p>长按识别二维码，添加客服微信</p>
      <img :src="src"
           style="width: 60%;margin-top: .3rem;">
    </div>
  </x-prompt>
</template>
<script>
import prompt from "../prompt.vue";
import { getCustomQRCode } from "@/api";

export default {
  components: { "x-prompt": prompt },
  data() {
    return {
      channel_id: window.options.distribution_channel_id,
      src: "",
    };
  },
  methods: {
    initServerImage() {
      getCustomQRCode(this.channel_id, this.openid).then((r) => {
        this.src = r.qrcode;
      });
    },
  },
  created() {
    this.initServerImage();
  },
};
</script>
<style lang="scss">
</style>