Browse Source

修改查询

zs 1 year ago
parent
commit
527e9cebb9

+ 10 - 4
pages/select/index.vue

@@ -160,12 +160,18 @@
 		console.log(item);
 		if (type == '0' && item.type == '4') {
 			uni.navigateTo({
-				url: `/pagesHome/brand/index?type=${item.type || ''}`,
+				url: `/pagesHome/brand/index?type=${item.type}`,
 			})
 		} else {
-			uni.navigateTo({
-				url: `/pagesHome/search/index?type=${item.type || ''}`,
-			})
+			if (type == '0') {
+				uni.navigateTo({
+					url: `/pagesHome/search/index?brand=${item.name}`,
+				})
+			} else {
+				uni.navigateTo({
+					url: `/pagesHome/search/index?money=${item.title}`,
+				})
+			}
 		}
 	};
 	// 查看详情

+ 20 - 22
pagesHome/brand/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<u-index-list :index-list="indexList" :sticky="false" activeColor="#ffbc00">
-		<view :slot="header" class="list">
+		<!-- <view :slot="header" class="list">
 			<view class="text">热门品牌</view>
 			<view class="one">
 				<view class="list" v-for="(item, index) in list" :key="index" @tap="toCommon(item)">
@@ -8,10 +8,10 @@
 						<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:'/static/logo.png'">
 						</image>
 					</view>
-					<view class="title">{{item.title}}</view>
+					<view class="title">{{item.name}}</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<template :key="index" v-for="(item, index) in itemArr">
 			<!-- #ifdef APP-NVUE -->
 			<u-index-anchor color="#333333" bg-color="#f9f9f9" :text="indexList[index]"></u-index-anchor>
@@ -23,7 +23,7 @@
 				<view class="list-cell" v-for="(cell, index) in item" @tap="toCommon(cell)">
 					<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:'/static/logo.png'">
 					</image>
-					<view class="title">{{cell.title}}</view>
+					<view class="title">{{cell.name}}</view>
 				</view>
 			</u-index-item>
 		</template>
@@ -38,23 +38,12 @@
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	// 基本信息
 	const config = ref({ logoUrl: [] });
-	const indexList = ref(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]);
-	const itemArr = ref([
-		[{ title: '奥迪', url: [], type: '0' }, { title: '爱驰', url: [], type: '0' }, { title: '阿斯顿·马丁', url: [], type: '0' }],
-		[{ title: '宝马', url: [], type: '0' }, { title: '本田', url: [], type: '0' }, { title: '比亚迪', url: [], type: '0' }, { title: '奔腾', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '大众', url: [], type: '0' }, { title: '东风', url: [], type: '0' }, { title: '大运', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-		[{ title: '长安', url: [], type: '0' }, { title: '长城', url: [], type: '0' }, { title: '创维', url: [], type: '0' }],
-	]);
-	const list = ref([{ title: '奥迪', url: [], type: '0' }, { title: '本田', url: [], type: '0' }, { title: '别克', url: [], type: '0' },
-	{ title: '奥迪', url: [], type: '0' }, { title: '大众', url: [], type: '0' }, { title: '长城', url: [], type: '0' },
-	{ title: '福特', url: [], type: '0' }, { title: '丰田', url: [], type: '0' }, { title: '长安', url: [], type: '0' },
-	{ title: '日产', url: [], type: '0' }]);
+	const indexList = ref([]);
+	const itemArr = ref([]);
+	// const list = ref([{ name: '奥迪', url: [], type: '0' }, { name: '本田', url: [], type: '0' }, { name: '别克', url: [], type: '0' },
+	// { name: '奥迪', url: [], type: '0' }, { name: '大众', url: [], type: '0' }, { name: '长城', url: [], type: '0' },
+	// { name: '福特', url: [], type: '0' }, { name: '丰田', url: [], type: '0' }, { name: '长安', url: [], type: '0' },
+	// { name: '日产', url: [], type: '0' }]);
 	onLoad(async () => {
 		await searchConfig();
 		await search();
@@ -65,7 +54,16 @@
 	};
 	// 查询
 	const search = async () => {
-
+		const res = await $api('brand/index', 'GET', {});
+		if (res.errcode === 0) {
+			itemArr.value = res.data.data1
+			indexList.value = res.data.data2
+		} else {
+			uni.showToast({
+				title: res.errmsg || '',
+				icon: 'error',
+			});
+		}
 	};
 	const toCommon = (item) => {
 		uni.$emit('toRoute', item)

+ 1 - 3
pagesHome/car/index.vue

@@ -297,9 +297,7 @@
 			status: '0',
 			shop: shop.value._id
 		}
-		const arr = await $api('car', 'GET', {
-			...info,
-		});
+		const arr = await $api('car', 'GET', info);
 		if (arr.errcode === 0) {
 			list.value = arr.data
 			shop.value.num = arr.total

+ 3 - 3
pagesHome/condition/index.vue

@@ -35,8 +35,8 @@
 												@change="event=>changeSliderValue(event,item)">
 											</slider-range>
 										</view>
-										<view v-else class="thumb-box3" v-for="(item1, index1) in item.foods"
-											:key="index1" @tap="toSelect(item,item1)">
+										<view v-else v-for="(item1, index1) in item.foods" :key="index1"
+											@tap="toSelect(item,item1)" class="thumb-box3">
 											<view :class="[item1?.is_open==false?'title_1':'title_2']">{{item1.label}}
 											</view>
 										</view>
@@ -102,7 +102,7 @@
 		uni.$on('toRoute', function (data) {
 			brandInfo.value = data
 			tabbar.value = tabbar.value.map((item, index) => {
-				if (item.type == '1' && item.value == '0') item.text = data.title
+				if (item.type == '1' && item.value == '0') item.text = data.name
 				return item
 			})
 		})

+ 29 - 60
pagesHome/search/index.vue

@@ -23,17 +23,16 @@
 					</view>
 				</view>
 			</view>
-			<view class="search_2"
-				v-if="Object.keys(brandInfo).length > 0||Object.keys(moneyInfo).length > 0||moreList.length>0">
+			<view class="search_2" v-if="searchInfo.brand||searchInfo.money||moreList.length>0">
 				<view class="left">
 					<scroll-view scroll-x="true">
 						<view class="scroll">
-							<view v-if="brandInfo&&brandInfo.type" class="title" @tap="toDelete({},'0')">
-								<span>{{brandInfo.title}}</span>&nbsp;
+							<view v-if="searchInfo&&searchInfo.brand" class="title" @tap="toDelete({},'0')">
+								<span>{{searchInfo.brand}}</span>&nbsp;
 								<u-icon color="#000" size="14px" name="close"></u-icon>
 							</view>
-							<view v-if="moneyInfo&&moneyInfo.type" class="title" @tap="toDelete({},'1')">
-								<span>{{moneyInfo.title}}</span>&nbsp;
+							<view v-if="searchInfo&&searchInfo.money" class="title" @tap="toDelete({},'1')">
+								<span>{{searchInfo.money}}</span>&nbsp;
 								<u-icon color="#000" size="14px" name="close"></u-icon>
 							</view>
 							<view v-if="moreList.length>0" class="title" v-for="(item, index) in moreList" :key="index"
@@ -60,7 +59,8 @@
 							</view>
 							<view class="right">
 								<view class="name textOver">{{item.series||'暂无'}} {{item.year||'暂无'}}款
-									{{item.style||'暂无'}}</view>
+									{{item.style||'暂无'}}
+								</view>
 								<view class="other">
 									<text v-if="item.year">{{item.year||'暂无'}}年 | </text>
 									<text v-if="item.mileage">{{item.mileage||'暂无'}}公里 | </text>
@@ -106,8 +106,7 @@
 	//价格
 	const moneyList = ref([{ title: '不限价格', type: '0', is_open: true }, { title: '10万以下', type: '1', is_open: false }, { title: '10-15万', type: '2', is_open: false }, { title: '15-20万', type: '3', is_open: false }, { title: '20-25万', type: '4', is_open: false }, { title: '25-30万', type: '5', is_open: false }, { title: '30-50万', type: '6', is_open: false }, { title: '50万以上', type: '7', is_open: false }]);
 	// 选择的查询条件
-	const brandInfo = ref({});
-	const moneyInfo = ref({});
+	const searchInfo = ref({});
 	const moreList = ref([]);
 	// 列表
 	const list = ref([]);
@@ -118,54 +117,16 @@
 	// 数据是否触底
 	const is_bottom = ref(false);
 	const scrollTop = ref(0);
-	// 字典表
-	const typeList = ref([
-		{
-			title: '5万以下',
-			type: '0',
-		},
-		{
-			title: '5-10万',
-			type: '1',
-		},
-		{
-			title: '10-15万',
-			type: '2',
-		},
-		{
-			title: '更多条件',
-			type: '3',
-		}
-	]);
-	const carList = ref([
-		{
-			title: '大众',
-			type: '0',
-		},
-		{
-			title: '宝马',
-			type: '1',
-		},
-		{
-			title: '本田',
-			type: '2',
-		},
-		{
-			title: '丰田',
-			type: '3',
-		},
-		{
-			title: '更多品牌',
-			type: '4',
-		}
-	]);
-	onLoad(async () => {
+	onLoad(async (options) => {
+		searchInfo.value.brand = options && options.brand || ''
+		searchInfo.value.money = options && options.money || ''
 		await searchConfig();
+		await clearPage();
 		await search();
 	})
 	onShow(() => {
 		uni.$on('toRoute', function (data) {
-			brandInfo.value = data
+			if (data && data.name) searchInfo.value.brand = data.name
 		})
 	})
 	// config信息
@@ -179,7 +140,11 @@
 			limit: limit.value,
 			status: '0'
 		}
-		const res = await $api('car', 'GET',info);
+		console.log(searchInfo.value);
+		const res = await $api('car', 'GET', {
+			...info,
+			...searchInfo.value
+		});
 		if (res.errcode === 0) {
 			list.value = list.value.concat(res.data)
 			total.value = res.total
@@ -227,7 +192,7 @@
 		})
 	};
 	// 选择
-	const toSelect = (data, type) => {
+	const toSelect = async (data, type) => {
 		// 判断点击的是那个筛选
 		if (type == '0') {
 			sortList.value = sortList.value.map((item, index) => {
@@ -245,28 +210,32 @@
 				else item.is_open = false
 				return item
 			})
-			moneyInfo.value = data
+			searchInfo.value.money = data.title
 		}
+		await clearPage();
+		await search();
 	};
 	// 删除筛选
 	const toDelete = (item, type) => {
-		if (type == '0') brandInfo.value = {}
+		if (type == '0') searchInfo.value.brand = ''
 		else if (type == '1') {
 			moneyList.value = moneyList.value.map((item, index) => {
 				if (item.type == '0') item.is_open = true
 				else item.is_open = false
 				return item
 			})
-			moneyInfo.value = {}
+			searchInfo.value.money = ''
 		}
 		else moreList.value = moreList.value.filter((i, index) => i.type != item.type)
 	};
 	// 重置
-	const toReset = () => {
-		brandInfo.value = {}
-		moneyInfo.value = {}
+	const toReset = async () => {
+		searchInfo.value.brand = ''
+		searchInfo.value.money = ''
 		moreList.value = []
 		toClear();
+		await clearPage();
+		await search();
 	};
 	// 清除
 	const toClear = () => {

+ 1 - 1
pagesHome/sell/index.vue

@@ -149,7 +149,7 @@
 	})
 	onShow(() => {
 		uni.$on('toRoute', function (data) {
-			form.value.brand = data.title
+			form.value.brand = data.name
 		})
 		uni.$on('toCity', function (data) {
 			form.value[data.field] = data.name

+ 0 - 1
pagesHome/type/index.vue

@@ -60,7 +60,6 @@
 	};
 	// 查看详情
 	const toView = (item) => {
-		console.log(item);
 		uni.navigateTo({
 			url: `/pagesHome/search/index?type=${item.type || ''}`
 		})

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

@@ -97,12 +97,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       console.log(item);
       if (type == "0" && item.type == "4") {
         common_vendor.index.navigateTo({
-          url: `/pagesHome/brand/index?type=${item.type || ""}`
+          url: `/pagesHome/brand/index?type=${item.type}`
         });
       } else {
-        common_vendor.index.navigateTo({
-          url: `/pagesHome/search/index?type=${item.type || ""}`
-        });
+        if (type == "0") {
+          common_vendor.index.navigateTo({
+            url: `/pagesHome/search/index?brand=${item.name}`
+          });
+        } else {
+          common_vendor.index.navigateTo({
+            url: `/pagesHome/search/index?money=${item.title}`
+          });
+        }
       }
     };
     const toView = (item) => {

+ 16 - 38
unpackage/dist/dev/mp-weixin/pagesHome/brand/index.js

@@ -16,33 +16,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   setup(__props) {
     var _a;
-    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const config = common_vendor.ref({ logoUrl: [] });
-    const indexList = common_vendor.ref(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]);
-    const itemArr = common_vendor.ref([
-      [{ title: "奥迪", url: [], type: "0" }, { title: "爱驰", url: [], type: "0" }, { title: "阿斯顿·马丁", url: [], type: "0" }],
-      [{ title: "宝马", url: [], type: "0" }, { title: "本田", url: [], type: "0" }, { title: "比亚迪", url: [], type: "0" }, { title: "奔腾", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "大众", url: [], type: "0" }, { title: "东风", url: [], type: "0" }, { title: "大运", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }],
-      [{ title: "长安", url: [], type: "0" }, { title: "长城", url: [], type: "0" }, { title: "创维", url: [], type: "0" }]
-    ]);
-    const list = common_vendor.ref([
-      { title: "奥迪", url: [], type: "0" },
-      { title: "本田", url: [], type: "0" },
-      { title: "别克", url: [], type: "0" },
-      { title: "奥迪", url: [], type: "0" },
-      { title: "大众", url: [], type: "0" },
-      { title: "长城", url: [], type: "0" },
-      { title: "福特", url: [], type: "0" },
-      { title: "丰田", url: [], type: "0" },
-      { title: "长安", url: [], type: "0" },
-      { title: "日产", url: [], type: "0" }
-    ]);
+    const indexList = common_vendor.ref([]);
+    const itemArr = common_vendor.ref([]);
     common_vendor.onLoad(async () => {
       await searchConfig();
       await search();
@@ -51,6 +28,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       config.value = common_vendor.index.getStorageSync("config");
     };
     const search = async () => {
+      const res = await $api("brand/index", "GET", {});
+      if (res.errcode === 0) {
+        itemArr.value = res.data.data1;
+        indexList.value = res.data.data2;
+      } else {
+        common_vendor.index.showToast({
+          title: res.errmsg || "",
+          icon: "error"
+        });
+      }
     };
     const toCommon = (item) => {
       common_vendor.index.$emit("toRoute", item);
@@ -61,16 +48,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     return (_ctx, _cache) => {
       return {
-        a: common_vendor.f(list.value, (item, index, i0) => {
-          return {
-            a: item.url && item.url.length > 0 ? item.url[0].url : "/static/logo.png",
-            b: common_vendor.t(item.title),
-            c: index,
-            d: common_vendor.o(($event) => toCommon(item), index)
-          };
-        }),
-        b: _ctx.header,
-        c: common_vendor.f(itemArr.value, (item, index, i0) => {
+        a: common_vendor.f(itemArr.value, (item, index, i0) => {
           return {
             a: "bd19021e-2-" + i0 + "," + ("bd19021e-1-" + i0),
             b: common_vendor.p({
@@ -80,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             }),
             c: common_vendor.f(item, (cell, index2, i1) => {
               return {
-                a: common_vendor.t(cell.title),
+                a: common_vendor.t(cell.name),
                 b: common_vendor.o(($event) => toCommon(cell))
               };
             }),
@@ -89,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             f: index
           };
         }),
-        d: common_vendor.p({
+        b: common_vendor.p({
           ["index-list"]: indexList.value,
           sticky: false,
           activeColor: "#ffbc00"

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/brand/index.wxml


+ 1 - 3
unpackage/dist/dev/mp-weixin/pagesHome/car/index.js

@@ -72,9 +72,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         status: "0",
         shop: shop.value._id
       };
-      const arr = await $api("car", "GET", {
-        ...info2
-      });
+      const arr = await $api("car", "GET", info2);
       if (arr.errcode === 0) {
         list.value = arr.data;
         shop.value.num = arr.total;

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/condition/index.js

@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         brandInfo.value = data;
         tabbar.value = tabbar.value.map((item, index) => {
           if (item.type == "1" && item.value == "0")
-            item.text = data.title;
+            item.text = data.name;
           return item;
         });
       });

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/condition/index.wxml


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

@@ -22,8 +22,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const searchList = common_vendor.ref([{ title: "默认排序", type: "0", is_open: false }, { title: "品牌", type: "1", is_open: false }, { title: "价格", type: "2", is_open: false }, { title: "更多筛选", type: "3", is_open: false }]);
     const sortList = common_vendor.ref([{ title: "默认排序", type: "0", is_open: true }, { title: "最新上架", type: "1", is_open: false }, { title: "车龄最短", type: "2", is_open: false }, { title: "里程最少", type: "3", is_open: false }, { title: "价格最高", type: "4", is_open: false }, { title: "价格最低", type: "5", is_open: false }]);
     const moneyList = common_vendor.ref([{ title: "不限价格", type: "0", is_open: true }, { title: "10万以下", type: "1", is_open: false }, { title: "10-15万", type: "2", is_open: false }, { title: "15-20万", type: "3", is_open: false }, { title: "20-25万", type: "4", is_open: false }, { title: "25-30万", type: "5", is_open: false }, { title: "30-50万", type: "6", is_open: false }, { title: "50万以上", type: "7", is_open: false }]);
-    const brandInfo = common_vendor.ref({});
-    const moneyInfo = common_vendor.ref({});
+    const searchInfo = common_vendor.ref({});
     const moreList = common_vendor.ref([]);
     const list = common_vendor.ref([]);
     const total = common_vendor.ref(0);
@@ -32,53 +31,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const page = common_vendor.ref(0);
     const is_bottom = common_vendor.ref(false);
     common_vendor.ref(0);
-    common_vendor.ref([
-      {
-        title: "5万以下",
-        type: "0"
-      },
-      {
-        title: "5-10万",
-        type: "1"
-      },
-      {
-        title: "10-15万",
-        type: "2"
-      },
-      {
-        title: "更多条件",
-        type: "3"
-      }
-    ]);
-    common_vendor.ref([
-      {
-        title: "大众",
-        type: "0"
-      },
-      {
-        title: "宝马",
-        type: "1"
-      },
-      {
-        title: "本田",
-        type: "2"
-      },
-      {
-        title: "丰田",
-        type: "3"
-      },
-      {
-        title: "更多品牌",
-        type: "4"
-      }
-    ]);
-    common_vendor.onLoad(async () => {
+    common_vendor.onLoad(async (options) => {
+      searchInfo.value.brand = options && options.brand || "";
+      searchInfo.value.money = options && options.money || "";
       await searchConfig();
+      await clearPage();
       await search();
     });
     common_vendor.onShow(() => {
       common_vendor.index.$on("toRoute", function(data) {
-        brandInfo.value = data;
+        if (data && data.name)
+          searchInfo.value.brand = data.name;
       });
     });
     const searchConfig = async () => {
@@ -90,7 +53,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         limit: limit.value,
         status: "0"
       };
-      const res = await $api("car", "GET", info);
+      console.log(searchInfo.value);
+      const res = await $api("car", "GET", {
+        ...info,
+        ...searchInfo.value
+      });
       if (res.errcode === 0) {
         list.value = list.value.concat(res.data);
         total.value = res.total;
@@ -135,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         return item;
       });
     };
-    const toSelect = (data, type2) => {
+    const toSelect = async (data, type2) => {
       if (type2 == "0") {
         sortList.value = sortList.value.map((item, index) => {
           if (item.type == data.type)
@@ -157,12 +124,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             item.is_open = false;
           return item;
         });
-        moneyInfo.value = data;
+        searchInfo.value.money = data.title;
       }
+      await clearPage();
+      await search();
     };
     const toDelete = (item, type2) => {
       if (type2 == "0")
-        brandInfo.value = {};
+        searchInfo.value.brand = "";
       else if (type2 == "1") {
         moneyList.value = moneyList.value.map((item2, index) => {
           if (item2.type == "0")
@@ -171,15 +140,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             item2.is_open = false;
           return item2;
         });
-        moneyInfo.value = {};
+        searchInfo.value.money = "";
       } else
         moreList.value = moreList.value.filter((i, index) => i.type != item.type);
     };
-    const toReset = () => {
-      brandInfo.value = {};
-      moneyInfo.value = {};
+    const toReset = async () => {
+      searchInfo.value.brand = "";
+      searchInfo.value.money = "";
       moreList.value = [];
       toClear();
+      await clearPage();
+      await search();
     };
     const toClear = () => {
       searchList.value = searchList.value.map((i, index) => {
@@ -235,6 +206,12 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       } else
         is_bottom.value = true;
     };
+    const clearPage = () => {
+      list.value = [];
+      skip.value = 0;
+      limit.value = 6;
+      page.value = 0;
+    };
     return (_ctx, _cache) => {
       return common_vendor.e({
         a: common_vendor.o(toChange),
@@ -290,11 +267,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         f: type.value == "2",
         h: is_show.value,
         i: common_vendor.o(toClose),
-        j: Object.keys(brandInfo.value).length > 0 || Object.keys(moneyInfo.value).length > 0 || moreList.value.length > 0
-      }, Object.keys(brandInfo.value).length > 0 || Object.keys(moneyInfo.value).length > 0 || moreList.value.length > 0 ? common_vendor.e({
-        k: brandInfo.value && brandInfo.value.type
-      }, brandInfo.value && brandInfo.value.type ? {
-        l: common_vendor.t(brandInfo.value.title),
+        j: searchInfo.value.brand || searchInfo.value.money || moreList.value.length > 0
+      }, searchInfo.value.brand || searchInfo.value.money || moreList.value.length > 0 ? common_vendor.e({
+        k: searchInfo.value && searchInfo.value.brand
+      }, searchInfo.value && searchInfo.value.brand ? {
+        l: common_vendor.t(searchInfo.value.brand),
         m: common_vendor.p({
           color: "#000",
           size: "14px",
@@ -302,9 +279,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         }),
         n: common_vendor.o(($event) => toDelete({}, "0"))
       } : {}, {
-        o: moneyInfo.value && moneyInfo.value.type
-      }, moneyInfo.value && moneyInfo.value.type ? {
-        p: common_vendor.t(moneyInfo.value.title),
+        o: searchInfo.value && searchInfo.value.money
+      }, searchInfo.value && searchInfo.value.money ? {
+        p: common_vendor.t(searchInfo.value.money),
         q: common_vendor.p({
           color: "#000",
           size: "14px",

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/sell/index.js

@@ -64,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     });
     common_vendor.onShow(() => {
       common_vendor.index.$on("toRoute", function(data) {
-        form.value.brand = data.title;
+        form.value.brand = data.name;
       });
       common_vendor.index.$on("toCity", function(data) {
         form.value[data.field] = data.name;

+ 0 - 1
unpackage/dist/dev/mp-weixin/pagesHome/type/index.js

@@ -30,7 +30,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       value.value = "";
     };
     const toView = (item) => {
-      console.log(item);
       common_vendor.index.navigateTo({
         url: `/pagesHome/search/index?type=${item.type || ""}`
       });