import request from '@/apis/utils/request'
 
import Qs from 'qs';

export function uploadPicture(formData) {
	return request({
		url: '/uploadPicture',
		header:{
			   'Content-Type': 'application/x-www-form-urlencoded'

		},
		data: formData,
		method: 'post',
		
	})
}


export function getBannerInfo(formData) {
	return request({
		url: '/mobile/bannerInfo/getBannerInfo',
		data: formData,
		method: 'post',
		
	})
}
export function readMessageNum() {
	return request({
		url: '/mobile/messageApi/readMessageNum',
		//data: formData,
		method: 'post',
		
	})
}

export function getScreenList(formData) {
	return request({
		url: '/mobile/recruitmentApi/getScreenList',
		data: formData,
		method: 'post',
		
	})
}

//字典表
export function getData(id) {
	return request({
		url: '/sys/dataDictionary/queryChildrenApi',
		data: {
			parentId:id
		},
		method: 'post',
		timeout: 60000,
	})
}
//上传图片
export function upload(formData) {
	return request({
		url: '/mobile/jobUserApi/upload',
		data: formData,
		method: 'post',
		
	})
}

//上传图片
export function uploadBase64(formData) {
	var localData = formData.photoFile?formData.photoFile:formData.photoBase64Data;
	
	if (localData.indexOf('data:image') != 0) {
	    //判断是否有这样的头部
	    localData = 'data:image/jpeg;base64,' + localData
	}
	formData.photoBase64Data = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
	
	
	return request({
		url: '/mobile/jobUserApi/uploadBase64',
		data: formData,
		method: 'post',
		timeout: 60000,
	})
}

