mall-uniapp/pages/order/aftersale/log.vue

39 lines
877 B
Vue
Raw Normal View History

2023-12-14 12:07:20 +00:00
<!-- 售后日志列表 -->
2022-11-22 07:45:36 +00:00
<template>
<s-layout title="售后进度">
<view class="log-box">
2023-12-14 12:07:20 +00:00
<view v-for="(item, index) in state.list" :key="item.id">
<log-item :item="item" :index="index" :data="state.list" />
2022-11-22 07:45:36 +00:00
</view>
</view>
</s-layout>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app';
2023-12-14 12:07:20 +00:00
import { reactive } from 'vue';
import logItem from './log-item.vue';
2023-12-14 12:07:20 +00:00
import AfterSaleApi from '@/sheep/api/trade/afterSale';
2022-11-22 07:45:36 +00:00
const state = reactive({
2023-12-14 12:07:20 +00:00
list: [],
2022-11-22 07:45:36 +00:00
});
2023-12-14 12:07:20 +00:00
2022-11-22 07:45:36 +00:00
async function getDetail(id) {
2023-12-14 12:07:20 +00:00
const { data } = await AfterSaleApi.getAfterSaleLogList(id);
state.list = data;
2022-11-22 07:45:36 +00:00
}
2023-12-14 12:07:20 +00:00
2022-11-22 07:45:36 +00:00
onLoad((options) => {
state.aftersaleId = options.id;
getDetail(options.id);
});
</script>
<style lang="scss" scoped>
.log-box {
padding: 24rpx 24rpx 24rpx 40rpx;
background-color: #fff;
}
</style>