express-detail.vue 914 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view class="express-detail">
  3. <view>物流公司:{{ express_name }}</view>
  4. <UniSteps :options="info.data" direction="column" active-color="#F76454"></UniSteps>
  5. </view>
  6. </template>
  7. <script>
  8. import UniSteps from '@/components/uni-steps/uni-steps.vue'
  9. export default {
  10. components: { UniSteps },
  11. data() {
  12. return {
  13. info: {},
  14. express_name: ''
  15. };
  16. },
  17. onLoad({ express_order, express_name }) {
  18. this.express_name = express_name
  19. uni.loading()
  20. uni.request({ url: `https://www.yinchengnuo.com/express?num=${express_order}` }).then(([, { data }]) => {
  21. this.info = data
  22. this.info.data.forEach(e => {
  23. e.title = e.context
  24. e.desc = e.time
  25. })
  26. uni.hideLoading()
  27. })
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. .express-detail {
  33. width: 100vw;
  34. height: 100vh;
  35. overflow: auto;
  36. padding: 24rpx;
  37. background: #FFFFFF;
  38. box-sizing: border-box;
  39. }
  40. </style>