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