import { apiCluseDetail } from '@/api/clue'
import { ref } from 'vue'

// 获取线索详情
export function useClueDetail() {
    const clueDetailInfo = ref()
    const fetchClueDetail = async (id: number | string) => {
        uni.showLoading({
            title: '加载中'
        })
        try {
            const result = await apiCluseDetail({ id })
            clueDetailInfo.value = result
        } catch (error) {}
        uni.hideLoading()
    }
    return {
        clueDetailInfo,
        fetchClueDetail
    }
}
