分类列表页面重置

parent 40df2a4a
......@@ -92,7 +92,13 @@
<!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 -->
<Position v-show="rotate2" @nearby="nearby" @popular="popular" @region="region" />
<Position
v-show="rotate2"
@nearby="nearby"
@popular="popular"
@region="region"
@refresh="refreshList"
/>
<!-- 排序筛选 -->
<Sort v-show="rotate3" @sortParams="sortParams" />
</view>
......@@ -160,6 +166,17 @@ const nearby = (distance) => {
getMerchantList();
});
};
function refreshList() {
delete params.value.distance;
delete params.value.area;
delete params.value.communityName;
params.value.isEnd = false;
params.value.current = 1;
setTimeout(() => {
rotate2.value = false;
}, 400);
getMerchantList();
}
// communityName参数来源
const popular = (communityName) => {
params.value.communityName = communityName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment