zs 1 rok temu
rodzic
commit
ad44dffc6b
1 zmienionych plików z 22 dodań i 4 usunięć
  1. 22 4
      pagesHome/notarization/index.vue

+ 22 - 4
pagesHome/notarization/index.vue

@@ -37,6 +37,8 @@
 	const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
 	// 基本信息
 	const config = ref({ logoUrl: [] });
+	// 查询
+	const searchInfo = ref({});
 	const tabList = ref([{ label: "全部", value: '0' }, { label: "民事公证", value: '0' }, { label: "经济公证", value: '0' }, { label: "涉外(出国)公证", value: '0' }, { label: "其他公证项目", value: '0' }]);
 	// 列表
 	const list = ref([]);
@@ -49,6 +51,7 @@
 	const scrollTop = ref(0);
 	onShow(async () => {
 		await searchConfig();
+		await searchOther();
 		await clearPage();
 		await search();
 	})
@@ -61,6 +64,16 @@
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 	};
+	// 其他查询信息
+	const searchOther = async () => {
+		let res;
+		//业务类型
+		res = await $api(`dictData`, 'GET', { code: 'business', is_use: '0' });
+		if (res.errcode === 0) {
+			const list = [{ label: "全部", value: '0' }]
+			tabList.value = list.concat(res.data);
+		}
+	};
 	// 查询
 	const search = async () => {
 		const info = {
@@ -68,7 +81,10 @@
 			limit: limit.value,
 			is_use: '0'
 		}
-		const res = await $api('business', 'GET', info);
+		const res = await $api('business', 'GET', {
+			...info,
+			...searchInfo.value
+		});
 		if (res.errcode === 0) {
 			list.value = list.value.concat(res.data)
 			total.value = res.total
@@ -86,9 +102,11 @@
 		})
 	};
 	// 跳转
-	const sectionChange = (index) => {
-		// curNow.value = index;
-		console.log(index);
+	const sectionChange = async (item) => {
+		if (item.index != 0) searchInfo.value.type = item.value
+		else searchInfo.value = {}
+		await clearPage();
+		await search();
 	};
 	// 查看详情
 	const toView = (item) => {