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

  didMount() {
    const {
      detail
    } = this.props;
    const list = [{
      title: '',
      info: detail.packingFee || '',
      type: 'money',
      isLast: false,
      copyButton: false,
      tip: true,
      isBox: true,
      deliveryTemplate: detail.deliveryTemplate
    }, {
      title: '',
      info: detail.deliveryCost || '',
      type: 'money',
      isLast: false,
      copyButton: false,
      tip: true,
      isDeliver: true,
      totalWeight: detail.totalWeight || '1',
      deliveryTemplate: detail.deliveryTemplate
    }, {
      title: '总计',
      info: detail.totalAmount || '',
      type: 'money',
      isLast: false,
      copyButton: false
    }, {
      title: '优惠',
      info: detail.payDiscountAmount || '',
      type: 'discount',
      isLast: false,
      copyButton: false
    }, {
      title: '实际支付',
      info: detail.payedAmount || '',
      type: 'money',
      isLast: true,
      copyButton: false
    }, {
      title: '订单编号',
      info: detail.orderId || '',
      type: 'text',
      isLast: false,
      copyButton: true
    }, {
      title: '下单时间',
      info: detail.gmtCreate || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '付款时间',
      info: detail.gmtPay || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '提货时间',
      info: detail.gmtExchange || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '退款时间',
      info: detail.gmtRefund || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '用户手机',
      info: detail.alipayPhone || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '核销时间',
      info: detail.takeDeliveryTime || '',
      type: 'text',
      isLast: false,
      copyButton: false
    }, {
      title: '订单备注',
      info: detail.remark || '',
      type: 'text',
      isLast: false,
      isRemark: true,
      copyButton: false
    }];
    this.setData({
      list: [...list]
    });
  },

  didUpdate() {},

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

  }
});