<template>
|
<LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch">
|
<ContentScrollView style="background-color: transparent">
|
<TaskDetailView :detail="detail"></TaskDetailView>
|
</ContentScrollView>
|
</LoadingLayout>
|
</template>
|
|
<script setup lang="ts">
|
import Taro from '@tarojs/taro';
|
import { useQuery } from '@tanstack/vue-query';
|
import * as taskServices from '@12333/services/apiV2/task';
|
import { TaskDetailView } from '@12333/components';
|
import './taskDetail.scss';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const { userDetail } = useUser();
|
const router = Taro.useRouter();
|
const id = router.params?.id ?? '';
|
const from = router.params?.from ?? '';
|
|
const {
|
isLoading,
|
isError,
|
data: detail,
|
refetch,
|
} = useQuery({
|
queryKey: ['taskServices/getTaskInfo', id],
|
queryFn: async () => {
|
return await taskServices.getTaskInfo(
|
{ id: id },
|
{
|
showLoading: false,
|
}
|
);
|
},
|
placeholderData: () => ({} as API.GetTaskInfoQueryResult),
|
onSuccess(data) {
|
// if (data.isExistTradeChatRecord) setTrue();
|
},
|
});
|
|
Taro.useDidShow(() => {
|
refetch();
|
});
|
</script>
|