|
|
@ -3,7 +3,7 @@ import store from "@/store" |
|
|
|
function host(host='default'){ |
|
|
|
return( |
|
|
|
process.env.NODE_ENV === 'development'?{ |
|
|
|
default:"http://vpep38.natappfree.cc/plant_manage" |
|
|
|
default:"http://tishia.natappfree.cc/plant_manage" |
|
|
|
}:{ |
|
|
|
default:"http://vtm3hk.natappfree.cc/plant_manage" |
|
|
|
} |
|
|
@ -33,7 +33,8 @@ const request=async function(url,param={}){ |
|
|
|
var res=await uni.uploadFile({ |
|
|
|
url:`${param.host||host()}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, |
|
|
|
files:param.file, |
|
|
|
name:"file", |
|
|
|
// name:"file",
|
|
|
|
formData:param.body||{}, |
|
|
|
timeout:param.timeout||60*1000, |
|
|
|
header, |
|
|
|
}).then(data=>({...data[1],data:JSON.parse(data[1].data)})) |
|
|
|