log.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!-- 售后进度 -->
  2. <template>
  3. <s-layout title="售后进度">
  4. <view class="log-box">
  5. <view v-for="(item, index) in state.info" :key="item.title">
  6. <log-item :item="item" :index="index" :data="state.info"></log-item>
  7. </view>
  8. </view>
  9. </s-layout>
  10. </template>
  11. <script setup>
  12. import sheep from '@/sheep';
  13. import { onLoad } from '@dcloudio/uni-app';
  14. import { computed, reactive } from 'vue';
  15. import logItem from './log-item.vue';
  16. const state = reactive({
  17. active: 1,
  18. list: [
  19. {
  20. title: '买家下单',
  21. desc: '2018-11-11',
  22. },
  23. {
  24. title: '卖家发货',
  25. desc: '2018-11-12',
  26. },
  27. {
  28. title: '买家签收',
  29. desc: '2018-11-13',
  30. },
  31. {
  32. title: '交易完成',
  33. desc: '2018-11-14',
  34. },
  35. ],
  36. });
  37. async function getDetail(id) {
  38. const { data } = await sheep.$api.order.aftersale.detail(id);
  39. state.info = data.logs;
  40. }
  41. onLoad((options) => {
  42. state.aftersaleId = options.id;
  43. getDetail(options.id);
  44. });
  45. </script>
  46. <style lang="scss" scoped>
  47. .log-box {
  48. padding: 24rpx 24rpx 24rpx 40rpx;
  49. background-color: #fff;
  50. }
  51. </style>