expressInfo.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="container">
  3. <view class="express-box">
  4. <view class="top-text">
  5. <text class="top-com">{{expressList.com}}</text>
  6. <text>{{ expressList.nu }}</text>
  7. </view>
  8. <view class="express-body">
  9. <uni-steps :options="expressList.data" active-color="#007AFF" :active="active" direction="column"></uni-steps>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import { express_query } from '@/api/order.js';
  16. import uniSteps from '@/components/uni-steps/uni-steps.vue';
  17. export default {
  18. components: {
  19. uniSteps
  20. },
  21. data() {
  22. return {
  23. id: '',
  24. expressList: [],
  25. active: 0
  26. }
  27. },
  28. onLoad(option) {
  29. this.id = option.id
  30. },
  31. onShow() {
  32. this.loadData()
  33. },
  34. methods: {
  35. loadData() {
  36. express_query({
  37. },this.id).then(({data}) => {
  38. this.expressList = data;
  39. console.log(this.expressList)
  40. }).catch(e => {
  41. uni.showModal({
  42. title: '提示',
  43. content: '暂无物流信息,请稍后查询',
  44. showCancel: false,
  45. success() {
  46. uni.navigateBack()
  47. }
  48. })
  49. })
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .container {
  56. padding: 40rpx;
  57. background: #FFFFFF;
  58. .express-box {
  59. border-radius: $border-radius-sm;
  60. .top-text {
  61. width: 100%;
  62. height: 60rpx;
  63. background: #FFFFFF;
  64. padding-left: 20rpx;
  65. font-size: $font-base;
  66. border-radius: $border-radius-sm;
  67. display: flex;
  68. align-items: center;
  69. border-bottom: 1px solid #EEEEEE;
  70. .top-com {
  71. margin-right: 10rpx;
  72. }
  73. }
  74. .express-body {
  75. margin-top: 20rpx;
  76. background: #FFFFFF;
  77. border-radius: $border-radius-sm;
  78. padding: 20rpx 10rpx 20rpx 0;
  79. }
  80. }
  81. }
  82. </style>