2024-03-30 18:04:30 +08:00
|
|
|
<script setup>
|
|
|
|
import order from './component/order.vue';
|
|
|
|
import shop from './component/shop.vue';
|
|
|
|
import padding from './component/padding.vue';
|
2024-04-01 17:45:21 +08:00
|
|
|
import pupop from './component/pupop.vue';
|
|
|
|
import { ref, nextTick } from 'vue';
|
|
|
|
import { storeListApi } from "@/api/store.js";
|
|
|
|
import { useUserStore } from "@/store/user.js";
|
|
|
|
|
|
|
|
const pupopRef = ref(null);
|
2024-04-01 18:03:13 +08:00
|
|
|
const orderRef = ref(null);
|
|
|
|
const shopRef = ref(null);
|
2024-04-01 17:45:21 +08:00
|
|
|
|
|
|
|
const storeList = ref([]);
|
|
|
|
|
|
|
|
const where = ref({
|
|
|
|
page: 1,
|
|
|
|
limit: 30,
|
|
|
|
})
|
|
|
|
const getStoreList = (data)=>{
|
|
|
|
where.value = {
|
|
|
|
...where.value,
|
|
|
|
...data
|
|
|
|
}
|
|
|
|
storeListApi(where.value).then(res=>{
|
|
|
|
storeList.value = res.data.list;
|
|
|
|
})
|
|
|
|
}
|
|
|
|
getStoreList();
|
|
|
|
|
2024-04-01 18:03:13 +08:00
|
|
|
const changeItem = (item)=>{
|
|
|
|
orderRef.value.getList(item);
|
|
|
|
}
|
|
|
|
|
2024-04-01 17:45:21 +08:00
|
|
|
nextTick(() => {
|
|
|
|
// pupopRef.value.show(true);
|
|
|
|
})
|
|
|
|
|
2024-03-30 18:04:30 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="my-card">
|
2024-04-01 18:03:13 +08:00
|
|
|
<order ref="orderRef"/>
|
2024-03-30 18:04:30 +08:00
|
|
|
<padding />
|
2024-04-01 18:03:13 +08:00
|
|
|
<shop ref="shopRef" style="flex: 1" :storeList="storeList" @getStoreList="getStoreList" @changeItem="changeItem"/>
|
2024-04-01 17:45:21 +08:00
|
|
|
<pupop ref="pupopRef"/>
|
2024-03-30 18:04:30 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2024-04-01 17:45:21 +08:00
|
|
|
<style lang="scss">
|
2024-03-30 18:04:30 +08:00
|
|
|
.my-card{
|
|
|
|
display: flex;
|
|
|
|
}
|
2024-04-01 17:45:21 +08:00
|
|
|
/* 修改滚动条的样式 */
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 5px; /* 设置滚动条的宽度 */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 设置滚动条的轨道样式 */
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
background-color: #f1f1f1; /* 设置轨道的背景色 */
|
|
|
|
margin: 20px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 设置滚动条的滑块样式 */
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
background-color: #ccc; /* 设置滑块的背景色 */
|
|
|
|
border-radius: 5px; /* 设置滑块的圆角 */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 设置滚动条鼠标悬停时的滑块样式 */
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
|
|
|
}
|
2024-03-30 18:04:30 +08:00
|
|
|
</style>
|