import { myRequest, uploadFile } from './http.js'


//上传素材
export const uploadMediaFile = (data) => {
	return uploadFile({
		url: '/cmsback/api/clue/uploadMediaFile',
		...data
	})
}

//发布报料
export const saveClue = (data) => {
	return myRequest({
		url: '/cmsback/api/clue/save',
		method: 'POST',
		data
	})
}

//报料广场
export const findPage = (data) => {
	return myRequest({
		url: '/cmsback/api/clue/findPage',
		method: 'POST',
		data
	})
}

//查看线索详情
export const getClueById = (id) => {
	return myRequest({
		url: `/cmsback/api/clue/getClueById/${id}`,
		method: 'GET',
	})
}

//获取手机号码
export const getMobile = data => {
	return myRequest({
		url: '/cmsback/api/clue/findMobile',
		method: "POST",
		data
	})
}

//获取用户权限
export const findUserAuth = data => {
	return myRequest({
		url: '/cmsback/api/clue/checkAuth',
		method: 'GET',
		data
	})
}