From 39e54acbd533d887c58b030ba6f850825f44b581 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Thu, 17 Apr 2025 23:53:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor(authentication):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E8=A1=A8=E5=8D=95=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=92=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除认证页面中不再使用的表单字段(如昵称、性别、个人简介等)及相关样式,简化代码结构,提高可维护性。 --- otherPages/authentication/serve/index.vue | 129 +----------------------------- 1 file changed, 3 insertions(+), 126 deletions(-) diff --git a/otherPages/authentication/serve/index.vue b/otherPages/authentication/serve/index.vue index 4d1f6a7..b7c9502 100644 --- a/otherPages/authentication/serve/index.vue +++ b/otherPages/authentication/serve/index.vue @@ -24,27 +24,7 @@ - - 昵称 - - - - - - - 手机号 - - {{baseInfo.info.userTelephone || ''}} - - - - - 性别 - - {{form.gender || '请选择'}} - - - + @@ -54,28 +34,6 @@ (重要) - - 个人简介 - - - - - - - 养宠经验 - - - - - - - - 服务记录 - - {{ `${serviceCount}条` }} - - - @@ -84,28 +42,6 @@ 服务资料 - - 服务宠物类型 - - {{ typeDesc }} - - - - - - 基础服务 - - 宠物喂养 上门遛狗 - - - - - 增值服务 - - {{ serveDesc }} - - - @@ -152,10 +88,6 @@ const form = reactive({ headImage: null, - nickname: '', - gender: '', - introduction: '', - petExperience: '', type: [], serve: [], }) @@ -236,42 +168,7 @@ }) } - const genderOptions = [ - { text: '男', value: '男' }, - { text: '女', value: '女' } - ] - - const openGenderSelect = () => { - uni.showActionSheet({ - itemList: genderOptions.map(item => item.text), - success: function (res) { - form.gender = genderOptions[res.tapIndex].value - fetchUpdate() - } - }) - } - - const fetchUpdate = () => { - // 这里可以添加更新数据的逻辑 - console.log('更新数据', form) - } - function submit(){ - // 表单验证 - if (!form.nickname) { - uni.showToast({ - title: '请输入昵称', - icon: 'none' - }) - return - } - - // 提交表单数据 - console.log('提交表单数据', form) - uni.showToast({ - title: '保存成功', - icon: 'success' - }) } onShow(() => { @@ -283,11 +180,8 @@ onMounted(()=> { // todo: fetch data and init data - // 初始化表单数据 - if (baseInfo.value && baseInfo.value.info) { - form.nickname = baseInfo.value.info.userName || '' - form.gender = baseInfo.value.info.gender || '' - } + + serveInfoRef.value.setDataByKey('base', configList.value.pet_basic_services.paramValueText) }) @@ -308,26 +202,9 @@ align-items: center; } - .flex-rowb { - display: flex; - justify-content: space-between; - align-items: center; - padding: 20rpx 0; - } - .ml10 { margin-left: 10rpx; } - - .input-right { - text-align: right; - } - - .textarea-full { - width: 100%; - min-height: 120rpx; - text-align: right; - } } .page {