浏览代码

Merge branch 'dev-1.1.0' into jyb_20250506_dev

jiayubo 3 月之前
父节点
当前提交
340bd8b30f

+ 1 - 1
components/Client/new_file.vue

@@ -100,7 +100,7 @@ const selected = ref([])
 const serveiceList = ref([]);
 
 // 志愿者图片
-const volunteerImages = ref([]);
+const volunteerImages = ref(['/static/serverImg/home/zyz_pb.png']);
 
 const getVolunteerImages = () => {
   volunteerVolunteerPicture({}).then(res => {

+ 1 - 1
pages/classify.vue

@@ -163,7 +163,7 @@ function btnClick(row, type) {
   uni.setStorageSync('tabKey', tabKey.value);//存储当前tab的下标
   if (type === 1) {
     uni.navigateTo({
-      url: `/pages_classify/pages/order/index?secondOrderId=${row.secondOrderId}`,
+      url: `/pages_classify/pages/order/index?secondOrderId=${row.secondOrderId}&type=details`,
     })
     return
   }

+ 1 - 1
pages/common/orderList/listItem.vue

@@ -5,7 +5,7 @@
             <up-image :show-loading="true" :src="data.avatar" width="112rpx" height="112rpx"></up-image>
         </view>
         <view class="item-info">
-            <view class="item-title-box">
+            <view class="item-title-box" @click="onClick(1)">
                 <view class="item-title">
                     <view class="item-name">
                         {{ data.name }}

+ 6 - 3
pages/common/rankingList/index.vue

@@ -6,7 +6,7 @@
         <view class="ranking-title-text">本月热门服务</view>
       </view>
 
-      <view class="ranking-list">
+      <view class="ranking-list" v-if="gitList && gitList.length > 0">
         <view v-for="(item, index) in gitList" :key="index" class="ranking-list-item">
           <image :src="item.businessIcon" mode="widthFix" class="ranking-list-item-img"></image>
           <view class="ranking-list-item-content">
@@ -28,6 +28,9 @@
           </view>
         </view>
       </view>
+      <view v-else class="ranking-list">
+          <NoneView value="暂无服务数据" />  
+      </view>
     </view>
   </view>
 </template>
@@ -35,14 +38,13 @@
 <script setup>
 import { userSortShotService } from '@/api/VolunteerList.js'
 import { onMounted, ref } from 'vue';
-
+import NoneView from '@/components/NoneView/index.vue'
 const userType = uni.getStorageSync('userType'); //读取本地存储
 const gitList = ref([])
 
 const gitData = async () => {
   if (userType === 2) {
     const res = await userSortShotService()
-    console.log(res, '>>>>>>>>>>>res')
     gitList.value = res.data
   }
 }
@@ -78,6 +80,7 @@ onMounted(() => {
 }
 
 .ranking-list {
+  min-height: 500rpx ;
   .ranking-list-item {
     display: flex;
     padding: 30rpx 0;

+ 1 - 5
pages_classify/components/PositioningMap/index.vue

@@ -1,7 +1,7 @@
 <template>
     <view>
         <map id="wxMapId" :longitude="mapData.location.lng" :latitude="mapData.location.lat" :markers="markers"
-            style="width: 100%; height: 50vh;"></map>
+            style="width: 100%; height: 40vh;"></map>
     </view>
 </template>
 
@@ -33,7 +33,6 @@ const mapData = ref({
 let qqmapsdk = null;
 
 onMounted(() => {
-    console.log('mapKey-------------->',mapKey,QQMapWX);
     
     mapCtx.value = wx.createMapContext('wxMapId');
 
@@ -41,7 +40,6 @@ onMounted(() => {
         key: mapKey
     });
 
-    console.log('props',props.address);
     
     // 如果地址已经传入,立即进行地址转经纬度
     if (props.address) {
@@ -58,12 +56,10 @@ watch(() => props.address, (newAddress) => {
 
 // 地址转经纬度
 const geocodeAddress = (address) => {
-    console.log('地址', address);
 
     qqmapsdk.geocoder({
         address: props.address,
         success: function (res) {
-            console.log('初始化地图上下文', res);
             mapData.value = res.result;
             markers.value = [{ 
                 latitude: res.result.location.lat, 

+ 24 - 44
pages_classify/pages/handle/index.vue

@@ -8,42 +8,30 @@
       <view class="user-info order-card">
         <view class="handle-user">
           <view class="handle-user-left">
-            <img
-              src="/static/serverImg/mine/user.png"
-              alt=""
-              style="width: 96rpx; height: 96rpx; margin-right: 32rpx"
-            />
+            <img :src="detaile.avatar" alt=""
+              style="width: 96rpx; height: 96rpx; margin-right: 32rpx" />
             <view class="handle-user-info">
-              <view class="user-name">{{ detaile.name }}</view>
-              <view class="user-id" style="display: flex"
-                >服务类别:<dict-tag
-                  :options="lrr_service_category"
-                  :value="detaile.serviceCategory"
-              /></view>
+              <view class="user-name">{{ detaile.clientName }}</view>
+              <view class="user-id" style="display: flex">服务类别:{{ detaile.businessTireName }}</view>
             </view>
           </view>
-          <view class="user-phone" @click="onPhone(detaile.telephone)">
+          <view class="user-phone" @click="onPhone(detaile.clientPhoneNumber)">
             <up-icon name="phone" color="#fff" size="25"></up-icon>
           </view>
         </view>
 
         <view class="handle-adress">
-          <up-icon
-            name="map"
-            color="rgba(156, 163, 175, 1)"
-            size="20"
-          ></up-icon>
+          <up-icon name="map" color="rgba(156, 163, 175, 1)" size="20"></up-icon>
           <view class="adress-text">{{ detaile.address }}</view>
-          <up-icon
-            name="pushpin"
-            color="rgba(221, 94, 69, 1)"
-            size="25"
-          ></up-icon>
+          <!-- <up-icon name="pushpin" color="rgba(221, 94, 69, 1)" size="25"></up-icon> -->
         </view>
         <view>
-          <view>服务次数:{{ detaile.singleQuantity }}次</view>
-          <view>服务开始时间:{{ detaile.workStartTime }}</view>
-          <view>服务结束时间:{{ detaile.workEndTime }}</view>
+          <view class="handle-remark">
+            <text class="remark-title">服务次数:{{detaile.singleQuantity }}次</text>
+          </view>
+          <view class="handle-remark">
+            <text class="remark-title">服务时间: {{ detaile.workDate + '  '+  detaile.workStartTime }}</text>
+          </view>
         </view>
         <view class="handle-remark">
           <view class="remark-title">备注</view>
@@ -52,7 +40,7 @@
       </view>
     </view>
     <view class="footer-g">
-      <view class="handle-start" v-if="orderStatus && serveTimes">
+      <view class="handle-start" v-if="orderStatus && detaile.serviceStartTime && dateData">
         服务已开始:<text class="handle-time">{{ dateData }}</text>
       </view>
       <Slide ref="verify" @change="change" :sliderText="slideData" />
@@ -183,15 +171,14 @@ const getOrderDetail = async () => {
       secondOrderId: secondOrderId.value,
     })
 
-    // Update to match the actual data structure where properties are at the top level
-    detaile.value = { ...res.data, serveTimes: res.data.updateTime || null }
+    detaile.value = res.data
 
     if (res.data.orderStatus === '3') {
       orderStatus.value = true
     }
-    if (res.data.updateTime) {
+    if (res.data.serviceStartTime) {
       timer = setInterval(() => {
-        const timeDiff = Math.abs(new Date() - new Date(res.data.updateTime))
+        const timeDiff = Math.abs(new Date() - new Date(res.data.serviceStartTime))
         const units = {
           day: Math.floor(timeDiff / (1000 * 60 * 60 * 24)),
           hour: Math.floor(timeDiff / (1000 * 60 * 60)),
@@ -263,19 +250,7 @@ const change = async (e) => {
       // uni.showLoading({
       //   title: '获取位置信息...'
       // })
-      
-      // // 获取结束服务时的位置
-      // const locationData = await getCurrentLocation().catch(err => {
-      //   uni.hideLoading()
-      //   verify.value.initialization()
-      //   throw new Error('无法获取位置信息,请确保已开启位置权限')
-      // })
-      
-      // // 构建参数字符串
-      // const params = `secondOrderId=${secondOrderId.value}&serviceFinishLongitude=${locationData.longitude.toString()}&serviceFinishLatitude=${locationData.latitude.toString()}`
-      
-      // // 调用结束服务接口,通过URL查询参数传递位置信息
-      // await getVolunteerFinishSecondOrder(params)
+
       uni.showToast({
         title: '操作成功',
         icon: 'success',
@@ -336,6 +311,9 @@ onUnload(() => {
   bottom: 280rpx;
   overflow-y: auto;
 
+  .service-info {
+    // height: 360px;
+  }
   .order-card {
     border-radius: 8px;
     background: rgba(255, 255, 255, 1);
@@ -463,6 +441,9 @@ onUnload(() => {
     flex: 1;
     text-align: left;
     padding-left: 24rpx;
+    font-size: 32rpx;
+    font-weight: 400;
+    color: rgba(75, 85, 99, 1);
   }
 }
 
@@ -482,7 +463,6 @@ onUnload(() => {
     padding: 32rpx;
     font-size: 32rpx;
     font-weight: 400;
-    line-height: 48rpx;
     color: rgba(75, 85, 99, 1);
   }
 }

+ 16 - 9
pages_classify/pages/order/index.vue

@@ -6,9 +6,7 @@
 			<view class="user-box">
 				<view class="info-list">
 					<view>被服务人员:{{ detaile.clientName }}</view>
-					<view style="display: flex;">服务类别:
-						{{ detaile.businessTireName }}
-					</view>
+					<view style="display: flex;">服务类别:{{ detaile.businessTireName }}</view>
 					<view @click="onPhone">电话号码:<label class="phone">{{ detaile.clientPhoneNumber.replace(/(\d{3})\d{4}(\d{4})/,  '$1****$2')  }}</label></view>
 					<view>地址:{{ detaile.address }}</view>
 				</view>
@@ -20,7 +18,7 @@
 				{{ detaile.remark || '暂无备注信息'}}
 			</view>
 		</view>
-		<view class="service-info order-card" v-if="detaile.orderStatus === '3'">
+		<view class="service-info order-card" v-if="isStatus">
 			<view class="font-title ">反馈信息</view>
 			<view class="info-list">
 				<up-textarea v-model="detaile.volunteerReview" placeholder="请输入内容"></up-textarea>
@@ -32,7 +30,7 @@
 				<view class="font-title">志愿者反馈信息</view>
 				<view class="user-box">
 					<view class="info-list">
-						<view class="info-item">{{ detaile.volunteerReview }}</view>
+						<view class="info-item">{{ detaile.volunteerReview || '暂无志愿者反馈信息'}}</view>
 					</view>
 				</view>
 				<view class="upload-box-see">
@@ -61,22 +59,22 @@
 
 
 
-		<view class="service-info order-card" v-if="detaile.orderStatus === '3'">
+		<view class="service-info order-card" v-if="isStatus">
 			<view class="font-title">图片上传</view>
 			<view class="upload-box">
 				<view class="upload-img-item" v-for="(item, index) in fileList" :key="item.url">
 					<view class="delete-icon" @click="deletePic(index)"><up-icon name="close-circle-fill"
-							color="#f64a1f" size="18" v-if="detaile.orderStatus === '3'"></up-icon></view>
+							color="#f64a1f" size="18" v-if="isStatus"></up-icon></view>
 					<img class="upload-img" :src="item.url" :alt="item.fileName" srcset="">
 				</view>
 				<img src="/static/img/upload.png" alt="" class="upload-img" @click="uploadClick('img')"
-					v-if="fileList.length < 10 && detaile.orderStatus === '3'">
+					v-if="fileList.length < 10 && isStatus">
 			</view>
 		</view>
 
 
 
-		<view class=" footer-g" v-if="detaile.orderStatus === '3'">
+		<view class=" footer-g" v-if="isStatus">
 			<view class="status-btn" @click="submit">确定结束</view>
 		</view>
 	</view>
@@ -100,6 +98,14 @@ const {
 	lrr_service_category
 } = useDict('lrr_service_category');
 
+const isEnd = ref(false);//详情、结束服务
+
+const isStatus = computed(() => {
+	console.log('isEnd.value',isEnd.value,detaile.value.orderStatus);
+	
+	return isEnd.value ? !isEnd.value : (detaile.value.orderStatus === '3')
+})
+
 // 删除图片
 const deletePic = (index) => {
 	fileList.value.splice(index, 1);
@@ -297,6 +303,7 @@ const onSubmit = async () => {
 onLoad((options) => {
 	console.log('options received:', options);
 	secondOrderId.value = options.secondOrderId;
+	isEnd.value = options.type && options.type ==='details';
 	console.log('secondOrderId set to:', secondOrderId.value);
 	// orderId.value = '1911685346559660034';
 

二进制
static/serverImg/home/zyz_pb.png