Browse Source

对接接单大厅

pull/9/head
longjieli 2 months ago
parent
commit
64fa0991c4
21 changed files with 1428 additions and 129 deletions
  1. +4
    -4
      api/amount/index.js
  2. +61
    -1
      api/pet/index.js
  3. +6
    -0
      otherPages/myOrdersManage/bond/index.vue
  4. +24
    -13
      otherPages/myOrdersManage/transaction/index.vue
  5. +19
    -7
      otherPages/myOrdersManage/withdrawal/index.vue
  6. +10
    -4
      otherPages/orderTakingManage/detail/index.vue
  7. +38
    -17
      otherPages/orderTakingManage/pet/detail.vue
  8. +6
    -6
      otherPages/orderTakingManage/pet/index.vue
  9. +300
    -0
      otherPages/userManage/pet/components/petBaseInfo.vue
  10. +226
    -0
      otherPages/userManage/pet/components/petHealthInfo.vue
  11. +190
    -31
      otherPages/userManage/pet/index.vue
  12. +447
    -0
      otherPages/userManage/pet/petInfo.vue
  13. +6
    -0
      pages.json
  14. +14
    -21
      pages/myOrdersManage/components/systemOrder.vue
  15. +3
    -4
      pages/myOrdersManage/index.vue
  16. +6
    -2
      pages/orderTakingManage/components/list.vue
  17. +5
    -1
      pages/orderTakingManage/index.vue
  18. +10
    -0
      pages/userManage/index.scss
  19. +39
    -18
      pages/userManage/index.vue
  20. +6
    -0
      static/images/sex/boy.svg
  21. +8
    -0
      static/images/sex/girl.svg

+ 4
- 4
api/amount/index.js View File

@ -26,13 +26,13 @@ export const cashIn = (data) => {
}
// 小程序-提现
export const cashOut = (params) => {
export const cashOut = (data) => {
return request({
url: '/app',
url: '/applet/amount/cashOut',
headers: {
isToken: true
},
method: "get",
params
method: "post",
data
})
}

+ 61
- 1
api/pet/index.js View File

@ -1,7 +1,7 @@
import request from '@/utils/request'
// 查询我的宠物列表
export function petList() {
export function getpetList() {
return request({
headers: {
"isToken": true
@ -10,3 +10,63 @@ export function petList() {
method: 'get'
})
}
// 根据宠物标识查询宠物信息
export function getByPetId(params) {
return request({
headers: {
"isToken": true
},
url: "/applet/pet/getByPetId",
method: 'get',
params
})
}
// 根据宠物标识删除宠物信息
export function delByPetId(params) {
return request({
headers: {
"isToken": true
},
url: "/applet/pet/getByPetId",
method: 'get',
params
})
}
// 新增宠物信息
export function addPet(data) {
return request({
headers: {
"isToken": true
},
url: "/applet/pet/getByPetId",
method: 'post',
data
})
}
// 更新宠物信息
export function updatePet(data) {
return request({
headers: {
"isToken": true
},
url: "/applet/pet/getByPetId",
method: 'post',
data
})
}
// 获取宠物详情
export function getPetDetails(params) {
return request({
headers: {
"isToken": true
},
url: "/applet/pet/getByPetId",
method: 'get',
params
})
}

+ 6
- 0
otherPages/myOrdersManage/bond/index.vue View File

@ -83,6 +83,12 @@
type: 1,
userId: userInfo.value.userId
})
if (response.code == 200) {
uni.showToast({
title: response.msg,
icon: "none"
})
}
}
</script>


+ 24
- 13
otherPages/myOrdersManage/transaction/index.vue View File

@ -2,14 +2,16 @@
<!-- <div>交易明细</div> -->
<view class="box">
<view class="top flex" :style="{ borderRadius: '31.5rpx' }">
<view class="income flex element" :style="{ borderRadius: '31.5rpx' }">
<view @click="changeTab(0)" :class="{ active : type == 0 }" class="income flex element"
:style="{ borderRadius: '31.5rpx' }">
收入明细
</view>
<view class="income flex element" :style="{ borderRadius: '31.5rpx' }">
<view @click="changeTab(1)" :class="{ active : type == 1 }" class="income flex element"
:style="{ borderRadius: '31.5rpx' }">
支出明细
</view>
</view>
<view v-for="(item,index) in list" :key="index" class="Recharge flex">
<view class="flex">
<image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500"
@ -31,28 +33,38 @@
</template>
<script setup>
import { ref } from "vue"
import { amountLogList } from "@/api/amount/index.js"
import {
ref
} from "vue"
import {
amountLogList
} from "@/api/amount/index.js"
import {
onShow
} from "@dcloudio/uni-app"
onShow(() => {
getRunningWater()
})
const list = ref([]);
const type = ref(0);
//
const getRunningWater = async () => {
let response = await amountLogList({
type : 1
type: type.value
});
if(response.code == 200) {
if (response.code == 200) {
list.value = response.data
}
}
const changeTab = (index) => {
type.value = index;
getRunningWater();
}
</script>
<style scoped lang="scss">
@ -70,8 +82,7 @@
background-color: #F3F3F3;
}
.element:hover {
.active {
background-color: #FFBF60;
color: white;
}


+ 19
- 7
otherPages/myOrdersManage/withdrawal/index.vue View File

@ -35,11 +35,17 @@
<script setup>
import {
reactive, ref , computed
reactive,
ref,
computed
} from "vue";
import DForm from "@/components/dForm/index.vue"
import { cashOut } from "@/api/amount/index.js"
import { useStore } from "vuex"
import {
cashOut
} from "@/api/amount/index.js"
import {
useStore
} from "vuex"
const state = reactive({
list: [{
@ -53,11 +59,11 @@
return store.getters.userInfo
})
const form = ref({
amount : ''
amount: ''
})
const handleSubmit = async (val) => {
if(!form.value.amount) {
if (!form.value.amount) {
return uni.showToast({
title: '请填写提现金额',
icon: "none"
@ -65,9 +71,15 @@
}
let response = await cashOut({
...form.value,
type : 0,
userId : userInfo.value.userId
type: 0,
userId: userInfo.value.userId
})
if (response.code == 200) {
uni.showToast({
title: response.msg,
icon: "none"
})
}
}
</script>


+ 10
- 4
otherPages/orderTakingManage/detail/index.vue View File

@ -221,18 +221,21 @@
<!-- 抢单成功 -->
<up-popup :show="showOrderSuccess" mode="center" @close="orderSuccessClose" @open="orderSuccessOpen" :zIndex="999"
:round="10" :safeAreaInsetBottom="false" :customStyle="{padding:'40rpx 20rpx',width:'80%'}">
:round="10" :safeAreaInsetBottom="false" :customStyle="{ width:'80%' , 'background-color': 'transparent' }">
<view>
<image style="width: 100%;" :src="configList?.order_success?.paramValueImage" mode="widthFix"></image>
</view>
<view style="margin-top: -100%;padding: 40rpx;20rpx">
<view class="success-desc">
请立即添加服务顾问并提供订单编码
{{ configList?.order_success?.paramValueText || '请立即添加服务顾问,并提供订单编码' }}
</view>
<view class="qr-code">
<view style="position: relative;z-index: 999;" class="qr-code">
<image class="code-img" src="https://img.xjishu.com/img/zl/2018/6/30/1241359458913.gif"
mode="aspectFill"></image>
</view>
<view class="input">
<up-input placeholder="" border="none" v-model="value" disabled
:customStyle="{height:'60rpx','text-indent': '20rem'}"></up-input>
:customStyle="{height:'60rpx','text-indent': '20rem', 'background-color': '#F3F3F3', position : 'relative','z-index' : '999' }"></up-input>
</view>
<up-button @click="noneOrder" color="#FFBF60" text="复制订单编号" shape="circle"></up-button>
</view>
@ -278,6 +281,9 @@
const userInfo = computed(() => {
return store.getters.userInfo
})
const configList = computed(() => {
return store.getters.configList;
})
//
const rushToBuyAnOrder = () => {


+ 38
- 17
otherPages/orderTakingManage/pet/detail.vue View File

@ -6,9 +6,8 @@
宠物头像
</view>
<view class="img">
<image
src="https://k.sinaimg.cn/n/sinakd20118/751/w690h861/20240406/8eda-d4d56e3bface126bd5806ff981a09314.jpg/w700d1q75cms.jpg"
mode="" style="width: 157rpx;height: 157rpx;" :style="{borderRadius:'100rpx'}"></image>
<image :src="petInfo.headImage" mode="" style="width: 157rpx;height: 157rpx;"
:style="{borderRadius:'100rpx'}"></image>
<!-- <view class="">
点击更换头像
<view class="top_item">
@ -27,7 +26,7 @@
昵称
<!-- <input type="text" placeholder="请输入宠物名字" /> -->
<view class="item_">
小咪
{{ petInfo.nickName }}
</view>
</view>
<view class="line1">
@ -39,7 +38,7 @@
<up-button @click="show = true">请选择</up-button>
</view> -->
<view class="item_">
女生
{{ petInfo.sex == 0 ? '男' : '女' }}
</view>
</view>
<view class="line1">
@ -47,7 +46,7 @@
<view class="level name box-size pad_4">
品种
<view class="item_">
中华田园猫
{{ petInfo.type }}
</view>
</view>
<view class="line1">
@ -55,7 +54,7 @@
<view class="level name box-size pad_4">
出生年月
<view class="item_">
2022.12
{{ petInfo.birthday }}
</view>
</view>
<view class="line1">
@ -63,7 +62,7 @@
<view class="level name box-size pad_4">
体重
<view class="item_">
中型(10~20KG)
{{ petInfo.weight }}
</view>
</view>
<view class="line1">
@ -71,7 +70,7 @@
<view class="level name box-size pad_4">
性格
<view class="item_">
活泼开朗比较顽皮对陌生人警惕性高
{{ petInfo.personality }}
</view>
</view>
</view>
@ -136,15 +135,37 @@
</template>
<script setup>
// import {
// ref,
// reactive
// } from 'vue';
import {
ref
} from "vue"
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
getByPetId
} from "@/api/pet/index.js"
// const show = ref(false);
// const columns = reactive([
// ['', '']
// ]);
onLoad((options) => {
petId.value = options.id || null;
});
onShow(() => {
getPetDetail()
})
const petId = ref(null);
const petInfo = ref({})
const getPetDetail = async () => {
if (!petId.value) return;
let response = await getByPetId({
id: petId.value
})
if (response.code == 200 && response.data) {
petInfo.value = response.data;
}
}
</script>
<style lang="scss">


+ 6
- 6
otherPages/orderTakingManage/pet/index.vue View File

@ -14,7 +14,7 @@
{{ item.nickName }}
</view>
<view class="personal-pet-sex">
<img :src="item.sex === 0 ? '../../static/images/details/boy.svg' : '../../static/images/details/girl.svg'"
<img :src="item.sex === 0 ? '../static/images/sex/boy.svg' : '@/static/images/sex/girl.svg'"
alt="sex" style="width: 16px;height: 16px;" />
</view>
</view>
@ -35,7 +35,7 @@
性格 {{ item.personality }}
</view>
<view class="view-pets">
<view @click="toDetail" class="btn">
<view @click="toDetail(item.id)" class="btn">
查看详细信息
</view>
</view>
@ -56,7 +56,7 @@
onMounted
} from 'vue';
import {
petList
getpetList
} from "@/api/pet/index.js";
import {
onShow,
@ -71,7 +71,7 @@
const getPetListData = async () => {
petLists.value = [];
try {
const res = await petList();
const res = await getpetList();
if (res && res.data) {
petLists.value = res.data;
}
@ -93,9 +93,9 @@
getPetListData();
});
const toDetail = () => {
const toDetail = (id) => {
uni.navigateTo({
url: "/otherPages/orderTakingManage/pet/detail"
url: `/otherPages/orderTakingManage/pet/detail?id=${id}`
})
}
</script>


+ 300
- 0
otherPages/userManage/pet/components/petBaseInfo.vue View File

@ -0,0 +1,300 @@
<template>
<view class="">
<view class="personal-pet-basic-info">
<view class="personal-pet-info-title border-bottom">
宠物基本信息
</view>
<u--form labelPosition="left" :model="model" ref="uForm">
<u-form-item required label="昵称" :prop="`petBaseInfo.name`" labelWidth="80" borderBottom>
<u--input v-model="petBaseInfo.name" placeholder="请输入宠物昵称" @change="nameChange"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="性别" :prop="`petBaseInfo.gender`" labelWidth="80" borderBottom
@click="showSex = true">
<u--input v-model="petBaseInfo.gender" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="品种" :prop="`petBaseInfo.breed`" labelWidth="80" borderBottom
@click="breedSelectOpen">
<u--input v-model="petBaseInfo.breed" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="体重" :prop="`petBaseInfo.bodyType`" labelWidth="80" borderBottom
@click="showWeight = true" ref="item1">
<u--input v-model="petBaseInfo.bodyType" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item label="出生年月" :prop="`petBaseInfo.birthDate`" labelWidth="80" borderBottom
@click="yearMonthOpen">
<u--input v-model="petBaseInfo.birthDate" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="性格" :prop="`petBaseInfo.personality`" labelWidth="80" borderBottom
@click="dispositionSelectOpen">
<u--input v-model="petBaseInfo.personality" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
</u--form>
</view>
<view style="background-color: #fffcf2;padding: 10px 20px;" v-show="showDisposition">
<view style="height: 85%;">
<u-checkbox-group v-model="petBaseInfo.personality" @change="checkboxChange" iconPlacement="left"
placement="row" style="flex-wrap: wrap;" activeColor="#ffbf60">
<u-checkbox :customStyle="{margin: '8px'}" v-for="(item, index) in dispositionActions" :key="item"
:label="item" :name="item">
</u-checkbox>
</u-checkbox-group>
</view>
</view>
<u-picker :show="showSex" :showToolbar='false' :columns="sexActions" @cancel="showSex = false"
:immediateChange="true" @change="sexSelect"></u-picker>
<u-picker :show="showWeight" :showToolbar='false' :columns="weightActions" @cancel="showWeight = false"
:immediateChange="true" @change="weightSelect"></u-picker>
<u-overlay :show="showBreed">
<view class="breed-select" style="height: 60%;">
<u-search shape="round" :show-action="false" v-model="searchValue" @change="searchBreed"></u-search>
<view style="padding: 10px;height: 80%;overflow: auto;">
<u-radio-group v-model="tempBreed" placement="column">
<u-radio v-for="(item,index) in searchBreedData" :customStyle="{marginBottom: '8px'}"
activeColor="#ffbf60" :label="item" :name="item" :key="item"></u-radio>
</u-radio-group>
</view>
<view class="personal-pet-breed-btns">
<view class="personal-pet-breed-btn">
<u-button color="#FFF4E4" @click="breedSelectClose">
<view style="color: #FFF4E4;">
取消
</view>
</u-button>
</view>
<view class="personal-pet-breed-btn" @click="breedSelectConfirm">
<u-button color="#FFBF60">
<view style="color: #fff;">
确定
</view>
</u-button>
</view>
</view>
</view>
</u-overlay>
<u-datetime-picker :maxDate='getMaxDate()' :minDate="getMinDate()" :show="showBirthday" v-model="tempBirthday"
mode="year-month" @confirm="yearMonthConfirm" @cancel="yearMonthClose"></u-datetime-picker>
</view>
</template>
<script setup>
import {
ref,
onMounted,
watch
} from 'vue';
// props
const props = defineProps({
petType: {
type: String,
default: 'dog'
},
petBaseInfo: {
type: Object,
default: () => ({
name: '',
gender: '',
breed: '',
bodyType: '',
birthDate: '',
personality: ''
})
}
});
// emits
const emits = defineEmits(['update:petBaseInfo']);
//
const showSex = ref(false);
const showBreed = ref(false);
const showWeight = ref(false);
const showBirthday = ref(false);
const showDisposition = ref(false);
const sexActions = ref([
['男生', '女生']
]);
const weightActions = ref([
['小型(<10 KG)', '中型(10~20KG)', '大型(20KG以上)']
]);
const dispositionActions = ref([]);
const breedData = ref([]);
const searchBreedData = ref([]);
const tempBreed = ref('');
const searchValue = ref('');
const tempBirthday = ref('');
const tempDisposition = ref('');
const uForm = ref(null);
const item1 = ref(null);
//
const nameChange = () => {
updatePetBaseInfo();
};
const sexSelect = (e) => {
props.petBaseInfo.gender = e.value[0];
showSex.value = false;
updatePetBaseInfo();
};
const weightSelect = (e) => {
props.petBaseInfo.bodyType = e.value[0];
showWeight.value = false;
updatePetBaseInfo();
};
const breedSelectOpen = () => {
searchBreedData.value = breedData.value;
searchValue.value = '';
tempBreed.value = props.petBaseInfo.breed;
showBreed.value = true;
};
const searchBreed = () => {
if (searchValue.value && searchValue.value !== '') {
searchBreedData.value = breedData.value.filter(e => e.includes(searchValue.value));
} else {
searchBreedData.value = breedData.value;
}
};
const breedSelectClose = () => {
tempBreed.value = '';
showBreed.value = false;
};
const breedSelectConfirm = () => {
props.petBaseInfo.breed = tempBreed.value;
showBreed.value = false;
updatePetBaseInfo();
};
const yearMonthOpen = () => {
if (props.petBaseInfo.birthDate) {
tempBirthday.value = Number(new Date(props.petBaseInfo.birthDate));
} else {
tempBirthday.value = Number(new Date());
}
showBirthday.value = true;
};
const yearMonthClose = () => {
showBirthday.value = false;
};
const yearMonthConfirm = (e) => {
const timeFormat = uni.$u.timeFormat;
props.petBaseInfo.birthDate = timeFormat(e.value, 'yyyy-mm');
showBirthday.value = false;
updatePetBaseInfo();
};
const dispositionSelectOpen = () => {
tempDisposition.value = props.petBaseInfo.personality;
showDisposition.value = true;
};
const dispositionSelectClose = () => {
tempDisposition.value = '';
showDisposition.value = false;
};
const dispositionSelectConfirm = () => {
props.petBaseInfo.personality = tempDisposition.value;
showDisposition.value = false;
updatePetBaseInfo();
};
const checkboxChange = (n) => {
console.log('change', n);
updatePetBaseInfo();
};
const updatePetBaseInfo = () => {
// update petBaseInfo
emits('update:petBaseInfo', props.petBaseInfo);
};
const getPersonalityDataList = () => {
// getDictList('pet_personality').then(res => {
// if (res.code === 200) {
// dispositionActions.value = Array.from(new Set(res.data.map(e => e.dictLabel)));
// } else {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// }
// });
};
const getPetBreed = () => {
let petBreedType = props.petType === 'cat' ? 'pet_brand_cat' : 'pet_brand_dog';
// getDictList(petBreedType).then(res => {
// if (res.code === 200) {
// breedData.value = Array.from(new Set(res.data.map(e => e.dictLabel)));
// } else {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// }
// });
};
const getMaxDate = () => {
return Date.now();
};
const getMinDate = () => {
let dt = new Date();
dt.setFullYear(dt.getFullYear() - 30);
return Date.parse(dt);
};
//
onMounted(() => {
// getPersonalityDataList();
// getPetBreed();
});
</script>
<style>
.personal-pet-basic-info {
background-color: #fff;
margin-top: 10px;
padding: 10px 20px;
}
.personal-pet-breed-btns {
display: flex;
justify-content: space-between;
box-sizing: border-box;
background-color: #FFFFFF;
padding: 20rpx 20rpx 40rpx 20rpx;
width: 100%;
height: 160rpx;
position: fixed;
bottom: 0;
z-index: 100;
}
.personal-pet-breed-btn {
width: 40%;
}
</style>

+ 226
- 0
otherPages/userManage/pet/components/petHealthInfo.vue View File

@ -0,0 +1,226 @@
<template>
<view class="">
<view class="personal-pet-health-info">
<view class="personal-pet-info-title border-bottom">
宠物健康情况
</view>
<u--form labelPosition="left" :model="petHealthInfo" ref="uForm">
<u-form-item required label="疫苗" :prop="`petHealthInfo.vaccineStatus`" labelWidth="80" borderBottom
@click="showVaccine = true">
<u--input v-model="petHealthInfo.vaccineStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="驱虫" :prop="`petHealthInfo.dewormingStatus`" labelWidth="80" borderBottom
@click="showExpelling = true">
<u--input v-model="petHealthInfo.dewormingStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item label="绝育" :prop="`petHealthInfo.sterilization`" labelWidth="80" borderBottom
@click="showSterilization = true" ref="item1">
<u--input v-model="petHealthInfo.sterilization" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item v-if="petType === 'dog' || petType === '狗狗' " label="狗证" :prop="`petHealthInfo.doglicenseStatus`" labelWidth="80" borderBottom
@click="showDog = true" ref="item1">
<u--input v-model="petHealthInfo.doglicenseStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<view class="dog-tips" v-if="petType === 'dog' || petType === '狗狗'">
<u-icon name="info-circle" color="#A94F20" size="12"></u-icon>
<view style="margin-left: 3px;">
未办理养犬许可证且需要外出遛狗, 犬只存在被相关单位收缴
甚至捕杀的可能请您遵守当地养犬规范合法文明养犬具体
请您查看当地养犬条例
</view>
</view>
<u-form-item required label="健康" :prop="`petHealthInfo.healths`" labelWidth="80"
@click="healthsSelect">
<u--input disabled disabledColor="#ffffff" placeholder="请选择(多选)" :value="petHealthInfo.healthStatus && petHealthInfo.healthStatus.join(',')"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<view slot="right">
<u-icon v-if="showHealths" name="arrow-down" color="#AAA"></u-icon>
<u-icon v-else name="arrow-right" color="#AAA" ></u-icon>
</view>
</u-form-item>
</u--form>
</view>
<view class="health-select" v-show="showHealths">
<view style="padding: 10px;height: 85%;">
<u-checkbox-group v-model="petHealthInfo.healthStatus" @change="checkboxChange" placement="column" activeColor="#ffbf60">
<u-checkbox :customStyle="{marginBottom: '8px'}" v-for="(item, index) in healthData"
:key="index" :label="item" :name="item">
</u-checkbox>
</u-checkbox-group>
<u--input placeholder="请输入其他健康特征"
:disabled="!(petHealthInfo.healthStatus && petHealthInfo.healthStatus.includes('其他'))"
border="surround" maxlength='20'
:customStyle="{backgroundColor: '#fff'}"
@change="updatePetHealthInfo()"
v-model="petHealthInfo.remark"></u--input>
</view>
</view>
<u-picker :show="showVaccine" :showToolbar='false' :columns="vaccineActions" @cancel="showVaccine = false" :immediateChange="true"
:defaultIndex="defaultVaccine"
@change="vaccineSelect"></u-picker>
<u-picker :show="showExpelling" :showToolbar='false' :columns="expellingActions" @cancel="showExpelling = false" :immediateChange="true"
:defaultIndex="defaultDeworming"
@change="expellingSelect"></u-picker>
<u-picker :show="showSterilization" :showToolbar='false' :columns="sterilizationActions" @cancel="showSterilization = false" :immediateChange="true"
:defaultIndex="defaultSterilization"
@change="sterilizationSelect"></u-picker>
<u-picker :show="showDog" :showToolbar='false' :columns="dogActions" @cancel="showDog = false" :immediateChange="true"
:defaultIndex="defaultDoglicense"
@change="dogSelect"></u-picker>
</view>
</template>
<script setup>
import { ref, onMounted, watch } from 'vue';
// props
const props = defineProps({
petType: {
type: String,
default: 'dog'
},
petHealthInfo: {
type: Object,
default: () => ({
vaccineStatus: '',
dewormingStatus: '',
sterilization: '',
doglicenseStatus: '',
healthStatus: [],
remark: ''
})
},
defaultVaccine: {
type: Number,
default: 0
},
defaultDeworming: {
type: Number,
default: 0
},
defaultSterilization: {
type: Number,
default: 0
},
defaultDoglicense: {
type: Number,
default: 0
}
});
// emits
const emits = defineEmits(['update:petHealthInfo']);
//
const showVaccine = ref(false);
const showExpelling = ref(false);
const showSterilization = ref(false);
const showDog = ref(false);
const showHealths = ref(false);
const vaccineActions = ref([[ '每年都免疫','有免疫史','未免疫']]);
const expellingActions = ref([['未驱虫', '定期驱虫', '有驱虫史']]);
const sterilizationActions = ref([['已绝育','未绝育']]);
const dogActions = ref([[ '是','否']]);
const healthData = ref([]);
const tempHealths = ref([]);
const uForm = ref(null);
const item1 = ref(null);
//
const getHealthDataList = () => {
// getDictList('pet_health_status').then(res => {
// if (res.code === 200) {
// healthData.value = res.data.map(e => e.dictLabel);
// } else {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// }
// });
};
const vaccineSelect = (e) => {
props.petHealthInfo.vaccineStatus = e.value[0];
showVaccine.value = false;
updatePetHealthInfo();
};
const expellingSelect = (e) => {
props.petHealthInfo.dewormingStatus = e.value[0];
showExpelling.value = false;
updatePetHealthInfo();
};
const sterilizationSelect = (e) => {
props.petHealthInfo.sterilization = e.value[0];
showSterilization.value = false;
updatePetHealthInfo();
};
const dogSelect = (e) => {
props.petHealthInfo.doglicenseStatus = e.value[0];
showDog.value = false;
updatePetHealthInfo();
};
const healthsSelect = () => {
showHealths.value = !showHealths.value;
uni.pageScrollTo({
scrollTop: 2000,
duration: 300
});
};
const checkboxChange = (n) => {
console.log('change', n);
updatePetHealthInfo();
};
const changeRemark = (e) => {
props.petHealthInfo.remark = e;
updatePetHealthInfo();
};
const updatePetHealthInfo = () => {
// update petHealthInfo
emits('update:petHealthInfo', props.petHealthInfo);
};
//
onMounted(() => {
// getHealthDataList();
// defaultVaccine.value = vaccineActions.value[0].indexOf(props.petHealthInfo.vaccineStatus);
// defaultDeworming.value = expellingActions.value[0].indexOf(props.petHealthInfo.dewormingStatus);
// defaultSterilization.value = sterilizationActions.value[0].indexOf(props.petHealthInfo.sterilization);
// defaultDoglicense.value = dogActions.value[0].indexOf(props.petHealthInfo.doglicenseStatus);
});
</script>
<style lang="scss">
.personal-pet-health-info{
background-color: #fff;
padding: 10px 20px 0 20px;
margin-top: 10px;
}
.health-select{
background-color: #fffcf2;
padding: 10px 20px;
}
.dog-tips{
color: #A94F20;
font-size: 12px;
display: flex;
align-items: baseline;
margin-top: 5px;
}
</style>

+ 190
- 31
otherPages/userManage/pet/index.vue View File

@ -1,12 +1,12 @@
<template>
<view class="personal-pet">
<view v-if="petLists.length > 0" class="personal-pet-list">
<view v-for="(item, index) in petLists" :key="index">
<view v-if="petList.length > 0" class="personal-pet-list">
<view v-for="(item, index) in petList" :key="index">
<view
:class="['personal-pet-list-item', item.sex === 0 ? '.personal-pet-list-item_backgroud_m' : '.personal-pet-list-item_backgroud_f']">
:class="['personal-pet-list-item', item.gender === '男生' ? 'personal-pet-list-item_backgroud_m' : 'personal-pet-list-item_backgroud_f' ]">
<view class="personal-pet-info">
<view>
<u-avatar :src="item.headImage? item.headImage : defaultPhoto" size="60" shape="circle"></u-avatar>
<u-avatar :src="item.headImage || defaultPhoto" size="60" shape="circle"></u-avatar>
</view>
<view class="personal-pet-info-1">
<view class="personal-pet-info-2">
@ -14,19 +14,19 @@
{{ item.nickName }}
</view>
<view class="personal-pet-sex">
<img :src="item.sex === 0 ? '../../static/images/details/boy.svg' : '../../static/images/details/girl.svg'"
<img :src="item.sex === 0 ? '../../../static/images/sex/boy.svg' : '../../../static/images/sex/girl.svg'"
alt="sex" style="width: 16px;height: 16px;" />
</view>
</view>
<view class="personal-pet-info-3" style="width: 100%;">
<view class="ellipsis" style="max-width: 25%;">
<view class="" style="max-width: 35%;">
{{ item.type || '未知' }}
</view>
<view class="personal-pet-info-age" style="max-width: 90px;">
{{ item.type || '未知' }}
{{ item.age || '未知' }}
</view>
<view class="ellipsis" style="max-width: 25%;">
{{ item.weight + 'kg' }}
<view class="" style="max-width: 25%;">
体重{{ item.weight }}kg
</view>
</view>
</view>
@ -34,6 +34,20 @@
<view class="personal-pet-info-disposition ellipsis">
性格 {{ item.personality }}
</view>
<view class="personal-pet-info-btns">
<view class="personal-pet-info-btn" @click="editPet(item)">
<u-icon name="edit-pen" color="#7d8196" size="16" style="margin-right: 5px;"></u-icon>
<view style="margin-left: 5px;">
编辑
</view>
</view>
<view class="personal-pet-info-btn" @click="deletePet(item)">
<u-icon name="trash" color="#7d8196" size="16"></u-icon>
<view style="margin-left: 5px;">
删除
</view>
</view>
</view>
</view>
</view>
</view>
@ -42,6 +56,21 @@
style="width: 149px;height: 124px;" mode="widthFix" />
<view class="personal-pet-none-text">这里还没有您的宠物,请点击添加吧~</view>
</view>
<view class="personal-pet-add">
<button class="personal-pet-add-btn" @click="addPet">
<view style="font-size: 16px;font-weight: 500;">
添加宠物
</view>
</button>
</view>
<!-- <view class="">
<u-picker :showToolbar='false' :show="show" :columns="petTypes" @change="petTypeChange" @cancel="cancel"
@confirm="confirm"></u-picker>
</view> -->
<u-modal :show="showDel" @confirm="confirmDel" @cancel="cancelDel" ref="uModal" showCancelButton
:asyncClose="true" :content="delContent"></u-modal>
</view>
</template>
@ -50,78 +79,201 @@
ref,
onMounted
} from 'vue';
// import {
// getDictList
// } from "@/api/system/user.js"
import {
petList
getpetList,
delByPetId
} from "@/api/pet/index.js";
import {
useRouter
} from 'vue-router';
import {
onShow,
onPullDownRefresh
} from "@dcloudio/uni-app"
} from '@dcloudio/uni-app'
//
const router = useRouter();
const defaultPhoto = ref('https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/catdog.png');
const petLists = ref([]);
const petList = ref([]);
const show = ref(false);
const showDel = ref(false);
const petTypes = ref([]);
const delContent = ref('');
const deleteId = ref('');
const petType = ref('');
//
const getPetListData = async () => {
petLists.value = [];
const getPetList = async () => {
petList.value = [];
try {
const res = await petList();
const res = await getpetList();
if (res && res.data) {
petLists.value = res.data;
petList.value = res.data;
showDel.value = false;
}
} catch (error) {
console.error('获取宠物列表失败', error);
}
};
//
// const getPetTypeList = async () => {
// try {
// const res = await getDictList('pet_type');
// if (res.code === 200) {
// const petType = res.data.map(e => e.dictLabel);
// petTypes.value = [petType];
// } else {
// console.error('pet type');
// }
// } catch (error) {
// console.error('pet type', error);
// }
// };
const addPet = () => {
show.value = true;
uni.navigateTo({
url: "/otherPages/userManage/pet/petInfo"
})
};
const cancel = () => {
show.value = false;
};
const petTypeChange = (e) => {
petType.value = e.value[0];
};
const confirm = (e) => {
show.value = false;
console.log(petType.value);
if (petType.value === '猫猫') {
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'cat',
optionType: 'add'
}
});
}
if (petType.value === '狗狗') {
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'dog',
optionType: 'add'
}
});
}
if (!petType.value) {
if (e.value[0] === '猫猫') {
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'cat',
optionType: 'add'
}
});
}
if (e.value[0] === '狗狗') {
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'dog',
optionType: 'add'
}
});
}
}
};
//
const editPet = (item) => {
if (item.petType === '猫猫' || item.petType === 'cat') {
uni.navigateTo({
url: `/pages/personalCenter/petInfo?petType=cat&optionType=edit&petId=${item.id}`
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'cat',
optionType: 'edit',
petId: item.id
}
});
}
if (item.petType === '狗狗' || item.petType === 'dog') {
uni.navigateTo({
url: `/pages/personalCenter/petInfo?petType=dog&optionType=edit&petId=${item.id}`
router.push({
path: `/pages/personalCenter/petInfo`,
query: {
petType: 'dog',
optionType: 'edit',
petId: item.id
}
});
}
};
//
const deletePet = (item) => {
delContent.value = "确定要删除" + item.name + '?';
showDel.value = true;
deleteId.value = item.id;
};
//
const confirmDel = async () => {
try {
await delByPetId(deleteId.value);
console.log('删除成功');
getPetList();
} catch (error) {
console.error('删除宠物失败', error);
}
};
const cancelDel = () => {
showDel.value = false;
deleteId.value = '';
};
onMounted(() => {
getPetListData();
// getPetTypeList();
getPetList();
});
onShow(() => {
getPetListData();
getPetList();
});
onPullDownRefresh(() => {
getPetListData();
getPetList();
});
</script>
<style lang="scss">
<style lang="scss" scoped>
.personal-pet {
position: relative;
height: 100%;
padding-bottom: 90px;
.personal-pet-add {
box-sizing: border-box;
background-color: #FFFFFF;
padding: 20rpx 20rpx 40rpx 20rpx;
width: 100%;
height: 160rpx;
position: fixed;
bottom: 0;
z-index: 100;
display: flex;
.personal-pet-add-btn {
width: 100%;
height: 90rpx;
border-radius: 6px;
background: #FFB13F;
font-size: 16px;
color: #FFFFFF;
}
}
.personal-pet-list {
.personal-pet-list-add {
width: 100%;
@ -138,6 +290,7 @@
display: flex;
align-items: center;
}
}
.personal-pet-list-item_backgroud_m {
@ -160,6 +313,7 @@
.personal-pet-info-1 {
margin-left: 10px;
width: calc(100% - 60px);
.personal-pet-info-2 {
display: flex;
@ -185,8 +339,11 @@
border-left: solid 2px #7D8196;
border-right: solid 2px #7D8196;
}
}
}
}
.personal-pet-info-disposition {
@ -211,6 +368,7 @@
}
}
}
}
.personal-pet-none {
@ -228,5 +386,6 @@
margin-top: 10px;
}
}
}
</style>

+ 447
- 0
otherPages/userManage/pet/petInfo.vue View File

@ -0,0 +1,447 @@
<template>
<view class="personal-pet-cat container">
<view class="personal-pet-img">
<view class="personal-pet-info-title">
宠物头像
</view>
<view style="display: flex;justify-content: center;">
<u-upload accept="image" :capture="['album','camera']" :fileList="fileList" @afterRead="afterRead"
@delete="deletePic" :max-count="1" name="pet" width="60" height="60" :custom-style="{flex:0}">
<image src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/index/cat_new.png"
style="width: 60px;height: 60px;"></image>
</u-upload>
</view>
</view>
<PetBaseInfo :petType="petType" v-model:petBaseInfo="petBaseInfo" />
<PetHealthInfo :petType="petType" v-model:petHealthInfo="petHealthInfo" />
<view class="personal-pet-info-btns">
<view class="personal-pet-btns">
<view class="personal-pet-btn">
<u-button :disabled="optionType!='edit'" color="#FFF4E4" @click="deletePet">
<view style="color: #A9A9A9;">
删除
</view>
</u-button>
</view>
<view class="personal-pet-btn" @click="save">
<u-button color="#FFBF60" :loading="loading">
<view style="color: #fff;">
保存
</view>
</u-button>
</view>
</view>
</view>
<u-modal :show="showDel" @confirm="confirmDel" @cancel="showDel = false" ref="uModal" showCancelButton
:asyncClose="true" :content="delContent">
</u-modal>
</view>
</template>
<script setup>
import {
ref,
onMounted
} from 'vue';
import {
addPet,
getPetDetails,
updatePet,
delByPetId
} from '@/api/pet/index.js';
import PetBaseInfo from './components/petBaseInfo.vue';
import PetHealthInfo from './components/petHealthInfo.vue';
import {
useRoute,
useRouter
} from 'vue-router';
import {
onLoad
} from '@dcloudio/uni-app'
const route = useRoute();
const router = useRouter();
const loading = ref(false);
const fileList = ref([]);
const petId = ref('');
const petType = ref('dog');
const optionType = ref('add');
const isNewOrder = ref(false);
const delContent = ref('');
const photo = ref('');
const petBaseInfo = ref({
name: '',
gender: '',
breed: '',
bodyType: '',
birthDate: '',
personality: ''
});
const petHealthInfo = ref({
vaccineStatus: '',
dewormingStatus: '',
sterilization: '',
doglicenseStatus: '',
healthStatus: [],
remark: ''
});
const showDel = ref(false);
const uModal = ref(null);
onLoad((option) => {
petType.value = option.petType;
optionType.value = option.optionType;
if (optionType.value === 'edit') {
petId.value = option.petId;
getPetDetailsFunc(option.petId);
}
if (option.isNewOrder) {
isNewOrder.value = true;
}
});
const deletePic = (event) => {
fileList.value.splice(event.index, 1);
};
const afterRead = async (event) => {
let lists = [].concat(event.file);
let fileListLen = fileList.value.length;
lists.map((item) => {
fileList.value.push({
...item,
status: 'uploading',
message: '上传中'
});
});
for (let i = 0; i < lists.length; i++) {
const result = await uploadFilePromise(lists[i].url);
let item = fileList.value[fileListLen];
fileList.value.splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}));
fileListLen++;
}
};
const uploadFilePromise = (url) => {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: 'https://store-test.catmdogd.com/test-api/h5/oss/upload',
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
setTimeout(() => {
if (res && res.data) {
let resData = JSON.parse(res.data);
resolve(resData.url);
}
reject("上传失败");
}, 1000);
}
});
});
};
const getPetDetailsFunc = (petId) => {
getPetDetails(petId).then((res) => {
if (res && res.id) {
const {
photo,
name,
gender,
breed,
bodyType,
birthDate,
personality,
vaccineStatus,
dewormingStatus,
sterilization,
doglicenseStatus,
healthStatus,
remark
} = res;
petBaseInfo.value = {
name,
gender,
breed,
bodyType,
birthDate,
personality
};
petHealthInfo.value = {
vaccineStatus,
dewormingStatus,
sterilization,
doglicenseStatus,
healthStatus,
remark
};
fileList.value = [{
url: photo
}];
} else {
uni.showToast({
title: '获取pet失败',
duration: 3000,
icon: "none"
});
}
});
};
const save = () => {
if (!(fileList.value.length > 0 && fileList.value[0].url)) {
uni.showToast({
title: '请上传宠物照片!',
duration: 3000,
icon: "none"
});
return;
}
photo.value = fileList.value[0].url;
let params = {
...{
petType: petType.value,
photo: photo.value
},
...petBaseInfo.value,
...petHealthInfo.value
};
if (!params.name) {
uni.showToast({
title: '请填写宠物昵称!',
duration: 3000,
icon: "none"
});
return;
}
// if (!params.breed) {
// uni.showToast({
// title: '!',
// duration: 3000,
// icon: "none"
// });
// return;
// }
if (!params.bodyType) {
uni.showToast({
title: '请选择宠物体重!',
duration: 3000,
icon: "none"
});
return;
}
// if (!params.personality) {
// uni.showToast({
// title: '!',
// duration: 3000,
// icon: "none"
// });
// return;
// }
if (!params.vaccineStatus) {
uni.showToast({
title: '请选择宠物疫苗情况!',
duration: 3000,
icon: "none"
});
return;
}
if (!params.dewormingStatus) {
uni.showToast({
title: '请选择宠物驱虫情况!',
duration: 3000,
icon: "none"
});
return;
}
// if (params.healthStatus == null || !params.healthStatus.length) {
// uni.showToast({
// title: '!',
// duration: 3000,
// icon: "none"
// });
// return;
// }
console.log(params)
loading.value = true;
if (optionType.value === 'edit') {
params.id = petId.value;
updatePet(params).then((res) => {
if (res && res.code === 200) {
uni.showToast({
title: '保存成功',
duration: 3000,
icon: "none"
});
setTimeout(() => {
loading.value = false;
if (isNewOrder.value) {
router.push('/pages/newOrder/petList');
} else {
const len = getCurrentPages().length;
if (len >= 2) {
uni.navigateBack();
} else {
router.push('/pages/personalCenter/pet');
}
}
}, 1000);
} else {
loading.value = false;
uni.showToast({
title: '更新pet失败',
duration: 3000,
icon: "none"
});
}
});
} else if (optionType.value === 'add') {
addPet(params).then((res) => {
if (res && res === 1) {
uni.showToast({
title: '保存成功',
duration: 3000,
icon: "none"
});
setTimeout(() => {
loading.value = false;
if (isNewOrder.value) {
router.push('/pages/newOrder/petList');
} else {
const len = getCurrentPages().length;
if (len >= 2) {
uni.navigateBack();
} else {
router.push('/pages/personalCenter/pet');
}
}
}, 1000);
} else {
loading.value = false;
uni.showToast({
title: '新增pet失败',
duration: 3000,
icon: "none"
});
}
});
}
};
const deletePet = () => {
delContent.value = `确定要删除${petBaseInfo.value.name}?`;
showDel.value = true;
};
const confirmDel = () => {
delByPetId(petId.value).then((res) => {
console.log(res);
uni.showToast({
title: '删除成功',
duration: 3000,
icon: "none"
});
showDel.value = false;
setTimeout(() => {
const len = getCurrentPages().length;
loading.value = false;
if (len >= 2) {
uni.navigateBack();
} else {
router.push('/pages/personalCenter/pet');
}
}, 2000);
});
};
</script>
<style lang="scss">
.personal-pet-cat {
.breed-select {
background-color: #fff;
width: 100%;
padding: 20px;
border-radius: 8px 8px 0 0;
position: absolute;
bottom: 0;
.breed-select-btn {
display: flex;
justify-content: space-around;
align-items: center;
}
}
.personal-pet-info-title {
font-size: 14px;
color: #333;
font-weight: bold;
padding-bottom: 10px;
}
.border-bottom {
border-bottom: 1px solid #efefef;
}
.personal-pet-img {
width: 100%;
height: 118px;
background-color: #fff;
padding: 10px 20px;
}
.personal-pet-basic-info {
background-color: #fff;
margin-top: 10px;
padding: 10px 20px;
}
}
.container {
position: relative;
height: 100%;
padding-bottom: 90px;
.personal-pet-info-btns {
box-sizing: border-box;
background-color: #FFFFFF;
padding: 20rpx 20rpx 40rpx 20rpx;
width: 100%;
height: 160rpx;
position: fixed;
bottom: 0;
z-index: 100;
display: flex;
.personal-pet-btns {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: nowrap;
width: 100%;
height: 90rpx;
border-radius: 6px;
font-size: 16px;
color: #FFFFFF;
.personal-pet-btn {
width: 40%;
}
}
}
}
</style>

+ 6
- 0
pages.json View File

@ -362,6 +362,12 @@
"style": {
"navigationBarTitleText": "我的宠物"
}
},
{
"path": "pet/petInfo",
"style": {
"navigationBarTitleText": "创建宠物档案"
}
}
]
}


+ 14
- 21
pages/myOrdersManage/components/systemOrder.vue View File

@ -1,8 +1,7 @@
<template>
<up-list @scrolltolower="scrolltolower">
<up-list-item>
<view class="mb28 container-list-item"
v-for="(item, index) in 1">
<view class="mb28 container-list-item" v-for="(item, index) in 1">
<view class="flex-between flex" style="background: #FFF4E5;padding: 22rpx 42rpx">
<view>待接单</view>
<view>本单酬劳
@ -14,7 +13,8 @@
<up-image style="flex-shrink:0" class="mr20" width="70px" height="70px"
src="https://cdn.catmdogd.com/Work/image/work/tx.png" shape="circle"></up-image>
<view>
<view class="font28 col3">服务天数: {{ item.orderServiceTime }} I {{ item.orderServiceDate }}</view>
<view class="font28 col3">服务天数: {{ item.orderServiceTime }} I {{ item.orderServiceDate }}
</view>
<view style="margin: 18rpx 0">期望上门时间</view>
<view>中华田园犬(小型犬) | 专业喂养+提前熟悉+陪玩</view>
</view>
@ -22,16 +22,9 @@
<view class="mb28 address">{{ item.orderVisitAddress }}</view>
<view class="mb28">订单为系统派发请确认订单信息后再抢单</view>
<view class="flex flex-between">
<up-button type="primary"
v-if="true"
text="订单详情" @click="toClock" shape="circle" class="mr20"
color="#FFAA48"></up-button>
<up-button type="primary"
v-else
text="查看订单详情" @click="toDetail" shape="circle" class="mr20"
color="#FFAA48"></up-button>
<up-button type="primary" v-if="true" :text="btnTexts[current]" @click="toClock" shape="circle"
class="mr20" color="#FFAA48"></up-button>
<up-button type="primary" text="宠物档案" @click="toPet" shape="circle" class="mr20"
color="#FFAA48"></up-button>
@ -49,23 +42,23 @@
}
const { list } = defineProps({
const props = defineProps({
list: {
type: Array,
required: true
},
current: {
type: Number,
required: true
}
});
const btnTexts = ['订单详情', '打卡', '打开记录']
function toClock() {
uni.navigateTo({
url: "/otherPages/orderTakingManage/detail/index"
})
}
function toDetail() {
function toClock(id) {
const paths = [`/otherPages/orderTakingManage/detail/index?id=${id}`,'/otherPages/myOrdersManage/clock/index','/otherPages/myOrdersManage/clock/detail']
uni.navigateTo({
url: "/otherPages/orderTakingManage/detail/index"
url: paths[props.current]
})
}


+ 3
- 4
pages/myOrdersManage/index.vue View File

@ -34,7 +34,7 @@
</up-sticky>
<view class="container">
<systemOrder :list="list" v-if="activeIndex == 1" />
<systemOrder :list="list" :current="current" v-if="activeIndex == 1" />
<orderListByData :list="list" v-else />
</view>
</view>
@ -71,7 +71,6 @@
const current = ref(0)
const activeIndex = ref(1)
const list = ref([])
const tabList1 = reactive([{
@ -119,8 +118,8 @@
getList()
const activeIndex1Click = (item) => {
console.log('item', item);
const activeIndex1Click = (item) => {
current.value = item.index;
}
</script>


+ 6
- 2
pages/orderTakingManage/components/list.vue View File

@ -90,6 +90,8 @@
required: true
}
})
const emits = defineEmits(['update']);
//
const toOrderDetail = (id) => {
@ -106,9 +108,9 @@
}
const unableToAcceptOrder = () => {
const unableToAcceptOrder = (currentId) => {
modal.value.open();
id.value = currentId;
}
const open = () => {
@ -121,6 +123,7 @@
//
const noneOrder = async () => {
if(!id.value || !userInfo.value.userId) return
if (!cause.value) {
return uni.showToast({
title: '提交无法接单原因成功~',
@ -138,6 +141,7 @@
title: '提交无法接单原因成功~',
icon: "none"
});
emits('update');
close();
}
}


+ 5
- 1
pages/orderTakingManage/index.vue View File

@ -14,7 +14,7 @@
</up-sticky>
<view class="container">
<List :orderList="orderlist" :current="current"/>
<List :orderList="orderlist" :current="current" @update="updateList"></List>
</view>
</view>
</template>
@ -90,6 +90,10 @@
current.value = item.index;
getOrderList();
}
const updateList = () => {
getOrderList();
}
</script>
<style scoped lang="scss">


+ 10
- 0
pages/userManage/index.scss View File

@ -3,6 +3,16 @@
height: 350rpx;
background: #FFBF60;
color: #FFFFFF;
.base-leavel {
display: flex;
.petMaster {
width: 140rpx;
height: auto;
margin: 0rpx 10rpx;
}
}
}
.login{
padding: 40rpx;


+ 39
- 18
pages/userManage/index.vue View File

@ -2,18 +2,28 @@
<view>
<view class="user-header">
<view class="flex flex-between login">
<view class="flex">
<view style="width: 120rpx;">
<up-image class="mr20" width="120rpx" height="120rpx" :src="userInfo.userImage"
shape="circle"></up-image>
<view>{{getIsLogin()?userInfo.userName:"欢迎来到版宠师"}}</view>
</view>
<view style="width: 140rpx">
<up-button v-if="!getIsLogin()" @click="handleLogin" :customStyle="{borderColor:'#fff'}"
type="primary" text="请登录" shape="circle" color="#FFBF60"></up-button>
<view style="width: calc(100% - 120rpx); padding-left: 20rpx;box-sizing: border-box;">
<view class="base-leavel">
{{getIsLogin()?userInfo.userName:"欢迎来到版宠师"}}
<image class="petMaster" :src="petMaster" mode="aspectFit"></image>
<image class="petMaster" :src="partnerMaster" mode="aspectFit"></image>
</view>
<view>
手机号{{ userInfo?.userTelephone }}
</view>
</view>
<!-- <view style="width: 140rpx">
<up-button v-else @click="logout" :customStyle="{borderColor:'#fff'}" type="primary" text="退出登录"
shape="circle" color="#FFBF60"></up-button>
</view>
</view> -->
</view>
<view class="header-money">
<view class="header-money-list">
<view class="header-money-item flex flex-evenly">
@ -50,9 +60,6 @@
<view @click="toMyPet" style="color: #707070">更多 ></view>
</view>
<view>
<up-button v-if="!getIsLogin()" @click="handleLogin" class="mb20" size="large"
style="width: 600rpx;height: 135rpx;" type="primary" text="登录后管理宠物" shape=""
color="#FFF4E5"></up-button>
<!-- <up-button v-if="getIsLogin()" class="mb20" size="large" style="width: 500rpx" type="primary"
text="请添加您的爱宠" shape="circle"
color="linear-gradient(to right, rgb(255 ,191 ,96 ,1), rgb(255, 51, 186))"></up-button> -->
@ -89,8 +96,8 @@
<button plain class="btn-share" open-type="share">
<view class="icon-list">
<up-image class="mb20" :show-loading="true"
src="https://t9.baidu.com/it/u=2834693008,3232051400&fm=193" width="68rpx"
height="68rpx"></up-image>
src="https://t9.baidu.com/it/u=2834693008,3232051400&fm=193" width="68rpx"
height="68rpx"></up-image>
<view>分享好友</view>
</view>
</button>
@ -125,7 +132,7 @@
onShareAppMessage,
} from "@dcloudio/uni-app"
import {
petList
getpetList
} from "@/api/pet/index.js"
onShow(() => {
@ -136,9 +143,9 @@
}
getPetList();
})
onMounted(() => {
content.value = configList.value?.['home-agreement']?.paramValueArea || ""
content.value = configList.value?.['home_agreement']?.paramValueArea || ""
//
onShareAppMessage(() => {
@ -161,14 +168,28 @@
const pet = ref({})
const show = ref(false)
const content = ref("")
const petMasterLevel = ref(1);
const partnerLevel = ref(0);
//
const petMaster = computed(() => {
const paths = [configList.value?.pet_primary?.paramValueImage, configList.value?.pet_senior
?.paramValueImage
];
return paths[petMasterLevel.value];
})
//
const partnerMaster = computed(() => {
const paths = [configList.value?.partner_intermediate?.paramValueImage, configList.value?.partner_senior
?.paramValueImage
];
return paths[partnerLevel.value];
})
if (getIsLogin() && getToken()) {
userInfo.value = getStorage("userInfo")
isLogin.value = true
}
const handleLogin = () => {
tab.navigateTo('/pages/login/index')
}
const toNext = () => {
uni.navigateTo({
@ -183,7 +204,7 @@
}
const getPetList = async () => {
let response = await petList();
let response = await getpetList();
pet.value = response?.data[0] || {};
}


+ 6
- 0
static/images/sex/boy.svg View File

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1000001678">
<circle id="Ellipse 1243" cx="10" cy="10" r="10" fill="#51B6FF"/>
<path id="Vector" d="M15.103 4.42184C15.0575 4.40884 15.012 4.40234 14.9665 4.40234H11.723C11.359 4.40234 11.0665 4.69484 11.0665 5.05884C11.0665 5.42284 11.359 5.71534 11.723 5.71534H13.2895L11.19 7.81484C10.41 7.30134 9.48049 6.99584 8.47949 6.99584C5.76249 6.99584 3.55249 9.20584 3.55249 11.9228C3.55249 14.6398 5.76249 16.8498 8.47949 16.8498C11.1965 16.8498 13.4065 14.6398 13.4065 11.9228C13.4065 10.6813 12.945 9.54384 12.1845 8.67284L14.1995 6.65784V8.17884C14.1995 8.54284 14.492 8.83534 14.856 8.83534C15.22 8.83534 15.5125 8.54284 15.5125 8.17884V4.94184C15.506 4.69484 15.337 4.48034 15.103 4.42184ZM8.47299 15.6668C6.41249 15.6668 4.73549 13.9898 4.73549 11.9293C4.73549 9.86884 6.41249 8.19184 8.47299 8.19184C10.5335 8.19184 12.2105 9.86884 12.2105 11.9293C12.2105 13.9898 10.5335 15.6668 8.47299 15.6668Z" fill="white"/>
</g>
</svg>

+ 8
- 0
static/images/sex/girl.svg View File

@ -0,0 +1,8 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1000001402">
<circle id="Ellipse 1243" cx="10" cy="10" r="10" fill="#FF7878"/>
<g id="Frame">
<path id="Vector" d="M14.6994 5.16698C13.8873 4.37042 12.8137 3.93164 11.6765 3.93164C10.5077 3.93164 9.41323 4.39106 8.59485 5.22526C7.78752 6.04819 7.34875 7.13664 7.35981 8.28959C7.3685 9.20735 7.66217 10.078 8.19637 10.8025L7.19011 11.8279L5.09588 9.77316C5.03131 9.70846 4.95454 9.65721 4.87003 9.62237C4.78551 9.58753 4.69493 9.56979 4.60352 9.57018C4.51211 9.57058 4.42168 9.58909 4.33747 9.62466C4.25326 9.66022 4.17694 9.71214 4.11292 9.77739C4.0489 9.84264 3.99845 9.91994 3.9645 10.0048C3.93055 10.0897 3.91376 10.1805 3.91511 10.2719C3.91647 10.3633 3.93593 10.4535 3.97238 10.5373C4.00882 10.6212 4.06153 10.6969 4.12745 10.7603L6.22167 12.815L4.79648 14.2676C4.67102 14.3991 4.60236 14.5747 4.60536 14.7564C4.60836 14.9381 4.68278 15.1114 4.81251 15.2387C4.94224 15.3659 5.11687 15.437 5.29861 15.4366C5.48036 15.4361 5.65461 15.3641 5.78369 15.2361L7.20887 13.7836L9.30309 15.8383C9.43221 15.9654 9.60617 16.0364 9.78731 16.0362C9.92463 16.0362 10.0588 15.9953 10.1728 15.9187C10.2868 15.8421 10.3755 15.7334 10.4274 15.6062C10.4793 15.4791 10.4922 15.3394 10.4645 15.2049C10.4367 15.0704 10.3696 14.9473 10.2715 14.8511L8.17731 12.7965L9.18239 11.7719C9.90703 12.2865 10.771 12.5652 11.676 12.5652C12.8447 12.5652 13.9392 12.1058 14.7576 11.2715C15.565 10.4485 16.0037 9.36016 15.9927 8.20721C15.9819 7.05416 15.5224 5.9745 14.6994 5.16698ZM13.7705 10.303C13.2143 10.87 12.4706 11.1821 11.6761 11.1821C10.903 11.1821 10.1733 10.884 9.62156 10.3424C9.06207 9.7937 8.74993 9.05997 8.74262 8.27625C8.73511 7.49254 9.03313 6.75298 9.58205 6.19359C10.1383 5.6266 10.882 5.31445 11.6765 5.31445C12.4493 5.31445 13.179 5.61267 13.731 6.15418C14.2903 6.7029 14.6024 7.43673 14.6099 8.22034C14.6174 9.00406 14.3194 9.74362 13.7705 10.303Z" fill="white"/>
</g>
</g>
</svg>

Loading…
Cancel
Save