diff --git a/common/request.js b/common/request.js index b56a794..62b81ef 100644 --- a/common/request.js +++ b/common/request.js @@ -3,7 +3,7 @@ import store from "@/store" export function host(host='default',suffix='/plant_manage'){ return( process.env.NODE_ENV === 'development'?{ - default:`http://qv6mj8.natappfree.cc${suffix}` + default:`http://m3df6f.natappfree.cc${suffix}` }:{ default:`http://qv6mj8.natappfree.cc${suffix}` } @@ -29,10 +29,11 @@ const request=async function(url,param={}){ "X-Access-Token":store.getters.token, } - if(param.file){ + if(param.file||param.filePath){ var res=await uni.uploadFile({ url:`${param.host||host()}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, - file:param.file, + file:param.file||{}, + filePath:param.filePath||"", name:"file", formData:param.body||{}, timeout:param.timeout||60*1000, diff --git a/components/form.vue b/components/form.vue index 250deb0..b297672 100644 --- a/components/form.vue +++ b/components/form.vue @@ -141,25 +141,25 @@ - + {{suffix}} - {{/^\d+$/.test(value)&&columns[0][value][keyName]||placeholder||`请选择${label}`}} + {{/^\d+$/.test(value)&&columns[0][value].label||placeholder||`请选择${label}`}} 添加照片 -