<template>
  <div class="p_all_20">
    <div class="tit">我的支付宝</div>
    <div style="border: 1px solid #f2f2f2;padding: 40px 0">
      <el-form ref="form"  label-width="140px">
        <el-form-item label="支付宝真实姓名">
          {{infoData.aliPayName}}
        </el-form-item>
        <el-form-item label="支付宝账户">
          {{infoData.aliPayAccount}}
        </el-form-item>
        <el-form-item label="支付宝授权图">
          <div v-if="srcList.length>0">
            <el-image
              v-for="item in srcList"
              style="width: 150px; height: 150px;border-radius: 10px;margin-right: 10px"
              :src="item"
              :preview-src-list="srcList">
            </el-image>
          </div>
        </el-form-item>
      </el-form>

    </div>
    <div style="font-size: 12px;color: #ff6600;margin-top: 15px">* 若需要更换支付宝账号，请联系平台客服人员</div>
  </div>
</template>

<script>
  export default {
    name: "showzhifubao",
    data() {
      return {
        infoData:{},
        srcList: [],
      };
    },
    mounted(){
      this.getInfo()
    },
    methods:{
      getInfo() {
        let _this = this;
        this.$axios
          .get("/mypay/aliInfo")
          .then(function(res) {
            if (res.data.code == 200) {
              _this.infoData = res.data.data;
              if(_this.infoData.aliPayImg){
                if(_this.infoData.aliPayImg.indexOf(',')>-1){
                  _this.srcList=_this.infoData.aliPayImg.split(',')
                }else {
                  _this.srcList=[_this.infoData.aliPayImg]
                }
              }
            } else {
              _this.$message.warning(res.data.message);
            }
          })
          .catch(function(res) {
            console.log(res);
          });
      },
    }
  };
</script>

<style lang="scss" scoped>
  .tit {
    font-size: 16px;
    color: #6B6B6B;
    margin-bottom: 20px;
  }

  .tit:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: #147ef9;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 5px;
  }

  .table-box {
    border: 1px solid #DADADA;
    padding: 10px;
    text-align: center;
  }

  .table-tit {
    color: #147ef9;
  }

  .layui-table th {
    text-align: center;
  }

  .table-box img {
    width: 30px;
    height: 30px;
  }

  [type="checkbox"] {
    width: 15px;
    height: 15px;
    vertical-align: middle;
  }

  // .layui-input-block span{vertical-align:middle;}
  // .layui-input-block{line-height:36px;}

  .page {
    margin-top: 15px;
    text-align: center;
  }

  .box {
    padding: 15px;
    .search {
      color: #333;
    }
  }

  .timeInput01 {
    padding-left: 10px;
  }
</style>
