diff --git a/common/request.js b/common/request.js index 8da988c..f25c4b0 100644 --- a/common/request.js +++ b/common/request.js @@ -3,7 +3,7 @@ import store from "@/store" function host(host='default'){ return( process.env.NODE_ENV === 'development'?{ - default:"http://tishia.natappfree.cc/plant_manage" + default:"http://qv6mj8.natappfree.cc/plant_manage" }:{ default:"http://vtm3hk.natappfree.cc/plant_manage" } @@ -32,8 +32,8 @@ const request=async function(url,param={}){ if(param.file){ var res=await uni.uploadFile({ url:`${param.host||host()}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, - files:param.file, - // name:"file", + file:param.file, + name:"file", formData:param.body||{}, timeout:param.timeout||60*1000, header, diff --git a/components/form.vue b/components/form.vue index e99ad1b..f556940 100644 --- a/components/form.vue +++ b/components/form.vue @@ -48,18 +48,27 @@ color:rgb(48,49,51); } } - .upImg{ - width:100%; + .u-upload{ background:#F7F7F7; border-radius: 8rpx; padding:20rpx; min-height:260rpx; margin-top:14rpx; - display:flex; - flex-wrap: wrap; - &>.album{ + align-content: flex-start; + &/deep/ .u-upload__wrap__preview{ + border-radius: 10rpx; + &>.u-upload__wrap__preview__image{ + height:170rpx!important; + width:170rpx!important; + } + &>.u-upload__deletable{ + width:30rpx; + height:30rpx; + } + } + .album{ background:#fff; - border-radius: 24rpx; + border-radius: 20rpx; width:170rpx; height:170rpx; text{ @@ -122,7 +131,7 @@ font-size:20rpx; color:#FBA83C; } - &/deep/>.u-form-item__body__right__message{ + &/deep/ .u-form-item__body__right__message{ margin-left:0!important; } } @@ -138,11 +147,11 @@ {{/^\d+$/.test(value)&&columns[0][value][keyName]||placeholder||`请选择${label}`}} - - + + 添加照片 - +