From 7ce4893b6727e97f6ad5bcbae494b5faf47b7235 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Wed, 14 May 2025 23:00:44 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除petInfo.vue中图片的width属性 - 调整workbenchManage的容器样式和swiper指示器样式 - 为train.vue的头部添加z-index - 更新getUrl.js中的开发环境API地址 - 注释掉systemOrder.vue中的跳转逻辑 - 在connectAddress/detail.vue中增加接单范围验证 - 在serve/upload.vue中添加表单验证逻辑和错误提示 - 调整workbenchManage/index.vue中的swiper样式和认证逻辑 --- .../authentication/connectAddress/detail.vue | 13 +++++- otherPages/authentication/examination/train.vue | 2 +- otherPages/authentication/serve/upload.vue | 47 ++++++++++++++++++++-- otherPages/userManage/pet/petInfo.vue | 2 +- pages/myOrdersManage/components/systemOrder.vue | 6 +-- pages/workbenchManage/index.scss | 4 +- pages/workbenchManage/index.vue | 36 ++++++++++++----- utils/getUrl.js | 4 +- 8 files changed, 90 insertions(+), 24 deletions(-) diff --git a/otherPages/authentication/connectAddress/detail.vue b/otherPages/authentication/connectAddress/detail.vue index 154b76a..1a16534 100644 --- a/otherPages/authentication/connectAddress/detail.vue +++ b/otherPages/authentication/connectAddress/detail.vue @@ -31,7 +31,7 @@ - + @@ -105,7 +105,7 @@ longitude: null, address: null, status: true, - distance: null, + rangeNo: null, disabledDate: [], }) @@ -163,6 +163,15 @@ } const onSave = async () => { + // 验证接单范围是否在3-15公里之间 + if (form.value.rangeNo < 3 || form.value.rangeNo > 15) { + uni.showToast({ + title: '接单范围必须在3-15公里之间', + icon: 'none' + }) + return + } + let code = null; if (eidtItem?.value?.id) { let result = await udpateAddress({ diff --git a/otherPages/authentication/examination/train.vue b/otherPages/authentication/examination/train.vue index b0f8a98..7a82547 100644 --- a/otherPages/authentication/examination/train.vue +++ b/otherPages/authentication/examination/train.vue @@ -106,7 +106,7 @@ onShow(() => { position: sticky; top: 0; background-image: linear-gradient(180deg, #FFBF60 0, #ffbf60 2%, #ffbf60 8%, #f2f2f2 90%); - + z-index: 99; .progress { margin-top: 19rpx; } diff --git a/otherPages/authentication/serve/upload.vue b/otherPages/authentication/serve/upload.vue index 72b369e..81bfb32 100644 --- a/otherPages/authentication/serve/upload.vue +++ b/otherPages/authentication/serve/upload.vue @@ -4,6 +4,8 @@ + + 注意:这段内容将会在您的喂养员个人主页,做为"服务案例”展示,并开放给其他铲屎官查看,请认真编辑哟! @@ -198,7 +200,6 @@ const onSave = async () => { try { - const { serviceType, serviceTime, @@ -207,6 +208,42 @@ fileList, } = form + // 表单验证 + if (!serviceType || serviceType.length === 0) { + return uni.showToast({ + title: '请选择服务类型', + icon: 'none' + }) + } + + if (!serviceTime) { + return uni.showToast({ + title: '请选择服务时间', + icon: 'none' + }) + } + + if (!serviceSpot) { + return uni.showToast({ + title: '请选择服务地点', + icon: 'none' + }) + } + + if (!text) { + return uni.showToast({ + title: '请输入服务描述', + icon: 'none' + }) + } + + if (!fileList || fileList.length === 0) { + return uni.showToast({ + title: '请上传服务图片', + icon: 'none' + }) + } + const data = { userId: store.getters.userInfo.userId, serviceType: serviceType.join(','), @@ -232,7 +269,10 @@ uni.navigateBack() }, 1000) } catch (err) { - + uni.showToast({ + title: '提交失败,请重试', + icon: 'none' + }) } } @@ -264,7 +304,8 @@ .tips { padding: 8rpx 16rpx; - background-color: rgb(255, 250, 242); + background-color: #FFFAF2; + color: #FFBF60; } .li { diff --git a/otherPages/userManage/pet/petInfo.vue b/otherPages/userManage/pet/petInfo.vue index 86899f0..078ce0f 100644 --- a/otherPages/userManage/pet/petInfo.vue +++ b/otherPages/userManage/pet/petInfo.vue @@ -399,10 +399,10 @@ } .personal-pet-img { - width: 100%; height: 118px; background-color: #fff; padding: 10px 20px; + } .personal-pet-basic-info { diff --git a/pages/myOrdersManage/components/systemOrder.vue b/pages/myOrdersManage/components/systemOrder.vue index c36b2c8..71945ed 100644 --- a/pages/myOrdersManage/components/systemOrder.vue +++ b/pages/myOrdersManage/components/systemOrder.vue @@ -114,9 +114,9 @@ import PetServicePopup from './petServicePopup.vue'; // 跳转订单详情 const toOrderDetail = (id) => { - uni.navigateTo({ - url: `/otherPages/orderTakingManage/detail/index?id=${id}&type=my` - }); + // uni.navigateTo({ + // url: `/otherPages/orderTakingManage/detail/index?id=${id}&type=my` + // }); } // 显示服务时间弹窗 diff --git a/pages/workbenchManage/index.scss b/pages/workbenchManage/index.scss index 76df674..87f814e 100644 --- a/pages/workbenchManage/index.scss +++ b/pages/workbenchManage/index.scss @@ -3,7 +3,9 @@ } .container{ padding: 0 20rpx 20rpx; - margin-top: 20rpx; + margin-top: 28rpx; + position: relative; + z-index: 9; &-list{ padding: 26rpx 20rpx; background: #FFFFFF; diff --git a/pages/workbenchManage/index.vue b/pages/workbenchManage/index.vue index 4af49d5..f60e25c 100644 --- a/pages/workbenchManage/index.vue +++ b/pages/workbenchManage/index.vue @@ -1,7 +1,15 @@