jiayubo 3 miesięcy temu
rodzic
commit
fbcae899e5

+ 11 - 0
api/volunteerDetailsApi/details.js

@@ -127,3 +127,14 @@ export function coreUsersOrdersPayCancel(data) {
     data: data,
   })
 }
+
+
+// 获取志愿者图片列表
+export function volunteerVolunteerPicture(params) {
+  return request({
+    url: '/core/volunteer/info/volunteerPicture',
+    method: 'get',
+    params: params,
+  })
+}
+

+ 152 - 5
components/Client/new_file.vue

@@ -18,9 +18,20 @@
         </up-grid>
         <up-toast ref="uToastRef" />
 
-        <view @click="DataInit" class="paiban-sty" v-if="userType == 2">
-          <image src="/static/serverImg/home/icon/icon8.png" class="service-img" mode="aspectFit" />
-          排班管理
+        <view class="paiBanSty" v-if="userType == 2">
+          <!-- <image src="/static/serverImg/home/icon/icon8.png" class="service-img" mode="aspectFit" /> -->
+          <image src="/static/img/14147@2x.png" class="images" mode="aspectFit" />
+          <view class="paiBanTitle">我的排班</view>
+          <view class="paiBanDesc">管理排班时间,合理分配服务订单</view>
+          <button class="paiBanBtn" @click="DataInit">去管理排版</button>
+          <swiper class="zhiYuanZheSwiper" vertical circular autoplay :interval="4000" :duration="800"
+            :previous-margin="'20rpx'" :next-margin="'20rpx'" @change="onSwiperChange">
+            <swiper-item v-for="(imgUrl, index) in volunteerImages" :key="index">
+              <view class="swiper-item-container" :class="{ 'active-swiper': currentSwiperIndex === index }">
+                <image :src="imgUrl" class="zhiYuanZhe" mode="aspectFill" />
+              </view>
+            </swiper-item>
+          </swiper>
         </view>
       </view>
     </template>
@@ -47,7 +58,7 @@ import {
 } from '@/api/volunteer.js'
 import {
   volunteerSeachgetTreeList,
-  volunteerDataList
+  volunteerVolunteerPicture
 } from "@/api/volunteerDetailsApi/details.js"
 import { getTreeList } from '@/api/volunteer'
 import Calendar from '../../components/uni-calendar/components/uni-calendar/uni-calendar.vue'
@@ -70,7 +81,26 @@ const selected = ref([])
 
 const serveiceList = ref([]);
 
+// 志愿者图片
+const volunteerImages = ref([]);
+
+const getVolunteerImages = () => {
+  volunteerVolunteerPicture({}).then(res => {
+    console.log('res', res);
+    if (Array.isArray(res)) {
+      volunteerImages.value = res;
+    } else if (res.code === 200 && res.data) {
+      volunteerImages.value = res.data;
+    }
+  })
+}
+// 当前显示的轮播图索引
+const currentSwiperIndex = ref(0);
 
+// 轮播图切换事件
+const onSwiperChange = (e) => {
+  currentSwiperIndex.value = e.detail.current;
+};
 
 // 宫格点击事件
 const handleGridClick = async (service) => {
@@ -213,13 +243,14 @@ const DataInit = () => {
 
 onMounted(() => {
   init();
+  getVolunteerImages();
 });
 </script>
 
 <style scoped lang="scss">
 .grid-box {
   width: 226rpx;
-    height: 116rpx;
+  height: 116rpx;
   display: flex;
   flex-direction: row;
   align-items: center;
@@ -247,6 +278,7 @@ onMounted(() => {
   flex-direction: column;
   align-items: flex-start;
   justify-content: center;
+
   .grid-text {
     width: 112rpx;
     height: 36rpx;
@@ -271,4 +303,119 @@ onMounted(() => {
     margin-top: 10rpx;
   }
 }
+
+.paiBanSty {
+  .paiBanTitle {
+    width: 136rpx;
+    height: 40rpx;
+    font-family: PingFang SC;
+    font-size: 34rpx;
+    font-weight: 600;
+    line-height: 40rpx;
+    letter-spacing: normal;
+    color: rgba(0, 0, 0, 0.8);
+    position: absolute;
+    top: 1072rpx;
+    left: 278rpx;
+  }
+
+  .paiBanDesc {
+    width: 390rpx;
+    height: 40rpx;
+    font-family: PingFang SC;
+    font-size: 26rpx;
+    font-weight: normal;
+    line-height: 40rpx;
+    letter-spacing: normal;
+    color: rgba(0, 0, 0, 0.5);
+    position: absolute;
+    top: 1136rpx;
+    left: 278rpx;
+  }
+
+  .paiBanBtn {
+    width: 200rpx;
+    height: 60rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    border-radius: 36rpx;
+    background: #D94342;
+    font-family: PingFang SC;
+    font-size: 28rpx;
+    font-weight: 600;
+    line-height: 30rpx;
+    letter-spacing: normal;
+    color: #FFF9F3;
+    position: absolute;
+    top: 1035rpx;
+    left: 472rpx;
+  }
+
+  .images {
+    width: 750rpx;
+  }
+
+  .zhiYuanZheSwiper {
+    width: 205rpx;
+    height: 298rpx;
+    position: absolute;
+    top: 876rpx;
+    left: 43rpx;
+    border-radius: 38rpx;
+    overflow: hidden;
+  }
+
+  .swiper-item-container {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    transition: all 0.5s ease;
+    opacity: 0.8;
+    transform: scale(0.95);
+    
+    &.active-swiper {
+      opacity: 1;
+      transform: scale(1);
+      animation: fadeIn 0.8s ease forwards;
+    }
+  }
+
+  .zhiYuanZhe {
+    width: 100%;
+    height: 100%;
+    border-radius: 38rpx;
+    transition: all 0.5s ease;
+    box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
+    display: block; /* 确保没有额外的空间 */
+  }
+}
+.home-ranking{
+  
+}
+@keyframes fadeIn {
+  from {
+    opacity: 0;
+    transform: scale(0.9) translateY(10rpx);
+  }
+
+  to {
+    opacity: 1;
+    transform: scale(1) translateY(0);
+  }
+}
+
+@keyframes fadeOut {
+  from {
+    opacity: 1;
+    transform: scale(1) translateY(0);
+  }
+
+  to {
+    opacity: 0.8;
+    transform: scale(0.95) translateY(-10rpx);
+  }
+}
 </style>

+ 1 - 1
manifest.json

@@ -61,7 +61,7 @@
             "subPackages" : true
         },
         "lazyCodeLoading" : "requiredComponents",
-        "requiredPrivateInfos" : [ "chooseLocation","choosePoi","getFuzzyLocation"],
+        "requiredPrivateInfos" : [ "chooseLocation","choosePoi","getFuzzyLocation","getLocation"],
         "permission" : {
             "scope.userLocation": {
                 "desc": "你的位置信息将用于小程序定位"

+ 10 - 134
pages/common/orderList/userItem.vue

@@ -1,9 +1,9 @@
 <template>
   <view class="item">
-    <view class="item-img">
+    <!-- <view class="item-img">
       <up-image :show-loading="true" :src="data.volunteerPicture"></up-image>
-    </view>
-    <view class="item-info">
+    </view> -->
+    <!-- <view class="item-info">
       <view class="item-title-box">
         <view class="item-title">
           <view class="item-name">
@@ -31,7 +31,7 @@
           </view>
         </view>
       </view>
-    </view>
+    </view> -->
   </view>
 </template>
 
@@ -105,135 +105,11 @@ const handlClick = (item) => {
 </script>
 
 <style lang="scss" scoped>
-.item {
-  border-radius: 18rpx;
-  background: #FFFFFF;
-  box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.04);
-
-  margin-bottom: 24rpx;
-  padding: 32rpx;
-  display: flex;
-  align-items: flex-start;
-
-  .item-img {
-    width: 122rpx;
-    height: 122rpx;
-    border-radius: 200rpx;
-    overflow: hidden;
-    
-    :deep(image) {
-      width: 100%;
-      height: 100%;
-      object-fit: cover;
-    }
-  }
-
-  .item-info {
-    display: flex;
-    flex-direction: column;
-    flex: 1;
-    justify-content: space-between;
-    height: 100%;
-
-    .item-title-box {
-      .item-title {
-        font-size: 30rpx;
-        font-weight: 400;
-        line-height: 45rpx;
-        color: rgba(26, 26, 26, 1);
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 15rpx;
-      }
-    }
-
-    .item-de {
-      display: flex;
-      font-size: 26rpx;
-      font-weight: 400;
-      line-height: 39rpx;
-      color: rgba(153, 153, 153, 1);
-      display: flex;
-      align-items: center;
-      justify-content: flex-start;
-    }
-
-    .item-time {
-      font-size: 26rpx;
-      font-weight: 400;
-      letter-spacing: 0rpx;
-      line-height: 39rpx;
-      color: rgba(153, 153, 153, 1);
-      margin-bottom: 20rpx;
-    }
-
-    .item-price {
-      font-size: 30rpx;
-      font-weight: 400;
-      letter-spacing: 0rpx;
-      line-height: 45rpx;
-      color: rgba(203, 26, 28, 1);
-      margin-bottom: 16rpx;
-    }
-
-    .item-box {
-      display: flex;
-      align-items: center;
-      justify-content: flex-end;
-
-
-      .item-btns {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-
-        .btn-s {
-          font-size: 26rpx;
-          font-weight: 400;
-          color: rgba(221, 94, 69, 1);
-          text-align: center;
-          padding: 16rpx 0;
-          width: 156.03rpx;
-          border-radius: 8rpx;
-          background: rgba(0, 0, 0, 0);
-          display: flex;
-          justify-content: center;
-          border: 0rpx solid rgba(221, 94, 69, 1);
-        }
-
-        .btn-m {
-          border-radius: 59rpx;
-          font-size: 26rpx;
-          text-align: left;
-          margin-left: 24rpx;
-          display: flex;
-          justify-content: center;
-          color: #dd5e45;
-          padding: 12rpx 32rpx;
-          border: 1px solid;
-          border-radius: 59rpx;
-        }
-
-
-      }
-    }
-  }
-}
-
-.item-time-text {
-  color: #dd5e45;
-}
-
-.skill-description {
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  /* 限制两行 */
-  -webkit-box-orient: vertical;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  line-height: 1.4;
-  min-height: 2.8em;
-  /* 两行高度 */
+.item{
+    height: 347rpx;
+    border-radius: 18rpx;
+      // background: #FFFFFF;
+      background: red;
+      box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.04);
 }
 </style>

+ 0 - 10
pages/common/rankingList/index.vue

@@ -7,7 +7,6 @@
                 <view class="ranking-item-info">
                     <view class="ranking-item-name">{{ item.name }}</view>
                     <view class="ranking-item-tag flex-center">{{ item.tag }}</view>
-                    <view class="ranking-item-text">{{ item.text }}</view>
                     <view class="ranking-item-dese">{{ item.dese }}</view>
                 </view>
 
@@ -94,15 +93,6 @@ const datas = [
 
             }
 
-            .ranking-item-text {
-                font-size: 28rpx;
-                font-weight: 400;
-                line-height: 40rpx;
-                color: rgba(102, 102, 102, 1);
-                margin-bottom: 16rpx;
-
-            }
-
             .ranking-item-dese {
                 font-size: 24rpx;
                 font-weight: 400;

+ 11 - 10
pages/index.vue

@@ -1,9 +1,7 @@
 <template>
   <view>
     <!-- 首页顶部定位区域 -->
-    <view class="home-banner" 
-    :class="{ 'home-banner-with-bg': showAddressBg }"
-    >
+    <view class="home-banner" :class="{ 'home-banner-with-bg': showAddressBg }">
       <view class="home-banner-left" @click="cityClick">
         <img src="@/static/uview/common/map-pin-fill@1x.png" alt="" class="map-pin-fill">
         <text class="address-text">{{ data.address.name }}</text>
@@ -16,19 +14,19 @@
       </view>
     </view>
 
-    <view class="Wrapper-Top">
       <view class="home-grid">
         <Client />
       </view>
-    </view>
 
-    <view class="home-swiper">
+    <view class="home-swiper" v-if="userType == 1">
       <view v-if="ValueZone.length > 0">
         <up-swiper :list="ValueZone" :indicator="false" indicatorMode="line" circular></up-swiper>
       </view>
     </view>
 
-    <view class="home-ranking">
+
+
+    <view class="home-ranking" :class="{ 'no-margin': userType === 2 }">
       <ServIces :leftList="leftList" :rightList="rightList" :ValueZoneSwiper="ValueZoneSwiper" v-if="userType == 1">
       </ServIces>
       <RankingList v-if="userType === 2" />
@@ -39,6 +37,7 @@
       v-if="userType == 1" />
 
     <custom-tab-bar page="home" class="customTabBar" />
+
     <view class="safe-area-bottom"></view>
   </view>
 </template>
@@ -134,9 +133,7 @@ const getList = async () => {
       pageSize: pages.value.pageSize,
       serviceCategory: pages.value.serviceCategory || '',
       businessManagementId: 0,
-      provinceCode: data.address.cityCode?.code[0],
-      cityCode: data.address.cityCode?.code[1],
-      districtCode: data.address.cityCode?.code[2],
+     
     }
     const res = await volunteerinfolist(params)
 
@@ -361,6 +358,10 @@ onUnload(() => { })
   margin-left: 25rpx;
   margin-right: 25rpx;
   margin-bottom: 120rpx;
+  
+  &.no-margin {
+    margin-top: 0;
+  }
 }
 
 /* 底部安全区域 */

BIN
static/img/14147@2x.png


BIN
static/img/容器@1x (1).png