|
|
|
@ -17,11 +17,11 @@
|
|
|
|
<div class="nav-wrap">
|
|
|
|
<div class="nav-wrap">
|
|
|
|
<!-- Notification Tabs Start -->
|
|
|
|
<!-- Notification Tabs Start -->
|
|
|
|
<ul class="nav nav-tab2 nav-pills" id="pills-tab" role="tablist">
|
|
|
|
<ul class="nav nav-tab2 nav-pills" id="pills-tab" role="tablist">
|
|
|
|
<li class="nav-item" role="presentation" @click="active = 1">
|
|
|
|
<li class="nav-item" role="presentation" @click="changeActive(1)">
|
|
|
|
<button class="nav-link active" id="alert1-tab" data-bs-toggle="pill" data-bs-target="#alert1" type="button"
|
|
|
|
<button class="nav-link active" id="alert1-tab" data-bs-toggle="pill" data-bs-target="#alert1" type="button"
|
|
|
|
role="tab" aria-controls="alert1" aria-selected="true">最愛</button>
|
|
|
|
role="tab" aria-controls="alert1" aria-selected="true">最愛</button>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item" role="presentation" @click="active = 2">
|
|
|
|
<li class="nav-item" role="presentation" @click="changeActive(2)">
|
|
|
|
<button class="nav-link" id="offer1-tab" data-bs-toggle="pill" data-bs-target="#offer1" type="button" role="tab"
|
|
|
|
<button class="nav-link" id="offer1-tab" data-bs-toggle="pill" data-bs-target="#offer1" type="button" role="tab"
|
|
|
|
aria-controls="offer1" aria-selected="true">紀錄</button>
|
|
|
|
aria-controls="offer1" aria-selected="true">紀錄</button>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
@ -106,6 +106,22 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const changeActive = async (type)=>{
|
|
|
|
|
|
|
|
if(type===1){
|
|
|
|
|
|
|
|
active.value = 1
|
|
|
|
|
|
|
|
let res = await getUserFavorite()
|
|
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
|
|
userFavorite.value = res.data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
active.value = 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let res2 = await getUserConnections()
|
|
|
|
|
|
|
|
if (res2.code === 200) {
|
|
|
|
|
|
|
|
userConnections.value = JSON.parse(res2.data)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const goCard = (url) => {
|
|
|
|
const goCard = (url) => {
|
|
|
|
window.open(url + '&nouc=1', '_blank')
|
|
|
|
window.open(url + '&nouc=1', '_blank')
|
|
|
|
@ -121,7 +137,9 @@ const handleAddFavorite = async (userid) => {
|
|
|
|
const handleDeleteUF = async (id) => {
|
|
|
|
const handleDeleteUF = async (id) => {
|
|
|
|
let res = await delFavorite(id)
|
|
|
|
let res = await delFavorite(id)
|
|
|
|
if(res.code === 200){
|
|
|
|
if(res.code === 200){
|
|
|
|
userFavorite.value = userFavorite.value.filter(item => item.id !== id)
|
|
|
|
console.log('delete',id,userFavorite.value)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userFavorite.value = userFavorite.value.filter(item => item.ufid !== id)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|