chenjj 3 月之前
父節點
當前提交
2927548184

+ 8 - 3
components/CustomTabBar/index.vue

@@ -7,8 +7,8 @@
                         <view class="message-style" v-if="item.key === 'chat' && messageCount > 0">
                         </view>
                         <view v-if="item.key === 'chat'" class="chat-box">
-                             <image v-if="item.key != selectIndex" class="img" :src="item.iconPath"></image>
-                             <image v-else class="img" :src="item.selectedIconPath"></image>
+                             <image v-if="item.key != selectIndex" class="img2" :src="item.iconPath"></image>
+                             <image v-else class="img2" :src="item.selectedIconPath"></image>
                         </view>
                        <template v-else>
                             <image v-if="item.key != selectIndex" class="img" :src="item.iconPath"></image>
@@ -171,7 +171,7 @@ export default {
 <style lang="scss">
 .tab_bar {
     width: 100vw;
-    height: 160rpx;
+    height: 190rpx;
     position: fixed;
     bottom: 0rpx;
     /* 模糊大小就是靠的blur这个函数中的数值大小 */
@@ -206,6 +206,11 @@ export default {
                 text-align: center;
 
                 .img {
+                    width: 70rpx;
+                    height: 70rpx;
+                }
+
+                .img2 {
                     width: 50rpx;
                     height: 50rpx;
                 }

+ 1 - 1
pages/chat.vue

@@ -266,7 +266,7 @@ onMounted(() =>{
     bottom: 0;
     left: 0px;
     right: 0px;
-    padding-bottom: 150rpx;
+    padding-bottom: 190rpx;
     background: #FAF8F7;
 
     .scroll-view-class {

+ 11 - 8
pages/classify.vue

@@ -99,10 +99,8 @@ const pages = ref({
   total: null,
 })
 async function getList(type) {
-  console.log("TCL: getList -> type", type)
   try {
 
-    console.log(data.value.length, pages.value.total);
     if (type === 'top') {
       data.value = [];
       pages.value.total = 0;
@@ -116,9 +114,9 @@ async function getList(type) {
         return;
       }
     } else {
-      uni.showLoading({
-        title: '数据加载中...',
-      })
+      // uni.showLoading({
+      //   title: '数据加载中...',
+      // })
     }
 
 
@@ -152,7 +150,7 @@ async function getList(type) {
       }
     }, 500)
 
-    type !== 'bottom' && uni.hideLoading()
+    // type !== 'bottom' && uni.hideLoading()
   }
 }
 
@@ -162,6 +160,7 @@ async function getList(type) {
  * 3:开始或结束服务
  */
 function btnClick(row, type) {
+  uni.setStorageSync('tabKey', tabKey.value);//存储当前tab的下标
   if (type === 1) {
     uni.navigateTo({
       url: `/pages_classify/pages/order/index?secondOrderId=${row.secondOrderId}`,
@@ -197,7 +196,11 @@ onShow(() => {
   const initIndex = userType === 1 ? 2 : 1;//默认选中待服务
 
   const params = getApp().globalData.switchTabParams || {}
-  tabKey.value = params.tabKey || initIndex;
+
+  const storage_tabKey = uni.getStorageSync('tabKey'); //读取本地存储
+
+  tabKey.value = params.tabKey || storage_tabKey || initIndex;//优先显示外部传入的tabKey,其次存储在本地的tabKey,最后默认选中待服务
+
   onChange(column.value[tabKey.value])
   // 使用后建议清除参数,避免重复读取
   getApp().globalData.switchTabParams = null
@@ -224,7 +227,7 @@ onShow(() => {
     left: 0px;
     right: 0px;
     background: rgba(245, 245, 245, 1);
-    padding-bottom: 150rpx;
+    padding-bottom: 190rpx;
   }
 }
 </style>

+ 0 - 2
pages/common/orderList/index.vue

@@ -43,12 +43,10 @@ const loadmoreInfo = ref({
 	nomoreText: '已经到底啦~'
 })
 const scrolltolower = () => {
-    console.log('底部');
     emit('refresh','bottom');
 };
 
 const onCustomRefresh = () => {
-    console.log('下拉刷新');
     isRefreshing.value = true;
     emit('refresh','top');
 };

+ 0 - 2
pages/common/orderList/userItem.vue

@@ -57,7 +57,6 @@ const props = defineProps({
 });
 
 const order_status = inject('order_status');
-console.log("TCL: order_status", order_status)
 
 //防抖处理
 const onClick =(record,data)=>{
@@ -70,7 +69,6 @@ const btns = [
   {
     name: '沟通',
     onClick: (e) => {
-      console.log("TCL: e", e)
       uni.navigateTo({
         url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${e.mainOrderId}&conversationType=2`
       });

+ 1 - 1
pages/mine/index.scss

@@ -43,7 +43,7 @@
     bottom: 0;
     background: #FAF8F7;
     overflow-y: auto;
-    padding-bottom: 150rpx;
+    padding-bottom: 190rpx;
 
 
 

+ 5 - 5
pages/mine/index.vue

@@ -24,7 +24,7 @@
 
                             </view>
                         </view>
-                        <img src="/static/serverImg/mine/setting.png" alt="" style="width: 40rpx; height: 40rpx;"
+                        <img src="/static/serverImg/mine/setting.png" alt="" style="width: 60rpx; height: 60rpx;"
                             @click="handLsetTing">
                     </view>
                 </view>
@@ -407,9 +407,9 @@ onMounted(() =>{
 const init = async () => {
     try {
         // uni.hideLoading();
-        uni.showLoading({
-            title: '数据加载中...',
-        })
+        // uni.showLoading({
+        //     title: '数据加载中...',
+        // })
 
         if (userType === 2) {
             const res1 = await getVolunteerAccountInfo()
@@ -435,7 +435,7 @@ const init = async () => {
             icon: 'error',
         })
     } finally {
-        uni.hideLoading()
+        // uni.hideLoading()
     }
 }
 

+ 13 - 13
pages_classify/pages/handle/index.vue

@@ -176,9 +176,9 @@ const slideData = computed(() => {
 
 const getOrderDetail = async () => {
   try {
-    uni.showLoading({
-      title: '数据加载中...',
-    })
+    // uni.showLoading({
+    //   title: '数据加载中...',
+    // })
     const res = await getVolunteerOrderInfo({
       secondOrderId: secondOrderId.value,
     })
@@ -212,20 +212,20 @@ const getOrderDetail = async () => {
       icon: 'error',
     })
   } finally {
-    uni.hideLoading()
+    // uni.hideLoading()
   }
 }
 
 const change = async (e) => {
   if (e.state && !orderStatus.value) {
     try {
-      uni.showLoading({
-        title: '获取位置信息...'
-      })
+      // uni.showLoading({
+      //   title: '获取位置信息...'
+      // })
       
       // 获取开始服务时的位置
       const locationData = await getCurrentLocation().catch(err => {
-        uni.hideLoading()
+        // uni.hideLoading()
         verify.value.initialization()
         throw new Error('无法获取位置信息,请确保已开启位置权限')
       })
@@ -254,15 +254,15 @@ const change = async (e) => {
         icon: 'none'
       })
     } finally {
-      uni.hideLoading()
+      // uni.hideLoading()
     }
   }
   
   if (e.state && orderStatus.value) {
     try {
-      uni.showLoading({
-        title: '获取位置信息...'
-      })
+      // uni.showLoading({
+      //   title: '获取位置信息...'
+      // })
       
       // // 获取结束服务时的位置
       // const locationData = await getCurrentLocation().catch(err => {
@@ -295,7 +295,7 @@ const change = async (e) => {
       })
       verify.value.initialization()
     } finally {
-      uni.hideLoading()
+      // uni.hideLoading()
     }
   }
 }

+ 18 - 13
pages_classify/pages/order/index.vue

@@ -137,9 +137,9 @@ const userPicture = computed(() => {
 
 const getOrderDetail = async () => {
 	try {
-		uni.showLoading({
-			title: '数据加载中...'
-		});
+		// uni.showLoading({
+		// 	title: '数据加载中...'
+		// });
 		const res = await getVolunteerOrderInfo({ secondOrderId: secondOrderId.value });
 		console.log('API response:', res);
 
@@ -170,7 +170,7 @@ const getOrderDetail = async () => {
 			icon: 'error',
 		})
 	} finally {
-		uni.hideLoading();
+		// uni.hideLoading();
 	}
 }
 
@@ -248,13 +248,17 @@ const submit = () => {
 	uni.$u.debounce(onSubmit, 300)
 }
 const onSubmit = async () => {
-	
+	try {
+	// 调用结束服务接口,通过URL查询参数传递位置信息
+	// uni.showLoading({
+    //         title: '正在结束服务...',
+    // })
 	const img_urls = fileList.value.map(item => item.url).join(',');
 	console.log('submit', fileList.value, img_urls);
 
 	// 获取结束服务时的位置
 	const locationData = await getCurrentLocation().catch(err => {
-		uni.hideLoading()
+		// uni.hideLoading()
 		verify.value.initialization()
 		throw new Error('无法获取位置信息,请确保已开启位置权限')
 	})
@@ -262,10 +266,9 @@ const onSubmit = async () => {
 	// 构建参数字符串
 	const params = `volunteerPicture=${img_urls}&volunteerReview=${detaile.value.volunteerReview}&secondOrderId=${secondOrderId.value}&serviceFinishLongitude=${locationData.longitude.toString()}&serviceFinishLatitude=${locationData.latitude.toString()}`
 
-	// 调用结束服务接口,通过URL查询参数传递位置信息
-
-	getVolunteerFinishSecondOrder(params).then(res => {
-		if (res.code === 200) {
+	
+	const res = await getVolunteerFinishSecondOrder(params);
+	if (res.code === 200) {
 			uni.showToast({
 				title: '服务结束',
 				icon: 'success',
@@ -284,9 +287,11 @@ const onSubmit = async () => {
 				icon: 'error',
 			})
 		}
-
-	})
-
+	} catch (error) {
+		console.log("TCL: onSubmit -> error", error)
+	} finally {
+		// uni.hideLoading()
+	}
 }
 
 onLoad((options) => {

+ 5 - 5
pages_home/pages/details/index.vue

@@ -28,7 +28,7 @@
             </view>
 
             <view class="status-card">
-                <view class="card-title">技能简介</view>
+                <view class="card-title">个人简介</view>
                 <view class="card-text"> {{ details.skillDescribe }} </view>
             </view>
 
@@ -224,9 +224,9 @@ function idToIndexs(array, targetId, path = []) {
 async function getRegister() {
 
     try {
-        uni.showLoading({
-            title: '数据加载中...'
-        });
+        // uni.showLoading({
+        //     title: '数据加载中...'
+        // });
         const op_res = await getTreeList({ parentId: data.value.key });
         const res = await getVolunteerInfo({ serviceCategory: data.value.key });
         if (res.data) {
@@ -249,7 +249,7 @@ async function getRegister() {
             icon: 'error',
         });
     } finally {
-        uni.hideLoading();
+        // uni.hideLoading();
     }
 }
 

+ 4 - 4
pages_home/pages/register/index.vue

@@ -528,9 +528,9 @@ function servesInit() {
 async function getRegister() {
 
 	try {
-		uni.showLoading({
-			title: '数据加载中...'
-		});
+		// uni.showLoading({
+		// 	title: '数据加载中...'
+		// });
 		const res = await getVolunteerInfo({ serviceCategory: data.value.key });
 		if (res.data) {
 			details.value = { ...res.data, age: res.data.age + '' };
@@ -558,7 +558,7 @@ async function getRegister() {
 			icon: 'error',
 		});
 	} finally {
-		uni.hideLoading();
+		// uni.hideLoading();
 	}
 }
 

+ 6 - 1
utils/wxRequest.js

@@ -98,10 +98,13 @@ const uploadFile = async (files) => {
 export const wxUploadFile = async (type,fileNum) => {
     try {
         console.log('11');
-        
+    
         //选择文件
         const files = await getWxFile(type,fileNum);
         console.log('选择文件', files,files.tempFiles);
+         uni.showLoading({
+            title: '文件上传中...',
+          })
         //上传服务器
         const u_files = await uploadFile(files.tempFiles);
         console.log('上传服务器', u_files);
@@ -110,6 +113,8 @@ export const wxUploadFile = async (type,fileNum) => {
         console.log('上传失败-wxUploadFile', error);
         throw error;
 
+    } finally {
+        uni.hideLoading()
     }
 
 }