This commit is contained in:
A1300399510 2023-07-19 10:50:17 +08:00
parent 44ef3701f8
commit ea4b66db95

View File

@ -1,5 +1,6 @@
<template>
<header-nav></header-nav>
<!-- <header-nav></header-nav> -->
<pageTopBar></pageTopBar>
<div class="user-box">
<div class="info-box flexacenter">
@ -80,6 +81,10 @@
</div>
</div>
<div class="empty-box flexcenter wid1200">
<empty-duck></empty-duck>
</div>
<!-- 有疑问 -->
<have-questions></have-questions>
@ -92,12 +97,14 @@
</template>
<script setup>
import pageTopBar from '../components/pageTopBar/pageTopBar.vue';
import headerNav from '@/components/public/head.vue'
import systematicNotificationPop from '@/components/user/systematic-notification-pop.vue'
import haveQuestions from '@/components/public/have-questions.vue'
import pageFooter from '@/components/footer/footer.vue'
import biserialListItem from '@/components/biserialListItem/biserialListItem.vue'
import publicListItem from '@/components/public/public-list-item.vue'
import emptyDuck from '@/components/public/empty-duck.vue'
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
import { ElLoading } from 'element-plus'
@ -144,10 +151,10 @@ async function init() {
// let loading = null
let loading = ElLoading.service({
lock: true,
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)',
visible: false
lock: true,
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)',
visible: false
});
let publishData = ref({
@ -171,7 +178,7 @@ const getPublishData = () => {
let data = res.data
stat.value = data['stat']
publishData.value['page'] = data['page'] * data['limit'] >= data['count'] ? 0 : data['page'] + 1
publishData.value['list'] = publishData.value['list'].concat(data['data'])
publishData.value['list'] = publishData.value['list'].concat(data['data'] || [])
}).finally(() => {
loading.close()
})
@ -196,7 +203,7 @@ const getFavData = () => {
if (res.code != 200) return
let data = res.data
favData.value['page'] = data['page'] * data['limit'] >= data['count'] ? 0 : data['page'] + 1
favData.value['list'] = favData.value['list'].concat(data['data'])
favData.value['list'] = favData.value['list'].concat(data['data'] || [])
}).finally(() => {
loading.close()
})
@ -210,18 +217,18 @@ const cutTab = (value) => {
}
let cancelCollection = data => {
favData.value.list.splice(data['index'], 1)
// proxy.$post("/tenement/pc/api/user/favList", {
// }).then(res => {
// console.log(res, "res");
// })
proxy.$post("/tenement/relation/operation", {
token: data['token']
}).then(res => {
console.log(res, "res");
if (res.code != 200) return
favData.value.list.splice(data['index'], 1)
})
}
</script>
<style lang="less">
<style lang="less" scoped>
.user-box {
width: 1200px;
height: 238px;
@ -434,4 +441,12 @@ let cancelCollection = data => {
margin-bottom: 20px;
}
}
.empty-box {
background-color: #FFFFFF;
height: 500px;
margin: 0 auto;
justify-content: center;
align-items: center;
}
</style>