<template>
  <el-dialog title="充值订单信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
    <el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
      <el-descriptions-item :label="systemName+'号'">
        {{info.usercode}}
      </el-descriptions-item>
      <el-descriptions-item label="手机号">
        {{info.mobile}}
      </el-descriptions-item>
      <el-descriptions-item label="头像">
        <image-avatar :src="info.avatar" />
      </el-descriptions-item>
      <el-descriptions-item label="性别">
        <cai-dict-tag :options="genderList" :value="info.gender" />
      </el-descriptions-item>
      <el-descriptions-item label="昵称">
        {{info.nickname}}
      </el-descriptions-item>
      <el-descriptions-item label="商品名称">
        {{info.rechargeName}}
      </el-descriptions-item>
      <el-descriptions-item label="充值紫贝">
        {{info.rechargeCoin}}
      </el-descriptions-item>
      <el-descriptions-item label="价格">
        {{info.price}}
      </el-descriptions-item>
      <el-descriptions-item label="平台">
        <cai-dict-tag :options="platformTypeList" :value="info.platformType" />
      </el-descriptions-item>
      <el-descriptions-item label="状态">
        <cai-dict-tag :options="payStatusList" :value="info.payStatus" />
      </el-descriptions-item>
      <el-descriptions-item label="操作时间">
        {{info.createTime}}
      </el-descriptions-item>
      <el-descriptions-item label="后台新增">
        <cai-dict-tag :options="booleanList" :value="info.admin" />
      </el-descriptions-item>
      <el-descriptions-item label="后台ID">
        {{info.adminId}}
      </el-descriptions-item>
      <el-descriptions-item label="操作IP">
        {{info.operateIp}}
      </el-descriptions-item>
      <el-descriptions-item label="appid">
        {{info.appid}}
      </el-descriptions-item>
      <el-descriptions-item label="链路号">
        {{info.traceId}}
      </el-descriptions-item>
      <el-descriptions-item label="第三方回调数据" :span="3">
        {{info.returnContent}}
      </el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>

<script>
import {
  booleanList,
  genderList,
  memberStatusList,
  memberTypeList,
  payStatusList,
  platformTypeList,
  yesOrNoList
} from '@/constant/statusMap'
import {getRechargeOrder, getRechargeOrderByTraceId} from '@/api/cai/rechargeOrder'

export default {
  name: "UserInfo",
  data() {
    return {
      systemName: process.env.VUE_APP_SYSTEM_HOME,
      genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
      payStatusList,
      activeName:['base','account','userAlbums'],
      CS: {
        'text-align': 'center',  //文本居中
        'min-width': '250px',   //最小宽度
        'word-break': 'break-all'  //过长时自动换行
      },
      LS: {
        // 'color': '#000',
        'text-align': 'center',
        // 'font-weight': '600',
        'height': '40px',
        // 'background-color': 'rgba(255, 97, 2, 0.1)',
        'min-width': '110px',
        'word-break': 'keep-all'
      },
      open:false,
      info:{},
    };
  },
  created() {

  },
  methods: {
    init(id){
      this.open = true;
      getRechargeOrder(id).then(response => {
        this.info = response.data;
      });
    },
    traceIdInit(traceId){
      this.open = true;
      getRechargeOrderByTraceId(traceId).then(response => {
        this.info = response.data;
      });
    },
  }
};
</script>
<style lang="scss" scoped>
.el-row {
  margin-bottom: -15px;
  display: flex;
  flex-wrap: wrap
}

/* .el-card {
   min-width: 100%;
   height: 80%;  // 高度要设置百分比才可以
   margin-right: 20px;
   transition: all .5s;
 }*/
</style>
