diff --git a/src/views/SellerDashboard/MyListings/createSelect/historyList.vue b/src/views/SellerDashboard/MyListings/createSelect/historyList.vue index 6c45679f..bcd2ed6c 100644 --- a/src/views/SellerDashboard/MyListings/createSelect/historyList.vue +++ b/src/views/SellerDashboard/MyListings/createSelect/historyList.vue @@ -3,6 +3,7 @@ import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue"; import { Https } from '@/tool/https' import { setPubDate } from "@/tool/util"; import { useI18n } from "vue-i18n"; +import { useStore } from "vuex"; const props = defineProps({ getCollectionListData: { @@ -14,6 +15,7 @@ const emit = defineEmits([ 'selectCollectionItem', ]) const {t} = useI18n() +const store = useStore() const page = ref(1) const size = ref(6) const total = ref(0) @@ -29,9 +31,13 @@ const getListData = ()=>{ } const getCreateList = ()=>{ let data = getListData() + store.commit("set_loading", true) Https.axiosPost(Https.httpUrls.historyProject, data).then((rv)=>{ list.value = rv.content || [] total.value = rv.total || 0 + store.commit("set_loading", false) + }).catch(()=>{ + store.commit("set_loading", false) }) } const selectCollectionItem = (item:any)=>{ diff --git a/src/views/SellerDashboard/MyListings/createSelect/index.vue b/src/views/SellerDashboard/MyListings/createSelect/index.vue index 20cf184c..f8da4b99 100644 --- a/src/views/SellerDashboard/MyListings/createSelect/index.vue +++ b/src/views/SellerDashboard/MyListings/createSelect/index.vue @@ -11,8 +11,8 @@ import { useRouter } from "vue-router" //]) const router = useRouter() let getCollectionListData = reactive({ - searchType: '', - searchText: '', + process: [], + projectName: '', }) const isShowMark = ref(false) @@ -20,8 +20,12 @@ const historyListRef = ref(null) as any const handleSearch = () => { historyListRef.value.getCreateList() } -const setSearchType = (type:any) => { - getCollectionListData.searchType = type +const setProcess = (type:any) => { + if(type){ + getCollectionListData.process = [type] + }else{ + getCollectionListData.process = [] + } historyListRef.value.getCreateList() } const selectCollectionItem = (item:any) => { @@ -47,15 +51,15 @@ defineExpose({})
-
All
-
Series Design
-
Single Design
+
All
+
Series Design
+
Single Design
{ const next = ()=>{ if(chooseList.value.length == 0)return + let designItemIds = chooseList.value.map((item:any)=>({designOutfitUrl:item.designOutfitUrl,designItemId:item.id})) + router.push({ + path:'/home/seller/myListings/edit', + state: { + id:route.params.collectionId, + designItemIds, + } + }) } const config = ref({ diff --git a/src/views/SellerDashboard/MyListings/main/index.vue b/src/views/SellerDashboard/MyListings/main/index.vue index 080fde2f..771a8698 100644 --- a/src/views/SellerDashboard/MyListings/main/index.vue +++ b/src/views/SellerDashboard/MyListings/main/index.vue @@ -5,24 +5,28 @@ import sellerContent from "./content.vue" import myEvent from "@/tool/myEvents.js" import { Https } from '@/tool/https' import { useStore } from "vuex"; +import { useRouter } from 'vue-router' //const props = defineProps({ //}) //const emit = defineEmits([ //]) +const router = useRouter() const store = useStore() let data = reactive({ - listingPopup: true, }) -const newListing = ()=>{ - myEvent.emit('newListing',) -} -const getListingPopup = ()=>{ +const newListing = async ()=>{ + let path = '/home/seller/myListings/select' store.commit("set_loading", true) - Https.getListingPopup().then(res=>{ + //1弹窗 0不弹窗 + Https.axiosGet(Https.httpUrls.getListingPopup,).then((rv)=>{ + if(rv == 0){ + router.push({path:'/home/seller/myListings/select'}) + }else{ + myEvent.emit('newListing',path) + } store.commit("set_loading", false) - data.listingPopup = res.data }).catch(()=>{ store.commit("set_loading", false) }) diff --git a/src/views/SellerDashboard/index.vue b/src/views/SellerDashboard/index.vue index ec3fd089..495ee74a 100644 --- a/src/views/SellerDashboard/index.vue +++ b/src/views/SellerDashboard/index.vue @@ -13,7 +13,7 @@
- +
@@ -48,13 +48,15 @@ path: "/home/seller/settings" } ]) + const toolTipBoxRef = ref(null) const activePath = computed(() => route.path) const handleClick = (path) => { if (path === activePath.value) return router.push(path) } onMounted(()=>{ - myEvent.add('newListing',()=>{ + myEvent.add('newListing',(path)=>{ + toolTipBoxRef.value.routerPath = path visible.value = true }) }) diff --git a/src/views/SellerDashboard/toolTipBox.vue b/src/views/SellerDashboard/toolTipBox.vue index 250b2828..e47b4ed9 100644 --- a/src/views/SellerDashboard/toolTipBox.vue +++ b/src/views/SellerDashboard/toolTipBox.vue @@ -5,6 +5,7 @@ import sellerToolTipImg2 from '@/assets/images/seller/sellerToolTip-2.png' import sellerToolTipImg3 from '@/assets/images/seller/sellerToolTip-3.png' import { useI18n } from 'vue-i18n' import { useRouter } from 'vue-router' +import { Https } from '@/tool/https' const props = defineProps({ visible: { type: Boolean, @@ -38,6 +39,8 @@ let data = reactive({ showAgain: false, }) let toolTipBoxRef = ref(null) +const routerPath = ref('') + const cleardata = ()=>{ emit('update:visible', false) @@ -45,8 +48,9 @@ const cleardata = ()=>{ } const getStarted = ()=>{ + if(data.showAgain){Https.axiosPost(Https.httpUrls.setListingPopup)} emit('update:visible', false) - router.push({path:'/home/seller/myListings/select'}) + router.push({path:routerPath.value}) } @@ -54,7 +58,7 @@ onMounted(()=>{ }) onUnmounted(()=>{ }) -defineExpose({}) +defineExpose({routerPath}) const { showAgain } = toRefs(data);