<template>
  <div class="alipay">
    <div class="alipayCode">
      <div><img :src="imgUrl" alt="" /></div>
      <p>请使用支付宝扫描二维码支付，请在5分钟内完成支付，过期请刷新支付码</p>
    </div>
    <el-button>刷新二维码</el-button>
  </div>
</template>

<script>
import { paymentApi } from "@/api/paymentApi.js";
export default {
  data() {
    return {
      imgUrl: ""
    };
  },
  mounted() {
    paymentApi().then(res => {
      console.log(res);
    });
  }
};
</script>

<style lang="scss">
.alipay {
  width: 100%;
  display: flex;
  align-items: flex-end;
  .alipayCode {
    width: 252px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e6e6e6;
    div {
      width: 117px;
      height: 117px;
      background: #ccc;
      img {
        width: 100%;
        height: 100%;
      }
    }
    p {
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(153, 153, 153, 1);
      line-height: 17px;
      margin-top: 14px;
    }
  }
  .el-button {
    width: 100px;
    height: 36px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #3071fe;
    line-height: 20px;
    padding: 0;
    border: 1px solid #3071fe;
    background: #fff;
    border-radius: 0;
    margin-left: 32px;
  }
}
</style>
