<template>
  <div>
    <h3 style="color:#2d8cf0;font-size:18px;margin:14px 0 0 15px">
      二维码管理
    </h3>
    <h5 style="margin:24px 0 0 15px;display:inline-block">前台扫描二维码</h5>
    <div class="Qrcode">
      <img :src="url" style="width:100%;height:100%" />
    </div>
    <p class="xiazai" @click="downPic">下载</p>
    <!-- <p style="margin-top:40px"><span>请点击&nbsp;</span>
        <a href="http://192.168.28.10:7086/acceptInterview?isResufe=false"
        style="text-decoration:none;width:100px;height:30px;background:#0092ff;color:white;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important">接受面试安排</a>&nbsp;或
        <a href="http://192.168.28.10:7086/acceptInterview?isResufe=true"
         style="text-decoration:none;width:100px;height:30px;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important;border:1px solid #0092ff;">拒绝面试安排</a>&nbsp;，
        <span>将您的反馈告知我们。</span>
        </p> -->
  </div>
</template>
<script>
import { getErcode, downloadErcode } from '../../api/stystem.server.js';
import { sapi } from '../../config';
export default {
  data() {
    return {
      url: '',
      url2: '',
    };
  },
  methods: {
    // 取到二维码
    getercode() {
      getErcode().then(res => {
        if (res.data.success == true) {
          this.url = res.data.body;
        }
      });
    },
    downPic(img) {
      window.location.href = `${sapi}/api/qrCode/downQrCode`;
    },
  },
  mounted() {
    this.getercode();
  },
};
</script>
<style>
.Qrcode {
  height: 200px;
  width: 200px;
  border: 1px solid black;
  margin: 20px 0 0 15px;
}
.xiazai {
  height: 30px;
  width: 100px;
  background: #2d8cf0;
  color: white;
  line-height: 30px;
  text-align: center;
  border-radius: 5px;
  position: absolute;
  left: 230px;
  top: 270px;
}
</style>
