From 88c66c634f03c17548b272359a2cffd1f140860b Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Tue, 28 Apr 2026 09:36:54 +0800 Subject: [PATCH 1/2] fix --- .../MyListings/createSelect/index.vue | 2 +- .../MyListings/createSelectItem/index.vue | 5 +- .../MyListings/main/content.vue | 129 ++++++++++++++---- 3 files changed, 110 insertions(+), 26 deletions(-) diff --git a/src/views/SellerDashboard/MyListings/createSelect/index.vue b/src/views/SellerDashboard/MyListings/createSelect/index.vue index f8da4b99..34b61a4d 100644 --- a/src/views/SellerDashboard/MyListings/createSelect/index.vue +++ b/src/views/SellerDashboard/MyListings/createSelect/index.vue @@ -62,7 +62,7 @@ defineExpose({}) v-model="getCollectionListData.projectName" :bordered="false" @keydown.enter="handleSearch" - placeholder="123123" + placeholder="Search" /> diff --git a/src/views/SellerDashboard/MyListings/createSelectItem/index.vue b/src/views/SellerDashboard/MyListings/createSelectItem/index.vue index 9944930d..3f4f0743 100644 --- a/src/views/SellerDashboard/MyListings/createSelectItem/index.vue +++ b/src/views/SellerDashboard/MyListings/createSelectItem/index.vue @@ -11,6 +11,9 @@ import { useStore } from 'vuex' //}) //const emit = defineEmits([ //]) +defineOptions({ + name: "myListingsSelectItem" +}) let data = reactive({ }) const store = useStore() @@ -41,7 +44,7 @@ const chooseItem = (item:any)=>{ const next = ()=>{ if(chooseList.value.length == 0)return - let designItemIds = chooseList.value.map((item:any)=>({designOutfitUrl:item.designOutfitUrl,designItemId:item.designItemId})) + let designItemIds = chooseList.value.map((item:any)=>({designOutfitUrl:item.designOutfitUrl,designItemId:item.id})) router.push({ path:'/home/seller/myListings/edit', state: { diff --git a/src/views/SellerDashboard/MyListings/main/content.vue b/src/views/SellerDashboard/MyListings/main/content.vue index ac133e37..67634495 100644 --- a/src/views/SellerDashboard/MyListings/main/content.vue +++ b/src/views/SellerDashboard/MyListings/main/content.vue @@ -4,6 +4,7 @@ import { VueDraggable } from "vue-draggable-plus" import contentItem from "./contentItem.vue" import selectMenu from '@/component/modules/selectMenu.vue' import deleteDrafts from './deleteDrafts.vue' +import { Https } from '@/tool/https' //const props = defineProps({ //}) @@ -12,29 +13,21 @@ import deleteDrafts from './deleteDrafts.vue' let data = reactive({ showDrafts: false, }) +const publishData = reactive({ + pageSize: 10, + pageNum: 1, + isShowMark:false, + isNoData:false, +}) +const noPublishData = reactive({ + pageSize: 10, + pageNum: 1, + isShowMark:false, + isNoData:false, +}) const list = ref([ - { id: "1" }, - { id: "2" }, - { id: "3" }, - { id: "4" }, - { id: "5" }, - { id: "6" }, - { id: "7" }, - { id: "8" }, - { id: "9" }, - { id: "10" } ]) const list2 = ref([ - { id: "1" }, - { id: "2" }, - { id: "3" }, - { id: "4" }, - { id: "5" }, - { id: "6" }, - { id: "7" }, - { id: "8" }, - { id: "9" }, - { id: "10" } ]) const config = ref({ "data-container-type": "root", @@ -77,6 +70,73 @@ const deleteDraft = (item: any)=>{ }) } +const vObserve = { + mounted (el,binding) { + // console.log(binding.instance); + data.isShowMark = false + data.isNoData = false + let parentDom = el.parentNode + new IntersectionObserver( + (entries, observer) => { + // 如果不是相交,则直接返回 + // console.log(entries[0]); + if (!entries[0].intersectionRatio) return; + data.pageNum += 1 + binding.value() + }, + // { root:worksPage } + ).observe(el); + } +} + +const getPublishedData = async ()=>{ + if(publishData.isShowMark && !publishData.isNoData)return + publishData.isShowMark = true + let value = { + pageSize: publishData.pageSize, + pageNum: publishData.pageNum, + status: 1, + } + await getPublishList(value).then((res)=>{ + if(res.content.length == 0)publishData.isNoData = true + list.value.push(...res.content) + }) + publishData.isShowMark = false +} +const getNoPublishedData = async ()=>{ + if(noPublishData.isShowMark && !noPublishData.isNoData)return + noPublishData.isShowMark = true + let value = { + pageSize: noPublishData.pageSize, + pageNum: noPublishData.pageNum, + status: 0, + } + await getPublishList(value).then((res)=>{ + if(res.content.length == 0)noPublishData.isNoData = true + list2.value.push(...res.content) + }) + noPublishData.isShowMark = false +} +const getPublishList = (data:any)=>{ + return new Promise((resolve, reject) => { + Https.axiosGet(Https.httpUrls.getListingList,{params:data}).then((res:any)=>{ + resolve(res) + }).catch((err:any)=>{ + reject(err) + }) + }) +} + +const putListingStatus = ()=>{ + let data = { + id:'', + status:'', + } + Https.axiosPut(Https.httpUrls.putListingStatus,data).then((res:any)=>{ + }) +} + + const draftListing = (item: any)=>{ //数组前面添加item list2.value.unshift(item) @@ -127,11 +187,7 @@ onMounted(()=>{ nextTick(()=>{ resizeObserver = new ResizeObserver((entries) => { for (const entry of entries) { - // 获取元素尺寸 const width = entry.contentRect.width - const height = entry.contentRect.height - const borderBoxSize = entry.borderBoxSize[0] // 包含边框 - const contentBoxSize = entry.contentBoxSize[0] // 内容区域 if(upDataDomWidthTime)clearTimeout(upDataDomWidthTime) upDataDomWidthTime = setTimeout(()=>{ setDomSize(width) @@ -225,6 +281,12 @@ const { showDrafts } = toRefs(data); @draftListing="draftListing" @editListing="editListing" /> +
+ + + + +
@@ -259,6 +321,12 @@ const { showDrafts } = toRefs(data); @editListing="editListing" @publishListing="publishListing" /> +
+ + + + +
@@ -329,6 +397,19 @@ const { showDrafts } = toRefs(data); &::-webkit-scrollbar { display: none; } + > .material_content_list_loding{ + width: 100%; + height: 5rem; + aspect-ratio: 1/1; + overflow: hidden; + display: flex; + justify-content: center; + > img{ + width: 100%; + height: 100%; + object-fit: contain; + } + } } } } From 27da8f668079d8cd43b2485cb7c210bcabfff6b1 Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Tue, 28 Apr 2026 09:38:15 +0800 Subject: [PATCH 2/2] fix --- .../SellerDashboard/MyListings/createSelectItem/index.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/views/SellerDashboard/MyListings/createSelectItem/index.vue b/src/views/SellerDashboard/MyListings/createSelectItem/index.vue index 3f4f0743..9944930d 100644 --- a/src/views/SellerDashboard/MyListings/createSelectItem/index.vue +++ b/src/views/SellerDashboard/MyListings/createSelectItem/index.vue @@ -11,9 +11,6 @@ import { useStore } from 'vuex' //}) //const emit = defineEmits([ //]) -defineOptions({ - name: "myListingsSelectItem" -}) let data = reactive({ }) const store = useStore() @@ -44,7 +41,7 @@ const chooseItem = (item:any)=>{ const next = ()=>{ if(chooseList.value.length == 0)return - let designItemIds = chooseList.value.map((item:any)=>({designOutfitUrl:item.designOutfitUrl,designItemId:item.id})) + let designItemIds = chooseList.value.map((item:any)=>({designOutfitUrl:item.designOutfitUrl,designItemId:item.designItemId})) router.push({ path:'/home/seller/myListings/edit', state: {