贾宇博 недель назад: 4
Родитель
Сommit
e0ac60ecfc

+ 1 - 3
pages/Client/new_file.vue

@@ -81,9 +81,6 @@
 	})
 	const selected = ref([])
 
-
-
-
 	// 普通用户
 	const serviceList1 = ref([{
 			icon: '/static/img/统一知识平台-营运@1x.png',
@@ -121,6 +118,7 @@
 			key: 7,
 		},
 	]);
+	
 	//志愿者
 	const serviceList2 = ref([
 	{

+ 29 - 72
pages/Volunteerside/Side_index.vue

@@ -1,41 +1,42 @@
 <template>
-	<view v-if="userType == '1'">
-		<up-waterfall v-model="flowList">
-			<template #left :listData="listData">
-				<view class="demo-warter" v-for="(item, index) in listData" :key="index" @click="goToDetail(item)">
+	<view>
+		<up-waterfall>
+			<template #left>
+				<view class="demo-warter" v-for="(item, index) in props.listData" :key="index"
+					@click="goToDetail(item)">
 					<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
 						:index="index"></up-lazy-load>
 					<view class="demo-title">
-						{{item.businessTierName}}
+						{{ item.businessTierName }}
 					</view>
 					<view class="demo-skillDescribe">
-						{{item.skillDescribe}}
+						{{ item.skillDescribe }}
 					</view>
 					<view class="demo-PriceDome">
 						<view class="demo-price">
 							<image :src="item.volunteerPicture" class="name-image"></image>
-							{{item.name}}
+							{{ item.name }}
 						</view>
-
 					</view>
 				</view>
 			</template>
-			<template #right :rightList="rightList">
-				<view class="demo-warter" v-for="(item, index) in rightList" :key="index" @click="goToDetail(item)">
+
+			<template #right>
+				<view class="demo-warter" v-for="(item, index) in props.rightList" :key="index"
+					@click="goToDetail(item)">
 					<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
 						:index="index"></up-lazy-load>
 					<view class="demo-title">
-						{{item.businessTierName}}
+						{{ item.businessTierName }}
 					</view>
 					<view class="demo-skillDescribe">
-						{{item.skillDescribe}}
+						{{ item.skillDescribe }}
 					</view>
 					<view class="demo-PriceDome">
 						<view class="demo-price">
 							<image :src="item.volunteerPicture" class="name-image"></image>
-							{{item.name}}
+							{{ item.name }}
 						</view>
-
 					</view>
 				</view>
 			</template>
@@ -43,74 +44,28 @@
 	</view>
 </template>
 
-
 <script setup>
-	import {
-		ref,
-		onMounted,
-		nextTick
-	} from 'vue';
-	import {
-		onShow
-	} from '@dcloudio/uni-app'
-	import {
-		volunteerinfolist,
-		getDetailsvolunteerId
-	} from "@/api/volunteerDetailsApi/details.js"
-
-
-	const flowList = ref([]); //list数据
-	const total = ref(0)
-	const loadStatus = ref('loadmore');
-	const userType = uni.getStorageSync('userType') //读取本地存储
-
-	// 用户/志愿者 识别标识
-	const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
-
-
-	const listData = ref([])
-	const rightList = ref([])
-
-
-	const getList = async () => {
-		try {
-			const res = await volunteerinfolist();
-			if (!res || !res.rows) {
-				console.error('No data returned from API');
-				return;
-			}
-
-			let leftArr = [];
-			let rightArr = [];
-
-			(res.rows || []).forEach((item, index) => {
-				index % 2 !== 0 ? leftArr.push(item) : rightArr.push(item);
-			});
-
-			listData.value = leftArr;
-			rightList.value = rightArr;
-			total.value = res.rows;
-		} catch (error) {
-			console.error('Error fetching data:', error);
+	const props = defineProps({
+		listData: {
+			type: Array,
+			default: () => []
+		},
+		rightList: {
+			type: Array,
+			default: () => []
 		}
-	};
-
+	});
+	
 	const goToDetail = async (item) => {
 		const params = {
 			volunteerId: item.volunteerId, // 获取 volunteerId
 			serviceCategory: item.serviceCategory, // 获取 serviceCategory
 			businessManagementId: item.businessManagementId, //获取 businessManagementId
 		};
-
-		// 使用 JSON.stringify 将对象传递给 URL 参数
 		uni.navigateTo({
-			url: `/pages/goodsDetails/goodsDetails?params=${JSON.stringify(params)}`
+			url: `/pages_home/pages/Volunteerside/goodsDetails?params=${JSON.stringify(params)}`
 		});
 	}
-
-	onShow(() => {
-		getList()
-	})
 </script>
 
 <style scoped>
@@ -144,7 +99,8 @@
 		text-overflow: ellipsis;
 		word-break: break-all;
 	}
-	.demo-skillDescribe{
+
+	.demo-skillDescribe {
 		font-size: 30rpx;
 		margin-top: 5px;
 		color: black;
@@ -156,6 +112,7 @@
 		text-overflow: ellipsis;
 		word-break: break-all;
 	}
+
 	.demo-img {
 		width: 40rpx;
 		height: 40rpx;

+ 1 - 1
config.js

@@ -3,7 +3,7 @@ const config = {
 	// baseUrl: 'https://vue.ruoyi.vip/prod-api',
 	//cloud后台网关地址
 	// baseUrl: 'http://192.168.10.3:8080',
-	baseUrl: 'http://192.168.100.104:9527',
+	baseUrl: 'http://192.168.100.121:9527',
 	// 应用信息
 	appInfo: {
 		// 应用名称

+ 23 - 27
pages.json

@@ -12,11 +12,10 @@
 			"up-grid-item": "uview-plus/components/u-grid-item/u-grid-item"
 		}
 	},
-	"pages": [
-		{
+	"pages": [{
 			"path": "pages/index",
 			"style": {
-				"navigationBarTitleText": "乐融融"
+				"navigationBarTitleText": "金邻助家"
 				// "navigationStyle": "custom"
 			}
 		},
@@ -61,19 +60,17 @@
 			"style": {
 				"navigationBarTitleText": "浏览文本"
 			}
-		},
-		{
-			"path": "pages/goodsDetails/goodsDetails",
-			"style": {
-				"navigationBarTitleText": "详情"
-			}
 		}
+		// {
+		// 	"path": "pages/goodsDetails/goodsDetails",
+		// 	"style": {
+		// 		"navigationBarTitleText": "详情"
+		// 	}
+		// }
 	],
-	"subPackages": [
-		{
+	"subPackages": [{
 			"root": "pages_home/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "client/details",
 					"style": {
 						"navigationBarTitleText": "孩子陪护"
@@ -90,13 +87,18 @@
 					"style": {
 						"navigationBarTitleText": "注册详情"
 					}
+				},
+				{
+					"path": "Volunteerside/goodsDetails",
+					"style": {
+						"navigationBarTitleText": "详情"
+					}
 				}
 			]
 		},
 		{
 			"root": "pages_orderuser/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "order/orderdetails",
 					"style": {
 						"navigationBarTitleText": "消息"
@@ -112,8 +114,7 @@
 		},
 		{
 			"root": "pages_mine/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "wallet/index",
 					"style": {
 						"navigationBarTitleText": "钱包"
@@ -177,8 +178,7 @@
 		},
 		{
 			"root": "pages_template/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "wxCenter/index",
 					"style": {
 						"navigationBarTitleText": "wxCenter 仿微信个人中心",
@@ -273,8 +273,7 @@
 		},
 		{
 			"root": "pages_classify/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "handle/index",
 					"style": {
 						"navigationBarTitleText": "订单处理"
@@ -296,8 +295,7 @@
 		},
 		{
 			"root": "pages_qiun/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "sport/index",
 					"style": {
 						"pageOrientation": "auto"
@@ -325,8 +323,7 @@
 		},
 		{
 			"root": "pages_geek/pages",
-			"pages": [
-				{
+			"pages": [{
 					"path": "index/index"
 				},
 				{
@@ -340,8 +337,7 @@
 		"selectedColor": "#000000",
 		"borderStyle": "white",
 		"backgroundColor": "#ffffff",
-		"list": [
-			{
+		"list": [{
 				"pagePath": "pages/index",
 				"iconPath": "static/images/tabbar/home.png",
 				"selectedIconPath": "static/images/tabbar/home_.png",

+ 86 - 47
pages/index.vue

@@ -21,8 +21,8 @@
 		</view>
 
 		<view class="home-ranking">
-			<volunteerSide v-if="userType == 1"></volunteerSide>
-			<RankingList v-if="userType === 2"/>
+			<ServIces :listData="listData" :rightList="rightList" v-if="userType == 1"></ServIces>
+			<RankingList v-if="userType === 2" />
 		</view>
 
 
@@ -30,61 +30,100 @@
 </template>
 
 <script setup>
-import { ref, reactive, onMounted } from 'vue';
-import {
-	onLoad,
-	onShow
-} from "@dcloudio/uni-app";
-import RankingList from '@/pages/common/rankingList/index.vue';
-import volunteerSide from "@/pages/Volunteerside/Side_index.vue"
-
-import {
-	Client
-} from "@/pages/Client/new_file.vue"
-const data = reactive({
-	address: '重庆市永川区',
-	queryValue: ''
-})
-const userType = uni.getStorageSync('userType') //读取本地存储
-
-const list3 = ref([
-	'/static/img/68c51cda626f732e5a6a782e245ac255.jpeg',
-	'/static/img/78f89f319f760ba84a5b86916612a99d.jpeg',
-	'/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg',
-]);
+	import {
+		ref,
+		reactive,
+		onMounted
+	} from 'vue';
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app";
+	import RankingList from '@/pages/common/rankingList/index.vue';
+	import ServIces from "@/components/Services/services.vue"
+	// import {
+	// 	Client
+	// } from "@/pages/Client/new_file.vue"
+	import {
+		Client
+	} from "@/components/Client/new_file.vue"
+	import {
+		volunteerinfolist,
+	} from "@/api/volunteerDetailsApi/details.js"
+
+	const total = ref(0)
+	const listData = ref([])
+	const rightList = ref([])
+	const userType = uni.getStorageSync('userType') //读取本地存储
+
+
+	const data = reactive({
+		address: '重庆市永川区',
+		queryValue: ''
+	})
+	const list3 = ref([
+		'/static/img/68c51cda626f732e5a6a782e245ac255.jpeg',
+		'/static/img/78f89f319f760ba84a5b86916612a99d.jpeg',
+		'/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg',
+	]);
+
+	const getList = async () => {
+		try {
+			const res = await volunteerinfolist();
+			if (!res || !res.rows) {
+				return;
+			}
+
+			let leftArr = [];
+			let rightArr = [];
+
+			(res.rows || []).forEach((item, index) => {
+				index % 2 !== 0 ? leftArr.push(item) : rightArr.push(item);
+			});
+
+			listData.value = leftArr;
+			rightList.value = rightArr;
+			total.value = res.rows;
+		} catch (error) {
+			console.error('Error fetching data:', error);
+		}
+	};
 
+	onShow(() => {
+		getList()
+	})
 </script>
 
 <style scoped lang="scss">
-.main-content {
-	.home-banner {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		background: rgba(255, 255, 255, 1);
-		box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 2.08rpx 4.17rpx rgba(0, 0, 0, 0.05);
-		padding: 20rpx 16rpx;
-	}
+	.main-content {
+		.home-banner {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			background: rgba(255, 255, 255, 1);
+			box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 2.08rpx 4.17rpx rgba(0, 0, 0, 0.05);
+			padding: 20rpx 16rpx;
+		}
 
-	.home-banner-left {
-		display: flex;
-		align-items: center;
+		.home-banner-left {
+			display: flex;
+			align-items: center;
 
-	}
+		}
 
-	.home-main {
-		padding: 12px 16px;
+		.home-main {
+			padding: 12px 16px;
 
-		.custom-swiper {}
+			.custom-swiper {}
 
-		.home-grid {
-			margin-bottom: 32px;
-		}
+			.home-grid {
+				margin-bottom: 32px;
+			}
 
-	}
+		}
 
-	.home-ranking {
-		padding: 12px 16px;
+		.home-ranking {
+			padding: 12px 16px;
+		}
 	}
-}
 </style>

+ 1 - 1
pages/login.vue

@@ -3,7 +3,7 @@
 		<view class="logo-content align-center justify-center flex">
 			<!-- <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix" /> -->
 			<image :src="imagePath" mode="aspectFit" style="width: 100rpx;height: 100rpx;"></image>
-			<text class="title">乐融融</text>
+			<text class="title">金邻助家</text>
 		</view>
 		<!-- <view class="login-form-content">
       <view class="action-btn">

+ 3 - 3
pages_classify/pages/orderItem/orderdetails.vue

@@ -73,9 +73,9 @@
 						</view>
 						<view class="item-right">
 							<view class="rating" v-if="score === null">待评价</view>
-							<up-tag v-if="orderStatus == 0">未开始</up-tag>
-							<up-tag v-else-if="orderStatus == 1">进行中</up-tag>
-							<up-tag v-else-if="orderStatus == 2">已完成</up-tag>
+							<up-tag v-if="item.orderStatus === 0">未开始</up-tag>
+							<up-tag v-else-if="item.orderStatus === 1">进行中</up-tag>
+							<up-tag v-else-if="item.orderStatus === 2">已完成</up-tag>
 						</view>
 					</view>
 				</up-list-item>

pages/goodsDetails/goodsDetails.vue → pages_home/pages/Volunteerside/goodsDetails.vue


+ 2 - 2
pages_home/pages/client/details.vue

@@ -89,7 +89,7 @@
 	import {
 		onLoad
 	} from '@dcloudio/uni-app';
-	import volunteerSide from "@/pages/Volunteerside/Side_index.vue"
+	// import volunteerSide from "@/pages/Volunteerside/Side_index.vue"
 	import {
 		typeOptionSelect,
 		volunteerInfoList,
@@ -161,7 +161,7 @@
 			businessManagementId: item.businessManagementId, //获取 businessManagementId
 		};
 		uni.navigateTo({
-			url: `/pages/goodsDetails/goodsDetails?params=${JSON.stringify(params)}`
+			url: `/pages_home/pages/Volunteerside/goodsDetails?params=${JSON.stringify(params)}`
 		});
 	}
 

BIN
static/zhiyuanzhe.jpg