소스 검색

修改查询

zs 1 년 전
부모
커밋
7bb4a6630a
4개의 변경된 파일29개의 추가작업 그리고 16개의 파일을 삭제
  1. 11 4
      pages/select/index.vue
  2. 4 4
      pagesHome/search/index.vue
  3. 10 4
      unpackage/dist/dev/mp-weixin/pages/select/index.js
  4. 4 4
      unpackage/dist/dev/mp-weixin/pagesHome/search/index.js

+ 11 - 4
pages/select/index.vue

@@ -158,7 +158,7 @@
 	};
 	const toCommon = (item, type) => {
 		console.log(item);
-		if (type == '0' && item.type == '4') {
+		if (type == '0') {
 			uni.navigateTo({
 				url: `/pagesHome/brand/index?type=${item.type}`,
 			})
@@ -168,9 +168,16 @@
 					url: `/pagesHome/search/index?brand=${item.name}`,
 				})
 			} else {
-				uni.navigateTo({
-					url: `/pagesHome/search/index?money=${item.title}`,
-				})
+				if (item.type == '3') {
+					uni.navigateTo({
+						url: `/pagesHome/search/index?type=${item.type}`,
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pagesHome/search/index?money=${item.title}`,
+					})
+				}
+
 			}
 		}
 	};

+ 4 - 4
pagesHome/search/index.vue

@@ -118,11 +118,11 @@
 	const is_bottom = ref(false);
 	const scrollTop = ref(0);
 	onLoad(async (options) => {
-		searchInfo.value.brand = options && options.brand || ''
-		searchInfo.value.money = options && options.money || ''
+		if (options && options.type != '3') {
+			searchInfo.value.brand = options && options.brand || ''
+			searchInfo.value.money = options && options.money || ''
+		}
 		await searchConfig();
-		await clearPage();
-		await search();
 	})
 	onShow(async () => {
 		uni.$on('toRoute', function (data) {

+ 10 - 4
unpackage/dist/dev/mp-weixin/pages/select/index.js

@@ -95,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const toCommon = (item, type) => {
       console.log(item);
-      if (type == "0" && item.type == "4") {
+      if (type == "0") {
         common_vendor.index.navigateTo({
           url: `/pagesHome/brand/index?type=${item.type}`
         });
@@ -105,9 +105,15 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             url: `/pagesHome/search/index?brand=${item.name}`
           });
         } else {
-          common_vendor.index.navigateTo({
-            url: `/pagesHome/search/index?money=${item.title}`
-          });
+          if (item.type == "3") {
+            common_vendor.index.navigateTo({
+              url: `/pagesHome/search/index?type=${item.type}`
+            });
+          } else {
+            common_vendor.index.navigateTo({
+              url: `/pagesHome/search/index?money=${item.title}`
+            });
+          }
         }
       }
     };

+ 4 - 4
unpackage/dist/dev/mp-weixin/pagesHome/search/index.js

@@ -32,11 +32,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const is_bottom = common_vendor.ref(false);
     common_vendor.ref(0);
     common_vendor.onLoad(async (options) => {
-      searchInfo.value.brand = options && options.brand || "";
-      searchInfo.value.money = options && options.money || "";
+      if (options && options.type != "3") {
+        searchInfo.value.brand = options && options.brand || "";
+        searchInfo.value.money = options && options.money || "";
+      }
       await searchConfig();
-      await clearPage();
-      await search();
     });
     common_vendor.onShow(async () => {
       common_vendor.index.$on("toRoute", function(data) {