|
@@ -24,9 +24,9 @@
|
|
|
<up-grid-item v-for="(item, index) in serviceList2" :key="index" :custom-style="custmoStyle">
|
|
|
<view class="grid-box">
|
|
|
<!-- 图标 -->
|
|
|
- <view class="grid-icon">
|
|
|
- <image :src="item.icon" class="service-img" mode="aspectFit" />
|
|
|
- </view>
|
|
|
+ <view class="grid-icon">
|
|
|
+ <image :src="item.icon" class="service-img" mode="aspectFit" />
|
|
|
+ </view>
|
|
|
|
|
|
<!-- 文本 -->
|
|
|
<text class="grid-text">{{ item.name }}</text>
|
|
@@ -90,7 +90,7 @@ const custmoStyle = {
|
|
|
// 普通用户
|
|
|
const serviceList1 = ref([{
|
|
|
icon: '/static/img/统一知识平台-营运@1x.png',
|
|
|
- name: '家庭辅导',
|
|
|
+ name: '孩子陪护',
|
|
|
key: 1,
|
|
|
},
|
|
|
{
|
|
@@ -127,7 +127,7 @@ const serviceList1 = ref([{
|
|
|
//志愿者
|
|
|
const serviceList2 = ref([{
|
|
|
icon: '/static/serverImg/home/icon/icon4.png',
|
|
|
- name: '家庭辅导',
|
|
|
+ name: '孩子陪护',
|
|
|
key: 2,
|
|
|
},
|
|
|
{
|
|
@@ -191,11 +191,11 @@ const handleGridClick = async (index) => {
|
|
|
// 志愿者
|
|
|
if (userType == 2 && uToastRef.value) {
|
|
|
// pages_home/pages
|
|
|
-
|
|
|
+
|
|
|
const data = serviceList2.value[index]
|
|
|
if (data.key !== 7) {
|
|
|
const res = await getVolunteerInfo({ serviceCategory: data.key });
|
|
|
- if(res.code === 200 && res.data){
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
//已有注册,跳转详情页面
|
|
|
uni.navigateTo({
|
|
|
url: `/pages_home/pages/details/index?data=${encodeURIComponent(JSON.stringify(data))}`
|
|
@@ -211,7 +211,7 @@ const handleGridClick = async (index) => {
|
|
|
return;
|
|
|
}
|
|
|
init();
|
|
|
- calendar.value.open();
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -294,16 +294,20 @@ const close = () => {
|
|
|
const init = () => {
|
|
|
getDataTime().then(res => {
|
|
|
console.log('res', res);
|
|
|
- selected.value = res.data.map(item => {
|
|
|
- return {
|
|
|
- date: item.workDate,
|
|
|
- info: `${item.workStartTime}~${item.workEndTime}`,
|
|
|
- time: {
|
|
|
- startTime: item.workStartTime,
|
|
|
- endTime: item.workEndTime
|
|
|
+ if (res.code === 200) {
|
|
|
+ selected.value = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ date: item.workDate,
|
|
|
+ info: `${item.workStartTime}~${item.workEndTime}`,
|
|
|
+ time: {
|
|
|
+ startTime: item.workStartTime,
|
|
|
+ endTime: item.workEndTime
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ calendar.value.open();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
})
|
|
|
}
|
|
@@ -343,6 +347,7 @@ onMounted(() => {
|
|
|
flex-direction: column;
|
|
|
margin-bottom: 48rpx;
|
|
|
}
|
|
|
+
|
|
|
.grid-icon {
|
|
|
width: 96rpx;
|
|
|
height: 96rpx;
|
|
@@ -353,10 +358,9 @@ onMounted(() => {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
+
|
|
|
.service-img {
|
|
|
width: 48rpx;
|
|
|
height: 48rpx;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</style>
|