log.vue 898 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!-- 售后日志列表 -->
  2. <template>
  3. <s-layout :title="$t('order.after_sales_progress')">
  4. <view class="log-box">
  5. <view v-for="(item, index) in state.list" :key="item.id">
  6. <log-item :item="item" :index="index" :data="state.list" />
  7. </view>
  8. </view>
  9. </s-layout>
  10. </template>
  11. <script setup>
  12. import { onLoad } from '@dcloudio/uni-app';
  13. import { reactive } from 'vue';
  14. import logItem from './log-item.vue';
  15. import AfterSaleApi from '@/sheep/api/trade/afterSale';
  16. const state = reactive({
  17. list: [],
  18. });
  19. async function getDetail(id) {
  20. const { data } = await AfterSaleApi.getAfterSaleLogList(id);
  21. state.list = data;
  22. }
  23. onLoad((options) => {
  24. state.aftersaleId = options.id;
  25. getDetail(options.id);
  26. });
  27. </script>
  28. <style lang="scss" scoped>
  29. .log-box {
  30. padding: 24rpx 24rpx 24rpx 40rpx;
  31. background-color: #fff;
  32. }
  33. </style>