<!-- OrderDetailBody.vue -->
<template><page-meta :root-font-size="fontSize+'px'"></page-meta>
    <seller-base :show="false">
    <view class="div order-deliver">
        <view class="div common-header-wrap">
            <view :style="'height:'+navHeight+'px'"></view>
            <view class="common-header-holder"></view>
            <view class="common-header-fixed">
            <title-header />
            <uni-nav-bar title="物流跟踪" class="common-header" left-icon="back" @clickLeft="goBack()">
            </uni-nav-bar>
        </view>
        </view>
        <view class="div main-content">
        <view class="div">
            <flex-line :show-border="true"><text class="span line-name">物流公司</text><text class="span" slot="right">{{express_name}}</text></flex-line>
            <flex-line :show-border="true"><text class="span line-name">物流单号</text><text class="span" slot="right">{{shipping_code}}</text></flex-line>
        </view>
        <view class="div mt-5" v-if="deliver_info">
            <flex-line v-for="(item,index) in deliver_info" :key="index" :show-border="true"><text class="span line-name">{{item.AcceptTime}}</text><text class="span" slot="right">{{item.AcceptStation}}</text></flex-line>
        </view>
        </view>
    </view>
</seller-base>
</template>

<script>
import {getFontSize} from '@/util/common'

import TitleHeader from '../../TitleHeader'

import SellerBase from '../SellerBase'


import { getRefundDeliver } from '../../../api/sellerRefund'
import flexLine from '../../flexLine'
export default {
  name: 'SellerRefundDeliver',
  computed:{
  fontSize(){
    return getFontSize()
  },
  },
  data(){
    return {
        navHeight: 0,
        deliver_info: false,
        express_name:'',
        shipping_code:''
    }
  },
components:{TitleHeader,SellerBase,flexLine,},
  onLoad: function (option) {
    if (option.refund_id) {
        getRefundDeliver(option.refund_id).then(res => {
        this.deliver_info = res.result.deliver_info
            this.express_name=res.result.express_name
            this.shipping_code=res.result.shipping_code
      }).catch(function (error) {
        uni.showToast({icon:'none',title: error.message})
      })
    }
  },

  mounted(){

  // #ifdef  MP-WEIXIN

  this.navHeight = uni.getMenuButtonBoundingClientRect().height

  // #endif

  },

  methods:{

  goBack(){uni.navigateBack({delta:1})},

  }
}
</script>
<style lang="scss" scoped>
.main-content{background: #fff;padding:0 $pageSpace}
</style>

