Browse Source

bug修复

chenjj 4 days ago
parent
commit
e7fb93e3d7

+ 102 - 65
components/Client/new_file.vue

@@ -19,11 +19,10 @@
         <up-toast ref="uToastRef" />
 
         <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>
+          <!-- 背景图片 -->
+          <image src="/static/img/14147@2x.png" class="background-image" mode="aspectFill" />
+
+          <!-- 左侧轮播图 -->
           <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">
@@ -32,6 +31,15 @@
               </view>
             </swiper-item>
           </swiper>
+
+          <!-- 右侧内容区域 -->
+          <view class="content-wrapper">
+            <view class="title-button-row">
+              <view class="paiBanTitle">我的排班</view>
+              <button class="paiBanBtn" @click="DataInit">去管理排班</button>
+            </view>
+            <view class="paiBanDesc">管理排班时间,合理分配服务订单</view>
+          </view>
         </view>
       </view>
     </template>
@@ -299,37 +307,105 @@ onMounted(() => {
 }
 
 .paiBanSty {
+  position: relative;
+  margin-top: 30rpx;
+  display: flex;
+  flex-direction: row;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+  box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.04);
+  overflow: hidden;
+  height: 300rpx;
+
+  .background-image {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+    z-index: 0;
+  }
+
+  .zhiYuanZheSwiper {
+    width: 196rpx;
+    height: 240rpx;
+    border-radius: 38rpx;
+    overflow: hidden;
+    margin: 30rpx;
+    z-index: 1;
+    position: relative;
+  }
+
+  .swiper-item-container {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    transition: all 0.3s;
+
+    &.active-swiper {
+      transform: scale(1);
+    }
+  }
+
+  .zhiYuanZhe {
+    width: 100%;
+    height: 100%;
+    border-radius: 38rpx;
+    box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
+  }
+
+  .content-wrapper {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    padding: 30rpx;
+    z-index: 1;
+    position: relative;
+  }
+
+  .title-button-row {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 12rpx;
+    width: 100%;
+    margin-top: 129rpx;
+    margin-left: 0rpx;
+  }
+
   .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;
+    width: 136rpx;
+    height: 40rpx;
+
+
+    position: relative;
+    left: -2rpx;
+    top: 17rpx;
   }
 
   .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;
+    margin-top: 8rpx;
+    left: -2rpx;
+    position: relative;
   }
 
   .paiBanBtn {
     width: 200rpx;
-    height: 60rpx;
+    height: 70rpx;
     display: flex;
     justify-content: center;
     align-items: center;
@@ -337,58 +413,19 @@ onMounted(() => {
     background: #D94342;
     font-family: PingFang SC;
     font-size: 28rpx;
-    font-weight: 600;
+    font-weight: 500;
     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;
+    color: #FFFFFF;
+    border: none;
+    padding: 0;
+    position: relative;
+    top: -20rpx;
+    left: 4rpx;
   }
+}
 
-  .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;
-    }
-  }
+.home-ranking {}
 
-  .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;

+ 6 - 1
pages/common/orderList/userItem.vue

@@ -30,7 +30,7 @@
       <view class="item-box">
         <view class="item-btns">
           <view v-for="item in btns" :key="item.name">
-            <view class="btn-m" v-if="item.show ? item.show(data) : true" :type="item.type" text="取消"
+            <view :class="['btn-m', (item.name === '取消' || item.name === '退款') ? 'btn-cancel-refund' : '']" v-if="item.show ? item.show(data) : true" :type="item.type" text="取消"
               @click="item.onClick(data)">
               <image v-if="item.name === '查看'" src="/static/img/组 14145@1x.png" class="btn-icon"></image>
               <image v-if="item.name === '沟通'" src="/static/img/容器 165@1x.png" class="btn-icon"></image>
@@ -289,6 +289,11 @@ const handlClick = (item) => {
           margin-right: 8rpx;
         }
       }
+      
+      .btn-cancel-refund {
+        background: #E9E9E9;
+        color: #333333;
+      }
     }
   }
 }

+ 1 - 1
pages/index.vue

@@ -380,7 +380,7 @@ onUnload(() => { })
   width: 100%;
   border-radius: 20rpx 20rpx 0rpx 0rpx;
   overflow: hidden;
-  background: #FFF9F3;
+  background: #FFFFFF;
 }
 
 /* 底部安全区域 */

+ 21 - 2
pages_classify/pages/orderItem/orderdetails.vue

@@ -115,9 +115,14 @@
       <up-card
         v-for="(item, index) in listData.secondOrderList"
         :key="index"
-        :title="'订单号:' + item.secondOutTradeNo"
-        :head-style="{ height: '80rpx', padding: '20rpx' }"
+        :title="'订单号'"
       >
+        <template #head>
+          <view class="custom-order-title">
+            <text>订单号:</text>
+            <text class="order-number">{{ item.secondOutTradeNo }}</text>
+          </view>
+        </template>
         <template #body>
           <view class="list-item">
             <image
@@ -383,4 +388,18 @@ onMounted(() => {
   color: #999;
   padding: 30rpx;
 }
+
+.custom-order-title {
+  display: flex;
+  align-items: center;
+  font-size: 28rpx;
+  color: #303133;
+  width: 100%;
+  padding: 10rpx 0;
+}
+
+.order-number {
+  word-break: break-all;
+  flex: 1;
+}
 </style>

+ 72 - 9
pages_home/pages/details/index.vue

@@ -43,14 +43,17 @@
 
             <view class="status-card">
                 <view class="card-title">身份证</view>
-                <view class="card-imgs">
-                    <img class="upload-img" v-for="(item, index) in idCardPicture_img" :key="index + 'card'" :src="item"
-                        :alt="item.fileName" srcset="">
+                
+                <view class="id-card-container" v-if="idCardImages.hasSeparateImages">
+                    <view class="id-card-item" v-if="idCardImages.front">
+                        <img class="id-card-img" :src="idCardImages.front" alt="身份证正面">
+                    </view>
+                    <view class="id-card-item" v-if="idCardImages.back">
+                        <img class="id-card-img" :src="idCardImages.back" alt="身份证背面">
+                    </view>
                 </view>
-
             </view>
 
-
             <view class="status-card">
                 <view class="card-title">资格证书</view>
                 <view class="card-imgs">
@@ -76,11 +79,29 @@ import { add, getVolunteerInfo } from "@/api/volunteer";
 import Picker from '@/pages_home/components/picker/index.vue'
 import { getTreeList } from '@/api/volunteer'
 import { useDict } from '@/utils/dict.js';
+
+// 身份证图片处理组合式函数
+const useIdCardImages = (detailsData) => {
+    const idCardImages = computed(() => ({
+        combined: detailsData.value.idCardPicture ? detailsData.value.idCardPicture.split(',') : [],
+        front: detailsData.value.idCardPictureFront || '',
+        back: detailsData.value.idCardPictureBack || '',
+        hasSeparateImages: !!(detailsData.value.idCardPictureFront || detailsData.value.idCardPictureBack)
+    }))
+    
+    return {
+        idCardImages
+    }
+}
+
 const details = ref({});
 const data = ref({});
 const options = ref([])
 const pickerRef = ref(null);
 
+// 使用组合式函数
+const { idCardImages } = useIdCardImages(details);
+
 // const {
 //     volunteer_app_status
 // } = useDict('volunteer_app_status');
@@ -142,10 +163,11 @@ const volunteerPicture_img = computed(() => {
     return details.value.volunteerPicture ? details.value.volunteerPicture.split(',') : []
 })
 
-//个人身份证
-const idCardPicture_img = computed(() => {
-    return [details.value.idCardPictureFront,details.value.idCardPictureBack]
-})
+
+// const idCardPicture_img = computed(() => {
+//     return details.value.idCardPicture ? details.value.idCardPicture.split(',') : []
+// })
+
 //职业、资质证书
 const certificationPicture_img = computed(() => {
     return details.value.certificationPicture ? details.value.certificationPicture.split(',') : []
@@ -368,4 +390,45 @@ onLoad((options) => {
         margin-bottom: 24rpx;
     }
 }
+
+.card-subtitle {
+    font-size: 28rpx;
+    font-weight: 500;
+    letter-spacing: 0rpx;
+    line-height: 40rpx;
+    color: rgba(107, 114, 128, 1);
+    margin-bottom: 16rpx;
+    text-align: center;
+}
+
+.id-card-container {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+    
+    @media screen and (min-width: 768px) {
+        flex-direction: row;
+        justify-content: space-around;
+    }
+}
+
+.id-card-item {
+    margin-bottom: 32rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+    
+    @media screen and (min-width: 768px) {
+        width: 48%;
+    }
+}
+
+.id-card-img {
+    width: 100%;
+    max-width: 600rpx;
+    border-radius: 12rpx;
+    box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
+}
 </style>