import Request from '../common/request.js';
let request = new Request().http


 export function uploadOSS(data) {
 	 return request('/store/app/common/uploadOSS',data,'POST');
 }
 export function getTlsSig(data) {
 	 return request('/store/app/common/getTlsSig',data,'GET');
 }
 
 export function getStoreConfig() {
  	 return request('/store/app/common/getStoreConfig',null,'GET');
 } 
 
 export function getProductConfig() {
  	 return request('/store/app/common/getProductConfig',null,'GET');
 } 
 
 export function getWeixinTemps() {
 	 return request('/store/app/common/getWeixinTemps',null,'GET');
 }
 export function getWeixinOrderTemps() {
 	 return request('/store/app/common/getWeixinOrderTemps',null,'GET');
 }
 export function getWeixinPrescribeTemps() {
 	 return request('/store/app/common/getWeixinPrescribeTemps',null,'GET');
 }
 
 
 export function getDictByKey(data) {
  	 return request('/store/app/common/getDictByKey',data,'GET');
 } 
 
 // 获取任务类型列表
 export function getTaskTypeList(data) {
 	return request('/app/common/getTaskTypeData', data, 'POST', 'application/json;charset=UTF-8');
 }
//删除
export function deleteFile(id) {
 	return request('/app/upload/' + id, null, 'DELETE');
} 
//批量删除
export function deleteBatch(array) {
 	return request('/app/upload/batch', array, 'DELETE', 'application/json;charset=UTF-8');
} 
//秒传检查
export function checkFast(data) {
 	return request('/app/upload/check-fast', data, 'GET');
} 
//上传完成回调
export function complete(data) {
	return request('/app/upload/complete', data, 'POST', 'application/json;charset=UTF-8');
}
//查询文件列表
export function fileList(data) {
 	return request('/app/upload/list', data, 'GET');
} 
//获取COS临时密钥
export function stsToken(data) {
 	return request('/app/upload/sts-token', data, 'GET');
}
//获取微信云开发access_token
export function getAccessToken(data) {
 	return request('/app/upload/access-token', data, 'GET');
}

//获取policy 签名
export function postPolicy(data) {
 	return request('/app/upload/post-policy', data, 'GET');
}