Component({
  props: {
    componentData: {},
    detail: {}
  },
  data: {
    list: []
  },

  didMount() {
    const {
      detail
    } = this.props;
    const list = [{
      title: '退款金额',
      info: detail.amount || '',
      type: 'discount',
      isLast: false,
      copyButton: false
    }, {
      title: '退配送费',
      info: detail.deliveryCostBack || '0',
      type: 'discount',
      isLast: false,
      show: true,
      copyButton: false
    }, {
      title: '退打包费',
      info: detail.packingFeeBack || '0',
      type: 'discount',
      isLast: false,
      show: true,
      copyButton: false
    }, {
      title: '实际退款金额',
      info: detail.realRefund || '',
      type: 'discount',
      isLast: false,
      copyButton: false
    }, {
      title: '订单编号',
      info: detail.refundId || '',
      type: 'text',
      isLast: false,
      copyButton: true
    }, {
      title: '下单时间',
      info: detail.order.gmtCreate || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '付款时间',
      info: detail.order.gmtPayed || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '提货时间',
      info: detail.order.gmtExchange || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '退款时间',
      info: detail.gmtRefund || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '退货时间',
      info: detail.refundDetailStatus === 'REFUND_AND_GOODS' ? detail.gmtRefund : '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '用户手机',
      info: detail.alipayPhone || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }];
    this.setData({
      list: [...list]
    });
  },

  didUpdate() {},

  methods: {
    copyNum(e) {
      const {
        info
      } = e.target.dataset;
      my.setClipboard({
        text: info
      });
      my.alert({
        title: '复制成功'
      });
    }

  }
});