export default ($axios) => ({
    getToolsList(params) {
        return $axios.get('/tool', { params })
    },
	getCategoryList(params) {
		return $axios.get('/category/tree', { params })
	},
	getToolByCategory(params) {
		return $axios.get('/tool/group', { params })
	},
	getToolDetailBySlug(slug) {
		return $axios.get('/tool/' + slug)
	},
	clickToolLike(id) {
		return $axios.post('/tool/like', {id})
	},
	recordToolClickNum(id) {
		return $axios.post('/tool/click', {id})
	},
	searchToolByWord(word) {
		return $axios.get('/tool/search', { params:{q: word, limit:50}})
	},
})
