expressInfo.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. id: this.id,
  38. }).then(({data}) => {
  39. this.expressList = data;
  40. console.log(this.expressList)
  41. })
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. .container {
  48. padding: 40rpx;
  49. .express-box {
  50. border-radius: $border-radius-sm;
  51. .top-text {
  52. width: 100%;
  53. height: 60rpx;
  54. background: #FFFFFF;
  55. padding-left: 20rpx;
  56. font-size: $font-base;
  57. border-radius: $border-radius-sm;
  58. display: flex;
  59. align-items: center;
  60. .top-com {
  61. margin-right: 10rpx;
  62. }
  63. }
  64. .express-body {
  65. margin-top: 20rpx;
  66. background: #FFFFFF;
  67. border-radius: $border-radius-sm;
  68. padding: 20rpx 10rpx 20rpx 0;
  69. }
  70. }
  71. }
  72. </style>