Browse Source

首页列表字段修改

贾宇博 2 weeks ago
parent
commit
d3dec95666
1 changed files with 39 additions and 33 deletions
  1. 39 33
      pages/index.vue

+ 39 - 33
pages/index.vue

@@ -80,7 +80,9 @@
 	import {
 		useDict
 	} from '@/utils/dict.js';
-	import { citySelectorNavigateTo } from '@/utils/adress'
+	import {
+		citySelectorNavigateTo
+	} from '@/utils/adress'
 
 	const total = ref(0)
 	const listData = ref([])
@@ -114,10 +116,10 @@
 	})
 
 
-	
-const cityClick = () => {
-	citySelectorNavigateTo(data.address)
-}
+
+	const cityClick = () => {
+		citySelectorNavigateTo(data.address)
+	}
 
 
 	const loadmoreInfo = ref({
@@ -144,12 +146,13 @@ const cityClick = () => {
 			loadmoreInfo.value.status = 'loading';
 
 			const params = {
-			    pageNum: pages.value.current,
-			    pageSize: pages.value.pageSize,
-			    serviceCategory: pages.value.serviceCategory || '',
+				pageNum: pages.value.current,
+				pageSize: pages.value.pageSize,
+				serviceCategory: pages.value.serviceCategory || '',
+				businessManagementId: 0,
 				// appStatus:pages.value.appStatus,
-			  };
-			  const res = await volunteerinfolist(params);
+			};
+			const res = await volunteerinfolist(params);
 
 			if (!res || !res.rows) {
 				return;
@@ -211,36 +214,39 @@ const cityClick = () => {
 	}
 
 	onShow(() => {
-	getBanners();
+		getBanners();
+
+		// 在 App.vue  中初始化 
+		uni.getSystemInfo({
+			success: (res) => {
+				const statusBarHeight = res.statusBarHeight;
+				const navBarHeight = res.platform === 'android' ? 48 : 44 + res.statusBarHeight;
+				globalData.value = {
+					statusBarHeight,
+					navBarHeight
+				};
 
-	// 在 App.vue  中初始化 
-	uni.getSystemInfo({
-		success: (res) => {
-			const statusBarHeight = res.statusBarHeight;
-			const navBarHeight = res.platform === 'android' ? 48 : 44 + res.statusBarHeight;
-			globalData.value = { statusBarHeight, navBarHeight };
+			}
+		});
 
+		if (citySelector) {
+			const selectedCity = citySelector.getCity(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
+			data.address = selectedCity.name;
 		}
-	});
-
-	if (citySelector) {
-		const selectedCity = citySelector.getCity(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
-		data.address = selectedCity.name;
-	}
 
-})
+	})
 
-onMounted(() => {
-	getList()
-})
+	onMounted(() => {
+		getList()
+	})
 
-onUnload(() => {
-	if (citySelector) {
-		// 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
-		citySelector.setLocation(null);
-	}
+	onUnload(() => {
+		if (citySelector) {
+			// 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
+			citySelector.setLocation(null);
+		}
 
-})
+	})
 </script>
 
 <style scoped lang="scss">