From 8dd2ee59f540c9c10c38c603c0ec76113b04136e Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Mon, 28 Apr 2025 00:07:27 +0800
Subject: [PATCH] Merge branch 'master' of
http://175.178.51.79:3000/Augcl/pet-front
---
otherPages/authentication/examination/start.vue | 14 ++--
otherPages/authentication/list/index.vue | 75 +++++++++++++++++++---
otherPages/authentication/serve/index.vue | 11 +++-
otherPages/binding/withdrawal/index.vue | 4 +-
otherPages/myOrdersManage/withdrawal/index.vue | 4 +-
.../myUser/components/haveOrder.vue | 4 +-
otherPages/workbenchManage/myUser/index.vue | 2 +-
otherPages/workbenchManage/myWallet/index.scss | 2 +-
pages.json | 7 +-
.../myOrdersManage/components/petServicePopup.vue | 2 +-
pages/userManage/index.vue | 3 +-
11 files changed, 102 insertions(+), 26 deletions(-)
diff --git a/otherPages/authentication/examination/start.vue b/otherPages/authentication/examination/start.vue
index fc0915a..9b50dcd 100644
--- a/otherPages/authentication/examination/start.vue
+++ b/otherPages/authentication/examination/start.vue
@@ -6,7 +6,12 @@
您选择的宠物类型
-
+
+
+
@@ -46,7 +51,7 @@
const store = useStore()
- const petType = ref()
+ const petType = ref([])
const restTimes = ref()
const configList = computed(() => {
@@ -54,13 +59,14 @@
})
const petTypeImg = computed(() => {
- return store.getters.petTypeOptions.find(item => item.id == petType.value)?.image
+ return store.getters.petTypeOptions.
+ filter(item => petType.value.includes(item.id))
})
onLoad((option) => {
store.dispatch('fetchPetTypeOptions')
- petType.value = option.petType
+ petType.value = option.petType.split(',').map(n => parseInt(n))
// todo: fetch
restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0)
diff --git a/otherPages/authentication/list/index.vue b/otherPages/authentication/list/index.vue
index 688e56a..8b5e668 100644
--- a/otherPages/authentication/list/index.vue
+++ b/otherPages/authentication/list/index.vue
@@ -52,9 +52,9 @@
-
-
-
+
+
+
@@ -71,6 +71,8 @@
+
+
@@ -84,6 +86,7 @@
import dForm from "@/components/dForm/index.vue"
import stepProgress from '../components/stepProgress.vue';
+ import configPopup from '@/components/configPopup.vue'
const store = useStore()
@@ -209,7 +212,7 @@
licenseData.selected = license?.split?.(';').map(str => parseInt(str)) || []
licenseData.fileList = images?.split?.(';').map(url => ({ url })) || []
- petType.value = _petType
+ petType.value = _petType.split(',').map(n => parseInt(n))
} else {
formRef.value.setData({
phone: userTelephone,
@@ -251,12 +254,12 @@
licenseData.fileList.splice(event.index, 1);
};
- const petType = ref()
+ const petType = ref([])
const petTypeOptions = computed(() => {
return store.getters.petTypeOptions
})
const onSelectPetType = (type) => {
- petType.value = type
+ petType.value = petType.value.includes(type) ? petType.value.filter(n => n !== type) : [...petType.value, type]
}
const toNext = async () => {
@@ -280,7 +283,7 @@
phone,
experience,
isHave,
- petType: petType.value,
+ petType: petType.value.join(','),
}
if (isHave) {
@@ -290,6 +293,60 @@
data.images = fileList.map(item => item.url).join(';')
}
+ // 效验字段必填
+ const requiredFields = {
+ name: '姓名',
+ idCard: '身份证号',
+ age: '年龄',
+ phone: '手机号',
+ experience: '养宠经验'
+ }
+
+ for (const [field, label] of Object.entries(requiredFields)) {
+ if (!data[field]) {
+ uni.showToast({
+ title: `请填写${label}`,
+ icon: 'none'
+ })
+ return
+ }
+ }
+
+ // 性别需要单独判断,因为0是有效值(男性)
+ if (data.sex != 0 && data.sex != 1) {
+ uni.showToast({
+ title: '请选择性别',
+ icon: 'none'
+ })
+ return
+ }
+
+ if (petType.value.length === 0) {
+ uni.showToast({
+ title: '请选择宠物类型',
+ icon: 'none'
+ })
+ return
+ }
+
+ if (data.isHave === 1) {
+ if (licenseData.selected.length === 0) {
+ uni.showToast({
+ title: '请选择专业执照类型',
+ icon: 'none'
+ })
+ return
+ }
+
+ if (licenseData.fileList.length === 0) {
+ uni.showToast({
+ title: '请上传执照图片',
+ icon: 'none'
+ })
+ return
+ }
+ }
+
if (id.value) {
data.id = id.value
await udpateUser(data)
@@ -298,13 +355,15 @@
}
uni.navigateTo({
- url: `/otherPages/authentication/examination/start?petType=${petType.value}`
+ url: `/otherPages/authentication/examination/start?petType=${petType.value.join(',')}`
})
} catch (err) {
}
}
+ const configPopupRef = ref(null)
+
onLoad(() => {
fetchUserInfo()
store.dispatch('fetchPetTypeOptions')
diff --git a/otherPages/authentication/serve/index.vue b/otherPages/authentication/serve/index.vue
index 7fa111a..eb1cdfc 100644
--- a/otherPages/authentication/serve/index.vue
+++ b/otherPages/authentication/serve/index.vue
@@ -95,7 +95,11 @@
-
+
+
+
+
伴宠师查看服务酬劳、服务时长等规则
@@ -109,6 +113,8 @@
@click="submit">
保存
+
+
@@ -117,6 +123,7 @@
import { useStore } from 'vuex'
import { onShow } from '@dcloudio/uni-app'
import { ossUpload } from '@/utils/oss-upload/oss/index.js'
+ import configPopup from '@/components/configPopup.vue'
import popupTypeSelect from "./popupTypeSelect.vue";
import popupServeSelect from "./popupServeSelect.vue";
@@ -130,6 +137,8 @@
const store = useStore()
+ const configPopupRef = ref(null)
+
const configList = computed(() => {
return store.getters.configList
})
diff --git a/otherPages/binding/withdrawal/index.vue b/otherPages/binding/withdrawal/index.vue
index de6d514..af3bf09 100644
--- a/otherPages/binding/withdrawal/index.vue
+++ b/otherPages/binding/withdrawal/index.vue
@@ -94,9 +94,7 @@
title: '提现成功',
duration: 2000
})
- uni.navigateTo({
- url: "/otherPages/workbenchManage/myWallet/index"
- })
+ uni.navigateBack(-1)
}
})
diff --git a/otherPages/myOrdersManage/withdrawal/index.vue b/otherPages/myOrdersManage/withdrawal/index.vue
index 36fd5dc..de7ae90 100644
--- a/otherPages/myOrdersManage/withdrawal/index.vue
+++ b/otherPages/myOrdersManage/withdrawal/index.vue
@@ -90,9 +90,7 @@
title: '提现成功',
duration: 2000
})
- uni.switchTab({
- url: "/pages/userManage/index"
- })
+ uni.navigateBack(-1)
}
}
diff --git a/otherPages/workbenchManage/myUser/components/haveOrder.vue b/otherPages/workbenchManage/myUser/components/haveOrder.vue
index 68c7a43..ae9356d 100644
--- a/otherPages/workbenchManage/myUser/components/haveOrder.vue
+++ b/otherPages/workbenchManage/myUser/components/haveOrder.vue
@@ -34,7 +34,7 @@
累计消费金额
- ¥ {{ item.orderAmount.toFixed(2) }}
+ ¥ {{ item.orderAmount ? item.orderAmount.toFixed(2) : 0 }}
@@ -42,7 +42,7 @@
累计消报酬
- ¥ {{ item.accumulate_money }}
+ ¥ {{ item.accumulate_money || 0 }}
diff --git a/otherPages/workbenchManage/myUser/index.vue b/otherPages/workbenchManage/myUser/index.vue
index 49e5c00..e53d6fb 100644
--- a/otherPages/workbenchManage/myUser/index.vue
+++ b/otherPages/workbenchManage/myUser/index.vue
@@ -128,9 +128,9 @@ const state = reactive({
baseInfo: {}
})
onShow(() => {
- getList()
state.info = JSON.parse(uni.getStorageSync("baseInfo"))
getBaseInfo()
+ getList()
})
const getBaseInfo = () => {
diff --git a/otherPages/workbenchManage/myWallet/index.scss b/otherPages/workbenchManage/myWallet/index.scss
index 304583f..1883fe2 100644
--- a/otherPages/workbenchManage/myWallet/index.scss
+++ b/otherPages/workbenchManage/myWallet/index.scss
@@ -38,7 +38,7 @@
.bind-main {
position: absolute;
- top: 180rpx;
+ top: 220rpx;
width: 100vw;
&-content{
padding: 30rpx 20rpx;
diff --git a/pages.json b/pages.json
index d8bf9c4..f981a3d 100644
--- a/pages.json
+++ b/pages.json
@@ -222,7 +222,12 @@
"style": {
"navigationBarTitleText": "保证金退还"
}
- }, {
+ }, {
+ "path": "withdrawal/index",
+ "style": {
+ "navigationBarTitleText": "提现"
+ }
+ }, {
"path": "transaction/index",
"style": {
"navigationBarTitleText": "交易明细"
diff --git a/pages/myOrdersManage/components/petServicePopup.vue b/pages/myOrdersManage/components/petServicePopup.vue
index cd9f1fd..d777f10 100644
--- a/pages/myOrdersManage/components/petServicePopup.vue
+++ b/pages/myOrdersManage/components/petServicePopup.vue
@@ -29,7 +29,7 @@