From 5a293a8677bae448a5dcd10287168bbda2ff306a Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 3 Feb 2023 11:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E6=B3=A8=E5=86=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.js | 16 +--- pages/home/register.vue | 96 +++++++++++++++++-- .../d-form/components/d-form/d-form.vue | 14 +-- 3 files changed, 99 insertions(+), 27 deletions(-) diff --git a/common/request.js b/common/request.js index ceff001..a741024 100644 --- a/common/request.js +++ b/common/request.js @@ -3,22 +3,15 @@ import store from "@/store" export function host(host='default',suffix='/plant_manage'){ var url=process.env.NODE_ENV === 'development'?{ // default:`http://wmyrzw.natappfree.cc` //陈 - default:`http://d996zw.natappfree.cc/` //马 + default:`http://czixnn.natappfree.cc` //马 + // default:`http://192.168.0.116:8080` //孙 }:{ - default:`http://qv6mj8.natappfree.cc` + default:`` } return ({ default:`${url.default}${suffix}`, imgUrl:`${url.default}/plant_manage/sys/common/static` })[host] - // return( - // process.env.NODE_ENV === 'development'?{ - // default:`http://10.0.0.217${suffix}` //陈 - // // default:`http://6h8nxd.natappfree.cc${suffix}` //马 - // }:{ - // default:`http://qv6mj8.natappfree.cc${suffix}` - // } - // )[host] } @@ -41,6 +34,7 @@ const request=async function(url,param={}){ } if(param.file||param.filePath){ + console.log(param.suffix,'---suffix----') var res=await uni.uploadFile({ url:`${param.host||host(undefined,param.suffix)}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, file:param.file||{}, @@ -52,7 +46,7 @@ const request=async function(url,param={}){ }).then(data=>({...data[1],data:JSON.parse(data[1].data)})) }else{ var res=await uni.request({ - url:`${param.host||host()}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, + url:`${param.host||host(undefined,param.suffix)}${('/'+url).replace(/\/{2}/,'/').replace(/\?.+/,"")}?${pathData}`, method:param.method||"get", data:param.body, timeout:30*1000, diff --git a/pages/home/register.vue b/pages/home/register.vue index 7951da7..a1513ba 100644 --- a/pages/home/register.vue +++ b/pages/home/register.vue @@ -22,30 +22,106 @@ \ No newline at end of file diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index 2f25b95..968648c 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -147,10 +147,12 @@ color:#FBA83C; } &/deep/ { - .u-form-item__body__left__content{ - .u-form-item__body__left__content__required{ - position:initial; - margin-right:4rpx; + .u-form-item__body__left{ + .u-form-item__body__left__content{ + .u-form-item__body__left__content__required{ + position:initial; + margin-right:4rpx; + } } } .u-form-item__body__right__message{ @@ -183,7 +185,7 @@