前端-胡立永 1 month ago
parent
commit
8dd2ee59f5
11 changed files with 102 additions and 26 deletions
  1. +10
    -4
      otherPages/authentication/examination/start.vue
  2. +67
    -8
      otherPages/authentication/list/index.vue
  3. +10
    -1
      otherPages/authentication/serve/index.vue
  4. +1
    -3
      otherPages/binding/withdrawal/index.vue
  5. +1
    -3
      otherPages/myOrdersManage/withdrawal/index.vue
  6. +2
    -2
      otherPages/workbenchManage/myUser/components/haveOrder.vue
  7. +1
    -1
      otherPages/workbenchManage/myUser/index.vue
  8. +1
    -1
      otherPages/workbenchManage/myWallet/index.scss
  9. +6
    -1
      pages.json
  10. +1
    -1
      pages/myOrdersManage/components/petServicePopup.vue
  11. +2
    -1
      pages/userManage/index.vue

+ 10
- 4
otherPages/authentication/examination/start.vue View File

@ -6,7 +6,12 @@
<view class="com-title size-32 fw700 flex-rowl"> <view class="com-title size-32 fw700 flex-rowl">
您选择的宠物类型 您选择的宠物类型
</view> </view>
<image class="mt32" :src="petTypeImg" mode="widthFix"></image>
<view>
<image class="mt32"
style="margin-right: 10rpx;"
v-for="(img, inde) in petTypeImg"
:src="img.image" mode="widthFix"></image>
</view>
</view> </view>
<view class="text po-r bg-fff"> <view class="text po-r bg-fff">
@ -46,7 +51,7 @@
const store = useStore() const store = useStore()
const petType = ref()
const petType = ref([])
const restTimes = ref() const restTimes = ref()
const configList = computed(() => { const configList = computed(() => {
@ -54,13 +59,14 @@
}) })
const petTypeImg = computed(() => { 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) => { onLoad((option) => {
store.dispatch('fetchPetTypeOptions') store.dispatch('fetchPetTypeOptions')
petType.value = option.petType
petType.value = option.petType.split(',').map(n => parseInt(n))
// todo: fetch // todo: fetch
restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0) restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0)


+ 67
- 8
otherPages/authentication/list/index.vue View File

@ -52,9 +52,9 @@
</view> </view>
<view class="flex-between wrap mt32"> <view class="flex-between wrap mt32">
<view class="type" v-for="item in petTypeOptions" :key="`petType-${item.id}`">
<image :src="item.imageNo" mode="widthFix" @click="onSelectPetType(item.id)"></image>
<template v-if="petType === item.id">
<view class="type" v-for="item in petTypeOptions" :key="`petType-${item.id}`" @click="onSelectPetType(item.id)">
<image :src="item.imageNo" mode="widthFix"></image>
<template v-if="petType.includes(item.id)">
<image class="active" :src="item.image" mode="widthFix"></image> <image class="active" :src="item.image" mode="widthFix"></image>
<view class="active-icon"> <view class="active-icon">
<up-icon name="checkmark-circle" color="#FFBF60" size="32rpx"></up-icon> <up-icon name="checkmark-circle" color="#FFBF60" size="32rpx"></up-icon>
@ -71,6 +71,8 @@
</view> </view>
</view> </view>
<configPopup ref="configPopupRef" />
</view> </view>
</template> </template>
@ -84,6 +86,7 @@
import dForm from "@/components/dForm/index.vue" import dForm from "@/components/dForm/index.vue"
import stepProgress from '../components/stepProgress.vue'; import stepProgress from '../components/stepProgress.vue';
import configPopup from '@/components/configPopup.vue'
const store = useStore() const store = useStore()
@ -209,7 +212,7 @@
licenseData.selected = license?.split?.(';').map(str => parseInt(str)) || [] licenseData.selected = license?.split?.(';').map(str => parseInt(str)) || []
licenseData.fileList = images?.split?.(';').map(url => ({ url })) || [] licenseData.fileList = images?.split?.(';').map(url => ({ url })) || []
petType.value = _petType
petType.value = _petType.split(',').map(n => parseInt(n))
} else { } else {
formRef.value.setData({ formRef.value.setData({
phone: userTelephone, phone: userTelephone,
@ -251,12 +254,12 @@
licenseData.fileList.splice(event.index, 1); licenseData.fileList.splice(event.index, 1);
}; };
const petType = ref()
const petType = ref([])
const petTypeOptions = computed(() => { const petTypeOptions = computed(() => {
return store.getters.petTypeOptions return store.getters.petTypeOptions
}) })
const onSelectPetType = (type) => { const onSelectPetType = (type) => {
petType.value = type
petType.value = petType.value.includes(type) ? petType.value.filter(n => n !== type) : [...petType.value, type]
} }
const toNext = async () => { const toNext = async () => {
@ -280,7 +283,7 @@
phone, phone,
experience, experience,
isHave, isHave,
petType: petType.value,
petType: petType.value.join(','),
} }
if (isHave) { if (isHave) {
@ -290,6 +293,60 @@
data.images = fileList.map(item => item.url).join(';') 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) { if (id.value) {
data.id = id.value data.id = id.value
await udpateUser(data) await udpateUser(data)
@ -298,13 +355,15 @@
} }
uni.navigateTo({ uni.navigateTo({
url: `/otherPages/authentication/examination/start?petType=${petType.value}`
url: `/otherPages/authentication/examination/start?petType=${petType.value.join(',')}`
}) })
} catch (err) { } catch (err) {
} }
} }
const configPopupRef = ref(null)
onLoad(() => { onLoad(() => {
fetchUserInfo() fetchUserInfo()
store.dispatch('fetchPetTypeOptions') store.dispatch('fetchPetTypeOptions')


+ 10
- 1
otherPages/authentication/serve/index.vue View File

@ -95,7 +95,11 @@
</view> </view>
</view> </view>
<view class="size-24 color-ffb flex-rowc mt32 pb28">
<!-- -->
<view class="size-24 color-ffb flex-rowc mt32 pb28"
@click="configPopupRef.open('serve_rule')">
伴宠师查看服务酬劳服务时长等规则 伴宠师查看服务酬劳服务时长等规则
</view> </view>
@ -109,6 +113,8 @@
@click="submit"> @click="submit">
保存 保存
</view> </view>
<configPopup ref="configPopupRef" />
</view> </view>
</template> </template>
@ -117,6 +123,7 @@
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { onShow } from '@dcloudio/uni-app' import { onShow } from '@dcloudio/uni-app'
import { ossUpload } from '@/utils/oss-upload/oss/index.js' import { ossUpload } from '@/utils/oss-upload/oss/index.js'
import configPopup from '@/components/configPopup.vue'
import popupTypeSelect from "./popupTypeSelect.vue"; import popupTypeSelect from "./popupTypeSelect.vue";
import popupServeSelect from "./popupServeSelect.vue"; import popupServeSelect from "./popupServeSelect.vue";
@ -130,6 +137,8 @@
const store = useStore() const store = useStore()
const configPopupRef = ref(null)
const configList = computed(() => { const configList = computed(() => {
return store.getters.configList return store.getters.configList
}) })


+ 1
- 3
otherPages/binding/withdrawal/index.vue View File

@ -94,9 +94,7 @@
title: '提现成功', title: '提现成功',
duration: 2000 duration: 2000
}) })
uni.navigateTo({
url: "/otherPages/workbenchManage/myWallet/index"
})
uni.navigateBack(-1)
} }
}) })


+ 1
- 3
otherPages/myOrdersManage/withdrawal/index.vue View File

@ -90,9 +90,7 @@
title: '提现成功', title: '提现成功',
duration: 2000 duration: 2000
}) })
uni.switchTab({
url: "/pages/userManage/index"
})
uni.navigateBack(-1)
} }
} }
</script> </script>


+ 2
- 2
otherPages/workbenchManage/myUser/components/haveOrder.vue View File

@ -34,7 +34,7 @@
累计消费金额 累计消费金额
</view> </view>
<view > <view >
{{ item.orderAmount.toFixed(2) }}
{{ item.orderAmount ? item.orderAmount.toFixed(2) : 0 }}
</view> </view>
</view> </view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow"> <view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
@ -42,7 +42,7 @@
累计消报酬 累计消报酬
</view> </view>
<view > <view >
{{ item.accumulate_money }}
{{ item.accumulate_money || 0 }}
</view> </view>
</view> </view>
</view> </view>


+ 1
- 1
otherPages/workbenchManage/myUser/index.vue View File

@ -128,9 +128,9 @@ const state = reactive({
baseInfo: {} baseInfo: {}
}) })
onShow(() => { onShow(() => {
getList()
state.info = JSON.parse(uni.getStorageSync("baseInfo")) state.info = JSON.parse(uni.getStorageSync("baseInfo"))
getBaseInfo() getBaseInfo()
getList()
}) })
const getBaseInfo = () => { const getBaseInfo = () => {


+ 1
- 1
otherPages/workbenchManage/myWallet/index.scss View File

@ -38,7 +38,7 @@
.bind-main { .bind-main {
position: absolute; position: absolute;
top: 180rpx;
top: 220rpx;
width: 100vw; width: 100vw;
&-content{ &-content{
padding: 30rpx 20rpx; padding: 30rpx 20rpx;


+ 6
- 1
pages.json View File

@ -222,7 +222,12 @@
"style": { "style": {
"navigationBarTitleText": "保证金退还" "navigationBarTitleText": "保证金退还"
} }
}, {
}, {
"path": "withdrawal/index",
"style": {
"navigationBarTitleText": "提现"
}
}, {
"path": "transaction/index", "path": "transaction/index",
"style": { "style": {
"navigationBarTitleText": "交易明细" "navigationBarTitleText": "交易明细"


+ 1
- 1
pages/myOrdersManage/components/petServicePopup.vue View File

@ -29,7 +29,7 @@
<view class="service-footer"> <view class="service-footer">
<up-button <up-button
type="primary" type="primary"
text="打卡"
text="查看记录"
@click="handleClock(service)" @click="handleClock(service)"
shape="circle" shape="circle"
size="mini" size="mini"


+ 2
- 1
pages/userManage/index.vue View File

@ -307,7 +307,8 @@
// //
const toWithdrawDeposit = () => { const toWithdrawDeposit = () => {
uni.navigateTo({ uni.navigateTo({
url: "/otherPages/myOrdersManage/withdrawal/index"
url: "/otherPages/binding/withdrawal/index"
// url: "/otherPages/myOrdersManage/withdrawal/index"
}) })
} }


Loading…
Cancel
Save