OrderDeliver.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!-- OrderDetailBody.vue -->
  2. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  3. <member-base :show="false"><view class="div order-deliver">
  4. <view class="div common-header-wrap">
  5. <view :style="'height:'+navHeight+'px'"></view>
  6. <view class="common-header-holder"></view>
  7. <view class="common-header-fixed">
  8. <title-header />
  9. <uni-nav-bar title="物流跟踪" class="common-header" left-icon="back" @clickLeft="goBack()">
  10. </uni-nav-bar>
  11. </view>
  12. </view>
  13. <view class="div main-content">
  14. <flex-line :show-border="true"><text class="span line-name">物流公司</text><text class="span" slot="right">{{express_name}}</text></flex-line>
  15. <flex-line :show-border="true"><text class="span line-name">物流单号</text><text class="span" slot="right">{{shipping_code}}</text></flex-line>
  16. <view class="div mt-5" v-if="deliver_info">
  17. <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>
  18. </view>
  19. </view>
  20. </view></member-base>
  21. </template>
  22. <script>
  23. import {getFontSize} from '@/util/common'
  24. import TitleHeader from '../../TitleHeader'
  25. import MemberBase from '../MemberBase'
  26. import { getOrderDeliver } from '../../../api/memberOrder'
  27. import flexLine from '../../flexLine'
  28. export default {
  29. name:'MemberOrderDeliver',
  30. mounted(){
  31. // #ifdef MP-WEIXIN
  32. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  33. // #endif
  34. },
  35. computed:{
  36. fontSize(){
  37. return getFontSize()
  38. },
  39. },
  40. data(){
  41. return {
  42. navHeight: 0,
  43. deliver_info: false,
  44. express_name:'',
  45. shipping_code:''
  46. }
  47. },
  48. components:{
  49. TitleHeader,
  50. MemberBase,
  51. flexLine
  52. },
  53. onLoad: function (option) {
  54. if (option.order_id) {
  55. getOrderDeliver(option.order_id).then(res => {
  56. this.deliver_info = res.result.deliver_info
  57. this.express_name=res.result.express_name
  58. this.shipping_code=res.result.shipping_code
  59. }).catch(function (error) {
  60. uni.showToast({icon:'none',title: error.message})
  61. })
  62. }
  63. },
  64. methods:{
  65. goBack(){uni.navigateBack({delta:1})},
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .main-content{background: #fff;padding:0 $pageSpace}
  71. </style>