Files
aida_front/src/views/SellerDashboard/MyListings/main/index.vue

100 lines
2.1 KiB
Vue
Raw Normal View History

2026-04-09 10:31:29 +08:00
<script setup lang="ts">
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
2026-04-09 10:39:02 +08:00
import sellerHeader from "../../seller-header.vue"
2026-04-09 13:36:03 +08:00
import sellerContent from "./content.vue"
2026-04-10 14:40:48 +08:00
import myEvent from "@/tool/myEvents.js"
2026-04-27 09:50:20 +08:00
import { Https } from '@/tool/https'
2026-04-27 09:39:26 +08:00
import { useStore } from "vuex";
2026-04-27 11:07:51 +08:00
import { useRouter } from 'vue-router'
2026-04-27 09:39:26 +08:00
2026-04-09 10:31:29 +08:00
//const props = defineProps({
//})
//const emit = defineEmits([
//])
2026-04-27 11:07:51 +08:00
const router = useRouter()
2026-04-27 09:39:26 +08:00
const store = useStore()
2026-04-09 10:31:29 +08:00
let data = reactive({
})
2026-04-27 11:07:51 +08:00
const newListing = async ()=>{
let path = '/home/seller/myListings/select'
2026-04-27 09:39:26 +08:00
store.commit("set_loading", true)
2026-04-27 11:07:51 +08:00
//1弹窗 0不弹窗
Https.axiosGet(Https.httpUrls.getListingPopup,).then((rv)=>{
if(rv == 0){
router.push({path:'/home/seller/myListings/select'})
}else{
myEvent.emit('newListing',path)
}
2026-04-27 09:39:26 +08:00
store.commit("set_loading", false)
}).catch(()=>{
store.commit("set_loading", false)
})
2026-04-10 14:40:48 +08:00
}
2026-04-09 10:31:29 +08:00
onMounted(()=>{
2026-04-27 09:39:26 +08:00
let listingPopup = sessionStorage.getItem('listingPopup')
2026-04-09 10:31:29 +08:00
})
onUnmounted(()=>{
})
defineExpose({})
const {} = toRefs(data);
</script>
<template>
<div class="myListings-seller">
2026-05-06 16:06:54 +08:00
<seller-header :displayBack="false">
2026-04-09 10:31:29 +08:00
<template #right>
2026-04-10 14:40:48 +08:00
<div class="button" @click="newListing">
2026-05-04 14:06:16 +08:00
<span>{{ $t('Seller.newListing') }}</span>
2026-04-09 10:31:29 +08:00
<div class="icon">
<i class="fi fi-br-plus"></i>
</div>
</div>
</template>
</seller-header>
<div class="content">
2026-04-09 13:36:03 +08:00
<sellerContent></sellerContent>
2026-04-09 10:31:29 +08:00
</div>
</div>
</template>
<style scoped lang="less">
.myListings-seller {
2026-04-09 13:36:03 +08:00
flex: 1;
// overflow: hidden;
2026-04-09 10:31:29 +08:00
position: relative;
display: flex;
flex-direction: column;
.button {
width: 16rem;
2026-04-09 13:36:03 +08:00
height: 6rem;
2026-04-09 10:31:29 +08:00
border-radius: 4rem;
display: flex;
border: 1.5px solid #000000;
background-color: #000;
color: #fff;
transition: all .3s;
gap: .8rem;
align-items: center;
justify-content: center;
font-size: 1.6rem;
cursor: pointer;
i{
color: #fff;
display: flex;
font-size: 1.6rem;
}
&:hover{
background-color: #fff;
color: #000;
i{
color: #000;
}
}
}
> .content {
margin-top: 2rem;
flex: 1;
2026-04-09 13:48:46 +08:00
position: relative;
2026-04-09 10:31:29 +08:00
}
}
2026-04-29 15:21:50 +08:00
</style>