hookehuyr

fix 购物车显示逻辑调整,获取列表方式调整

<!--
* @Date: 2024-07-23 16:24:08
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 15:12:39
* @LastEditTime: 2024-07-26 16:37:21
* @FilePath: /temple_material_request/src/components/chooseMaterial/index.vue
* @Description: 选择物资组件
-->
<template>
<div v-if="showBottom" class="choose-material-page">
<div class="choose-material-page">
<van-popup
v-model:show="showBottom"
position="bottom"
......@@ -118,10 +118,7 @@ const getList = async () => {
}
onMounted(async () => {
// 获取物资列表
getList();
// 购物车数量
getCartCount();
});
const getCartCount = async () => {
......@@ -138,6 +135,15 @@ watch(
(v) => {
showBottom.value = v;
if (v) {
// 重置查询条件
offset.value = 0;
limit.value = 20;
finished.value = false;
list.value = [];
// 获取物资列表
getList();
// 购物车数量
getCartCount();
}
}
);
......