2024-10-14 19:12:22 +08:00
|
|
|
|
<template>
|
|
|
|
|
<s-layout title="预约记录" :bgStyle="{ color: '#fff' }">
|
2024-10-16 18:09:51 +08:00
|
|
|
|
<view class="container">
|
|
|
|
|
<view class="cards">
|
|
|
|
|
<view class="card" v-for="(item, index) in reservationList" :key="index">
|
|
|
|
|
<view class="card-content">
|
|
|
|
|
<text class="type">预约信息</text>
|
2024-10-24 10:55:27 +08:00
|
|
|
|
<text class="time">订单日期:{{ sheep.$helper.timeFormat(item.creatTime, 'yyyy-mm-dd') }}</text>
|
2024-10-16 18:09:51 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view>
|
2024-10-24 10:55:27 +08:00
|
|
|
|
<text class="address">预约姓名:<text class="title">{{ item.name }}</text></text>
|
|
|
|
|
<text class="address">预约电话:<text class="title">{{ item.phone }}</text></text>
|
2024-10-21 17:47:58 +08:00
|
|
|
|
<text class="address">预约时间:<text
|
2024-10-24 10:55:27 +08:00
|
|
|
|
class="title">{{ item.days }}</text></text>
|
|
|
|
|
<text class="address">项目名称:<text class="title">{{ item.projectName }}</text> </text>
|
|
|
|
|
<text class="address">项目套餐:<text class="title">{{ item.technicianName }}</text> </text>
|
|
|
|
|
<!-- <div class="address-container">
|
2024-10-21 17:47:58 +08:00
|
|
|
|
<text class="address">门店地址:<text class="title">{{ item.brandaddress }}</text></text>
|
2024-10-24 10:55:27 +08:00
|
|
|
|
</div> -->
|
2024-10-21 17:47:58 +08:00
|
|
|
|
<text class="address">备注留言:<text class="title">{{ item.remark }}</text></text>
|
2024-10-16 18:09:51 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<text class="status"
|
2024-10-21 17:47:58 +08:00
|
|
|
|
style="float: right; border-radius: 10px; background-color: rgba(0,149,243); padding: 5px 10px; color: white;"
|
2024-10-16 18:09:51 +08:00
|
|
|
|
v-if=" item.reStatus===0">待审核</text>
|
|
|
|
|
<text class="status"
|
|
|
|
|
style="float: right; border-radius: 10px; background-color: orangered; padding: 5px 10px; color: white;"
|
|
|
|
|
v-if=" item.reStatus===1">预约成功</text>
|
|
|
|
|
<text class="status"
|
|
|
|
|
style="float: right; border-radius: 10px; background-color: orangered; padding: 5px 10px; color: white;"
|
2024-10-21 17:47:58 +08:00
|
|
|
|
v-if=" item.reStatus===2">已完结</text>
|
2024-10-16 18:09:51 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</s-layout>
|
2024-10-14 19:12:22 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-10-16 18:09:51 +08:00
|
|
|
|
import {
|
|
|
|
|
ref,
|
|
|
|
|
computed,
|
|
|
|
|
onMounted
|
|
|
|
|
} from 'vue';
|
2024-10-14 19:12:22 +08:00
|
|
|
|
import request from '@/sheep/request';
|
|
|
|
|
import {
|
|
|
|
|
baseUrl,
|
|
|
|
|
apiPath
|
|
|
|
|
} from '@/sheep/config';
|
2024-10-16 18:09:51 +08:00
|
|
|
|
import sheep from '@/sheep';
|
2024-10-14 19:12:22 +08:00
|
|
|
|
export default {
|
2024-10-16 18:09:51 +08:00
|
|
|
|
setup() {
|
|
|
|
|
// 使用 ref 创建响应式数据
|
|
|
|
|
const memberId = ref(null);
|
|
|
|
|
const reservationList = ref([]);
|
|
|
|
|
const page = ref(1);
|
|
|
|
|
const limit = ref(10);
|
|
|
|
|
const totalPages = ref(1);
|
|
|
|
|
|
|
|
|
|
// 使用 computed 创建计算属性
|
|
|
|
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
|
|
|
|
memberId.value = userInfo.value.id;
|
|
|
|
|
|
|
|
|
|
// 使用 onMounted 生命周期钩子
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 定义方法
|
|
|
|
|
function getList() {
|
2024-10-14 19:12:22 +08:00
|
|
|
|
request({
|
2024-10-24 10:55:27 +08:00
|
|
|
|
url: `${baseUrl}${apiPath}/h5/reservation/reservationInfo`,
|
2024-10-14 19:12:22 +08:00
|
|
|
|
method: 'GET',
|
2024-10-24 10:55:27 +08:00
|
|
|
|
// params: {
|
|
|
|
|
// userId: memberId.value,
|
|
|
|
|
// },
|
2024-10-14 19:12:22 +08:00
|
|
|
|
custom: {
|
|
|
|
|
showLoading: false,
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
2024-10-24 10:55:27 +08:00
|
|
|
|
console.log(res,"-------------")
|
|
|
|
|
reservationList.value = res.data;
|
2024-10-14 19:12:22 +08:00
|
|
|
|
});
|
2024-10-16 18:09:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 将响应式数据和方法暴露给模板
|
|
|
|
|
return {
|
|
|
|
|
memberId,
|
|
|
|
|
reservationList,
|
|
|
|
|
page,
|
|
|
|
|
limit,
|
|
|
|
|
totalPages,
|
|
|
|
|
getList,
|
2024-10-21 17:47:58 +08:00
|
|
|
|
sheep
|
2024-10-16 18:09:51 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
2024-10-14 19:12:22 +08:00
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 18:09:51 +08:00
|
|
|
|
<style scoped lang="scss">
|
2024-10-14 19:12:22 +08:00
|
|
|
|
.address-container {
|
2024-10-16 18:09:51 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2024-10-14 19:12:22 +08:00
|
|
|
|
}
|
2024-10-16 18:09:51 +08:00
|
|
|
|
|
2024-10-14 19:12:22 +08:00
|
|
|
|
.container {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
/* align-items: center; */
|
|
|
|
|
background-color: #f5f5f5;
|
2024-10-16 18:09:51 +08:00
|
|
|
|
padding: 15px;
|
2024-10-14 19:12:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cards {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card {
|
|
|
|
|
/* width: calc(50% - 10px); */
|
|
|
|
|
width: 100%;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-content {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
2024-10-21 17:47:58 +08:00
|
|
|
|
margin-bottom: 20px;
|
2024-10-16 18:09:51 +08:00
|
|
|
|
|
|
|
|
|
.type {
|
|
|
|
|
position: relative;
|
|
|
|
|
padding-left: 20px;
|
2024-10-21 17:47:58 +08:00
|
|
|
|
font-size: 16px;
|
2024-10-16 18:09:51 +08:00
|
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 100%;
|
2024-10-21 17:47:58 +08:00
|
|
|
|
background: url('https://zysc.fjptzykj.com:3000/shangcheng/617bb18286a76a4c8bfc377bf69f7436c478252e419f04cdd9a6070dd352d00f.png') no-repeat;
|
2024-10-16 18:09:51 +08:00
|
|
|
|
background-size: 60%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-10-21 17:47:58 +08:00
|
|
|
|
.time{
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
}
|
2024-10-14 19:12:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-contentinfo {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-image {
|
|
|
|
|
width: 50px;
|
|
|
|
|
height: 50px;
|
|
|
|
|
border-radius: 25px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.technician {
|
|
|
|
|
margin-left: 20%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hospital,
|
|
|
|
|
.technician,
|
2024-10-16 18:09:51 +08:00
|
|
|
|
.type {
|
|
|
|
|
/* margin-left: 20px; */
|
2024-10-14 19:12:22 +08:00
|
|
|
|
font-size: 15px;
|
|
|
|
|
color: #161616;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
2024-10-16 18:09:51 +08:00
|
|
|
|
|
2024-10-14 19:12:22 +08:00
|
|
|
|
.status {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
2024-10-16 18:09:51 +08:00
|
|
|
|
|
|
|
|
|
.address {
|
2024-10-21 17:47:58 +08:00
|
|
|
|
display: block;
|
|
|
|
|
margin-bottom: 10px;
|
2024-10-14 19:12:22 +08:00
|
|
|
|
font-size: 15px;
|
2024-10-21 17:47:58 +08:00
|
|
|
|
color: rgba(174, 174, 174);
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-weight: 300;
|
|
|
|
|
}
|
2024-10-16 18:09:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-14 19:12:22 +08:00
|
|
|
|
.health-list {
|
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 98%;
|
|
|
|
|
margin: 5PX;
|
|
|
|
|
padding-left: 15px;
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
/* padding: 10px; */
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.health_title {
|
|
|
|
|
padding: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.health_title_img {
|
|
|
|
|
float: left;
|
|
|
|
|
width: 40px;
|
|
|
|
|
height: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.health-title-title {
|
|
|
|
|
float: none;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.time {
|
|
|
|
|
/* margin-top: 20px; */
|
2024-10-21 17:47:58 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #aeaeae;
|
2024-10-14 19:12:22 +08:00
|
|
|
|
}
|
2024-10-16 18:09:51 +08:00
|
|
|
|
</style>
|