jiayubo пре 1 недеља
родитељ
комит
616c398c07

+ 20 - 2
api/userList.js

@@ -32,7 +32,6 @@ export function systemDictdaTalist() {
 }
 
 // 用户评价小订单
-
 export function usersUserFinishOrder(data) {
 	return request({
 		url: `/core/users/orders/userFinishOrder`,
@@ -48,4 +47,23 @@ export function userdictDataList(params) {
 		method: 'get',
 		params: params
 	})
-}
+}
+
+
+// 订单取消---退款信息回显
+export function userdictOrderInfo(mainOrderId) {
+	return request({
+		url: `/core/users/refund/orderInfo/${mainOrderId}`,
+		method: 'get',
+	})
+}
+
+
+// 提交退款申请
+export function refunDnewOrderRefund(data) {
+	return request({
+		url: `/core/users/refund/newOrderRefund`,
+		method: 'post',
+		data:data
+	})
+}

+ 2 - 2
config.js

@@ -2,8 +2,8 @@
 const config = {
 	// baseUrl: 'https://vue.ruoyi.vip/prod-api',
 	//cloud后台网关地址
-	// baseUrl: 'http://192.168.100.133:9527',
-	baseUrl: 'https://zybooks.tech/prod-api',
+	baseUrl: 'http://192.168.100.95:9527',
+	// baseUrl: 'https://zybooks.tech/prod-api',
 	mapKey:'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
 	appName: '金邻助家',
 	// 应用信息

+ 47 - 50
manifest.json

@@ -1,28 +1,28 @@
 {
-    "name": "lrr-mini-program",
-    "appid": "__UNI__3DD118D",
-    "description": "",
-    "versionName": "1.0.0",
-    "versionCode": "100",
-    "transformPx": false,
+    "name" : "lrr-mini-program",
+    "appid" : "__UNI__3DD118D",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
     /* 5+App特有相关 */
-    "app-plus": {
-        "usingComponents": true,
-        "nvueStyleCompiler": "uni-app",
-        "compilerVersion": 3,
-        "splashscreen": {
-            "alwaysShowBeforeRender": true,
-            "waiting": true,
-            "autoclose": true,
-            "delay": 0
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
         },
         /* 模块配置 */
-        "modules": {},
+        "modules" : {},
         /* 应用发布信息 */
-        "distribute": {
+        "distribute" : {
             /* android打包配置 */
-            "android": {
-                "permissions": [
+            "android" : {
+                "permissions" : [
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@@ -41,48 +41,45 @@
                 ]
             },
             /* ios打包配置 */
-            "ios": {},
+            "ios" : {},
             /* SDK配置 */
-            "sdkConfigs": {}
+            "sdkConfigs" : {}
         }
     },
     /* 快应用特有相关 */
-    "quickapp": {},
+    "quickapp" : {},
     /* 小程序特有相关 */
-    "mp-weixin": {
-        "appid": "wxe8a05852410396cf",
-        "setting": {
-            "urlCheck": false,
-            "postcss": true,
-            "minified": false
+    "mp-weixin" : {
+        "appid" : "wxe8a05852410396cf",
+        "setting" : {
+            "urlCheck" : false,
+            "postcss" : true,
+            "minified" : true
         },
-        "usingComponents": true,
-        "optimization": {
-            "subPackages": true
+        "usingComponents" : true,
+        "optimization" : {
+            "subPackages" : true
         },
-        "lazyCodeLoading": "requiredComponents",
-        "requiredPrivateInfos": [
-            "getLocation",
-            "chooseLocation"
-        ],
-        "permission": {
-            "scope.userLocation": {
-                "desc": "你的位置信息将用于警情上报"
+        "lazyCodeLoading" : "requiredComponents",
+        "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ],
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于警情上报"
             }
         },
-        "mergeVirtualHostAttributes": true
+        "mergeVirtualHostAttributes" : true
     },
-    "mp-alipay": {
-        "usingComponents": true
+    "mp-alipay" : {
+        "usingComponents" : true
     },
-    "mp-baidu": {
-        "usingComponents": true
+    "mp-baidu" : {
+        "usingComponents" : true
     },
-    "mp-toutiao": {
-        "usingComponents": true
+    "mp-toutiao" : {
+        "usingComponents" : true
     },
-    "uniStatistics": {
-        "enable": false
+    "uniStatistics" : {
+        "enable" : false
     },
-    "vueVersion": "3"
-}
+    "vueVersion" : "3"
+}

+ 7 - 1
pages.json

@@ -39,7 +39,7 @@
 		{
 			"path": "pages/classify",
 			"style": {
-				"navigationBarTitleText": "分类"
+				"navigationBarTitleText": "订单"
 			}
 		},
 		{
@@ -288,6 +288,12 @@
 					"style": {
 						"navigationBarTitleText": "评论"
 					}
+				},
+				{
+					"path": "pages/requestaRefund/requestaRefund",
+					"style": {
+						"navigationBarTitleText": "申请退款"
+					}
 				}
 			]
 		}

+ 29 - 12
pages/common/classify/orderlist.vue

@@ -37,8 +37,19 @@
 								{{dictSortMap[item.orderStatus]}}
 							</view>
 							<view class="Wrap-Btn">
-							    <up-button type="primary" text="沟通" size="mini" shape="circle" class="action-btn"></up-button>
-							    <up-button type="error" text="查看" size="mini" shape="circle" class="action-btn" @click="handlClick(item)"></up-button>
+								<!-- 沟通按钮 -->
+								<up-button type="primary" text="沟通"  shape="circle" :customStyle="wrapqx">
+								</up-button>
+
+								<!-- 当 orderStatus 为 3 显示退款按钮 -->
+								<up-button v-if="item.orderStatus === '3'" type="error" text="退款" 
+									shape="circle":customStyle="wrapqx" @click="handleRefund(item)" >
+								</up-button>
+
+								<!-- 否则显示查看按钮 -->
+								<up-button v-else type="error" text="查看"  shape="circle" :customStyle="wrapqx"
+									@click="handlClick(item)">
+								</up-button>
 							</view>
 						</view>
 					</view>
@@ -87,7 +98,6 @@
 		}
 	]
 
-
 	const props = defineProps({
 		dataList: {
 			typeof: Array,
@@ -104,7 +114,7 @@
 	const emits = defineEmits([
 		'fetchData'
 	])
-	
+
 	const dictSortMap = computed(() => {
 		let mapObj = {}
 		props.dictSort.forEach((item => {
@@ -119,9 +129,9 @@
 			url: `/pages_classify/pages/orderItem/orderdetails?mainOrderId=${mainOrderId}`
 		});
 	}
-	
+
 	// 评论
-	const handleComment  = () =>{
+	const handleComment = () => {
 		uni.navigateTo({
 			url: `/pages_classify/pages/orderItem/userComment`
 		});
@@ -130,6 +140,19 @@
 	function onChange(tabItem) {
 		emits('fetchData', tabItem.value)
 	}
+	
+	//申请退款 
+	const handleRefund = (item) => {
+		const mainOrderId = item.mainOrderId; // 获取详情id
+		uni.navigateTo({
+			url: `/pages_classify/pages/requestaRefund/requestaRefund?mainOrderId=${mainOrderId}`
+		});
+	};
+	
+	const wrapqx = {
+		height: '50rpx',
+		width: '100rpx',
+	}
 </script>
 
 <style scoped>
@@ -193,10 +216,4 @@
 		/* 按钮间距 */
 	}
 
-	.action-btn {
-		padding: 0 8px;
-		height: 28px;
-		line-height: 28px;
-		font-size: 12px;
-	}
 </style>

+ 166 - 0
pages_classify/pages/requestaRefund/requestaRefund.vue

@@ -0,0 +1,166 @@
+<template>
+	<view>
+		<!-- 志愿者信息 -->
+		<view class="volunteer-info">
+			<image :src="dataList.volunteerPicture" class="volunteer-image"></image>
+			<view class="volunteer-details">
+				<view style="display: flex; justify-content: space-between; width: 100%;">
+					<view>
+						<view>{{dataList.volunteerName}}</view>
+						<view>{{dataList.businessTierName}}</view>
+					</view>
+					<view>可退:{{dataList.refundAmount}}</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 申请类型 -->
+		<view class="application-type">
+			申请类型:申请退款
+		</view>
+
+		<!-- 志愿者详细信息 -->
+		<view class="volunteer-detail-section">
+			<view class="volunteer-detail">
+				<image :src="dataList.volunteerPicture" class="volunteer-image"></image>
+				<view class="volunteer-data">
+					<view>姓名:{{dataList.volunteerName}}</view>
+					<view>类别:{{dataList.businessTierName}}</view>
+					<view>技能简介:</view>
+				</view>
+				<view class="refund-amount">¥{{dataList.refundAmount}}</view>
+			</view>
+		</view>
+
+		<!-- 展开全部按钮 -->
+		<view class="expand-all">
+			<text @click="toggleExpand">展开全部</text>
+			<image :src="expanded ? '/path/to/up-icon.png' : '/path/to/down-icon.png'" class="expand-icon"></image>
+		</view>
+
+		<!-- 申请说明 -->
+		<view class="application-note">
+			<up-textarea v-model="value1" placeholder="请详细填写申请申请说明"></up-textarea>
+		</view>
+
+		<!-- 提交申请按钮 -->
+		<view class="submit-button">
+			<up-button type="error" text="提交申请" @click="handlClick"></up-button>
+		</view>
+	</view>
+</template>
+<script setup>
+	import {
+		onMounted,
+		ref
+	} from "vue";
+	import {
+		onLoad
+	} from '@dcloudio/uni-app'
+	import {
+		userdictOrderInfo,
+		refunDnewOrderRefund
+	} from "@/api/userList.js"
+
+	const dataList = ref([])
+	const mainOrderId = ref(''); //志愿者ID
+	const value1 = ref('');
+	const expanded = ref(false);
+
+	onLoad(async (options) => {
+		mainOrderId.value = options.mainOrderId;
+		const res = await userdictOrderInfo(mainOrderId.value)
+		dataList.value = res.data;
+	});
+
+	const toggleExpand = () => {
+		expanded.value = !expanded.value;
+	};
+
+	const handlClick = async () => {
+		const params = {
+			mainOrderId: mainOrderId.value,
+			volunteerPicture: dataList.value.volunteerPicture
+		};
+		const res = await refunDnewOrderRefund(params);
+		if (res.status === 200) {
+			uni.showToast({
+				title: '提交成功',
+				icon: 'success', // 或者 'none'
+				duration: 1500, // 显示时间,单位毫秒,默认1500
+				mask: true, // 是否显示透明蒙层,防止触摸穿透,默认false
+			});
+			uni.navigateTo({
+				url: '/pages/classify'
+			});
+		}
+	}
+</script>
+
+<style scoped>
+	.volunteer-info {
+		display: flex;
+		align-items: center;
+		border-bottom: 1rpx solid #ccc;
+		padding: 20rpx;
+	}
+	
+	.volunteer-image {
+		width: 80rpx;
+		height: 120rpx;
+		margin-right: 20rpx;
+		border-radius: 8rpx;
+	}
+	
+	.volunteer-details {
+		flex: 1;
+	}
+	
+	.application-type {
+		padding: 20rpx;
+		border-bottom: 1rpx solid #ccc;
+	}
+
+	.volunteer-detail-section {
+		padding: 20rpx;
+		border-bottom: 1rpx solid #ccc;
+	}
+
+	.volunteer-detail {
+		display: flex;
+		align-items: center;
+	}
+
+	.volunteer-data {
+		flex: 1;
+		margin-left: 20rpx;
+	}
+
+	.refund-amount {
+		color: red;
+		font-weight: bold;
+	}
+
+	.expand-all {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 20rpx;
+		cursor: pointer;
+	}
+
+	.expand-icon {
+		width: 40rpx;
+		height: 40rpx;
+		margin-left: 10rpx;
+	}
+
+	.application-note {
+		padding: 20rpx;
+	}
+
+	.submit-button {
+		padding: 20rpx;
+		text-align: center;
+	}
+</style>

+ 109 - 38
pages_home/pages/client/details.vue

@@ -27,7 +27,7 @@
 							class="tabs-content" :current="tabKey"></up-tabs>
 					</scroll-view>
 				</view> -->
-	
+
 				<Tabs :list="list1" @change="handlTabs" ref="tabRef" />
 			</view>
 
@@ -82,7 +82,8 @@
 			</view>
 			<up-loadmore style="margin-top: 40rpx;" :status="loadmoreInfo.status"
 				:loadmoreText="loadmoreInfo.loadingText" :loadingText="loadmoreInfo.loadmoreText"
-				:nomoreText="loadmoreInfo.nomoreText" @loadmore="handleLoadmore" v-if="userType == 1 && pages.total >0" />
+				:nomoreText="loadmoreInfo.nomoreText" @loadmore="handleLoadmore"
+				v-if="userType == 1 && pages.total >0" />
 
 		</view>
 	</view>
@@ -131,7 +132,7 @@
 
 	const tabRef = ref(null)
 
-	const businessManagementId =ref(null)
+	const businessManagementId = ref(null)
 
 
 	const defaultTab = ref({
@@ -182,7 +183,7 @@
 
 	onLoad((options) => {
 		const dataList = JSON.parse(decodeURIComponent(options.dataList));
-		
+
 		serviceCategory.value = options.serviceCategory
 		list1.value = dataList
 		list2.value = dataList[0].children
@@ -221,7 +222,7 @@
 	// 	const res = await volunteerDataList()
 	// 	console.log(res, 'volunteerDataList>>>>>>>>>>')
 	// }
-	
+
 
 	const getList = async () => {
 		try {
@@ -251,8 +252,8 @@
 			res.rows.forEach((item, index) => {
 				index % 2 !== 0 ? leftList.value.push(item) : rightList.value.push(item);
 			});
-			console.log('leftList',leftList,rightList);
-			
+			console.log('leftList', leftList, rightList);
+
 			pages.value.total = res.total;
 		} catch (error) {
 			clearList()
@@ -260,11 +261,11 @@
 		}
 	};
 
-	const clearList = () =>{
+	const clearList = () => {
 		leftList.value = [];
-			rightList.value = [];
-			loadmoreInfo.value.status = 'loadmore';
-			pages.value.total = 0;
+		rightList.value = [];
+		loadmoreInfo.value.status = 'loadmore';
+		pages.value.total = 0;
 	}
 
 	onReachBottom(() => {
@@ -345,12 +346,11 @@
 	}
 
 
-
 	.demo-warter {
-		border-radius: 8px;
-		margin: 5px;
+		border-radius: 16rpx;
+		margin: 10rpx;
 		background-color: #ffffff;
-		padding: 5px;
+		padding: 10rpx;
 	}
 
 	.u-close {
@@ -361,40 +361,115 @@
 
 	.demo-image {
 		width: 100%;
-		border-radius: 4px;
+		border-radius: 8rpx;
 	}
 
 	.demo-title {
 		font-size: 25rpx;
-		margin-top: 5px;
-		color: #ccc;
-		/* margin-left: 15rpx; */
+		margin-top: 8rpx;
+		color: #999;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 3;
+		-webkit-line-clamp: 2;
 		overflow: hidden;
 		text-overflow: ellipsis;
-		word-break: break-all;
+		word-break: break-word;
 	}
 
 	.demo-skillDescribe {
 		font-size: 30rpx;
-		margin-top: 5px;
-		color: black;
-		/* margin-left: 15rpx; */
+		margin-top: 8rpx;
+		color: #333;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 3;
+		-webkit-line-clamp: 2;
 		overflow: hidden;
 		text-overflow: ellipsis;
-		word-break: break-all;
+		word-break: break-word;
 	}
 
 	.demo-img {
-		width: 40rpx;
-		height: 40rpx;
+		width: 60rpx;
+		height: 60rpx;
+		border-radius: 50%;
+	}
+
+	.demo-PriceDome {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		width: 100%;
+		margin-top: 20rpx;
+	}
+
+	.demo-price {
+		display: flex;
+		align-items: center;
+		flex: 1;
+		overflow: hidden;
+	}
+
+	.name-image {
+		width: 50rpx;
+		height: 50rpx;
+		margin-right: 12rpx;
 		border-radius: 50%;
+	}
 
+	.name-text {
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		max-width: 150rpx;
+		color: #444;
+	}
+
+	.demo-warter {
+		border-radius: 16rpx;
+		margin: 10rpx;
+		background-color: #ffffff;
+		padding: 10rpx;
+	}
+
+	.u-close {
+		position: absolute;
+		top: 32rpx;
+		right: 32rpx;
+	}
+
+	.demo-image {
+		width: 100%;
+		border-radius: 8rpx;
+	}
+
+	.demo-title {
+		font-size: 25rpx;
+		margin-top: 8rpx;
+		color: #999;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		word-break: break-word;
+	}
+
+	.demo-skillDescribe {
+		font-size: 30rpx;
+		margin-top: 8rpx;
+		color: #333;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		word-break: break-word;
+	}
+
+	.demo-img {
+		width: 60rpx;
+		height: 60rpx;
+		border-radius: 50%;
 	}
 
 	.demo-PriceDome {
@@ -402,7 +477,7 @@
 		justify-content: space-between;
 		align-items: center;
 		width: 100%;
-		margin-top: 15rpx;
+		margin-top: 20rpx;
 	}
 
 	.demo-price {
@@ -410,24 +485,20 @@
 		align-items: center;
 		flex: 1;
 		overflow: hidden;
-		/* 防止内容溢出 */
 	}
 
 	.name-image {
-		width: 40rpx;
-		height: 40rpx;
-		margin-right: 10rpx;
+		width: 50rpx;
+		height: 50rpx;
+		margin-right: 12rpx;
 		border-radius: 50%;
 	}
 
 	.name-text {
 		white-space: nowrap;
-		/* 禁止换行 */
 		overflow: hidden;
-		/* 超出部分隐藏 */
 		text-overflow: ellipsis;
-		/* 显示省略号 */
-		max-width: 120rpx;
-		/* 6个中文字符大约占120rpx */
+		max-width: 150rpx;
+		color: #444;
 	}
 </style>

+ 16 - 3
project.config.json

@@ -1,5 +1,5 @@
 {
-  "appid": "wxf8cc1f7fffc41354",
+  "appid": "wxe8a05852410396cf",
   "compileType": "miniprogram",
   "libVersion": "3.8.1",
   "packOptions": {
@@ -18,11 +18,24 @@
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
-    }
+    },
+    "compileWorklet": false,
+    "uglifyFileName": false,
+    "uploadWithSourceMap": true,
+    "packNpmManually": false,
+    "minifyWXSS": true,
+    "minifyWXML": true,
+    "localPlugins": false,
+    "disableUseStrict": false,
+    "useCompilerPlugins": false,
+    "condition": false,
+    "swc": false,
+    "disableSWC": true
   },
   "condition": {},
   "editorSetting": {
     "tabIndent": "insertSpaces",
     "tabSize": 2
-  }
+  },
+  "simulatorPluginLibVersion": {}
 }