expressInfo.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. export default {
  17. data() {
  18. return {
  19. id: '',
  20. expressList: [],
  21. active: 0
  22. }
  23. },
  24. onLoad(option) {
  25. this.id = option.id
  26. },
  27. onShow() {
  28. this.loadData()
  29. },
  30. methods: {
  31. loadData() {
  32. express_query({
  33. id: this.id,
  34. }).then(({data}) => {
  35. this.expressList = data;
  36. console.log(this.expressList)
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .container {
  44. padding: 40rpx;
  45. .express-box {
  46. border-radius: $border-radius-sm;
  47. .top-text {
  48. width: 100%;
  49. height: 60rpx;
  50. background: #FFFFFF;
  51. padding-left: 20rpx;
  52. font-size: $font-base;
  53. border-radius: $border-radius-sm;
  54. display: flex;
  55. align-items: center;
  56. .top-com {
  57. margin-right: 10rpx;
  58. }
  59. }
  60. .express-body {
  61. margin-top: 20rpx;
  62. background: #FFFFFF;
  63. border-radius: $border-radius-sm;
  64. padding: 20rpx 10rpx 20rpx 0;
  65. }
  66. }
  67. }
  68. </style>