sync:每次进入购物车页面请求列表 b858147579
parent
39e04ae78d
commit
c10a1c9adc
|
@ -111,6 +111,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
|
@ -239,6 +240,14 @@
|
||||||
async function onDelete() {
|
async function onDelete() {
|
||||||
cart.delete(state.selectedIds);
|
cart.delete(state.selectedIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCartList() {
|
||||||
|
cart.getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
getCartList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue