门户改版代码提交

This commit is contained in:
jiangzhe 2024-07-22 10:34:23 +08:00
parent 2c9e873408
commit 9a96d2517f
9 changed files with 384 additions and 282 deletions

View File

@ -22,9 +22,6 @@
<style scoped lang='scss'> <style scoped lang='scss'>
.app_footer { .app_footer {
overflow: hidden; overflow: hidden;
background-color: #fff;
padding-top: 20px;
.extra { .extra {
background-color: #1F6682; background-color: #1F6682;

View File

@ -196,7 +196,7 @@ const handleSubjectClick = (item) => {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 10px; gap: 10px;
width: 1240px; width: 1240px;
height: 300px; height: 220px;
background-color: #D7F3EE; background-color: #D7F3EE;
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
@ -220,7 +220,7 @@ const handleSubjectClick = (item) => {
.stat-item-img { .stat-item-img {
border-radius: 10px; border-radius: 10px;
background-color: #D4F3ED; background-color: #D4F3ED;
height: 180px; height: 100px;
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -236,8 +236,8 @@ const handleSubjectClick = (item) => {
} }
.column { .column {
height: 290px; height: 280px;
margin-top: 20px; margin-top: 10px;
::v-deep() { ::v-deep() {
.el-card { .el-card {
@ -277,7 +277,7 @@ const handleSubjectClick = (item) => {
padding: 0; padding: 0;
.class-book { .class-book {
height: 95px; height: 70px;
display: grid; display: grid;
grid-template-columns: repeat(12, 1fr); grid-template-columns: repeat(12, 1fr);
gap: 8px; gap: 8px;

View File

@ -4,9 +4,24 @@ import LayoutFooter from './components/LayoutFooter.vue'
</script> </script>
<template> <template>
<div class="box">
<LayoutHeader /> <LayoutHeader />
<!-- 添加key 破坏复用机制 强制销毁重建 --> <!-- 添加key 破坏复用机制 强制销毁重建 -->
<!-- <RouterView :key="$route.fullPath" /> --> <!-- <RouterView :key="$route.fullPath" /> -->
<RouterView /> <RouterView class="content" />
<LayoutFooter /> <LayoutFooter class="footer" />
</div>
</template> </template>
<style scoped lang="scss">
.box {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.content {
flex: 1;
}
}
</style>

View File

@ -1,6 +1,14 @@
<template> <template>
<div class="my-container">
<MyHeader></MyHeader> <MyHeader></MyHeader>
<div class="container"> <div class="container">
<div class="bread-container">
<el-breadcrumb separator=">">
<el-breadcrumb-item :to="{ path: '/myUpload' }">个人中心</el-breadcrumb-item>
<el-breadcrumb-item>我的收藏</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-card v-loading="loading" element-loading-text="数据加载中..."> <el-card v-loading="loading" element-loading-text="数据加载中...">
<div class="book-grid" v-if="resourceList.length > 0"> <div class="book-grid" v-if="resourceList.length > 0">
<el-card v-for="item in resourceList"> <el-card v-for="item in resourceList">
@ -33,6 +41,7 @@
</el-card> </el-card>
</div> </div>
<MyFooter></MyFooter> <MyFooter></MyFooter>
</div>
</template> </template>
<script setup> <script setup>
@ -75,7 +84,7 @@ const handleSizeChange = (val) => {
} }
const goto = (item) => { const goto = (item) => {
router.push({ path: 'subjectDetail', query: { id: item.id } }) // router.push({ path: 'subjectDetail', query: { id: item.id } })
} }
const handleCollect = async (item) => { const handleCollect = async (item) => {
@ -94,7 +103,26 @@ const handleCollect = async (item) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.my-container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.container { .container {
.bread-container {
padding: 25px 0;
:deep(.el-breadcrumb__inner) {
color: #fff;
font-size: 16px;
}
:deep(.el-breadcrumb__separator) {
color: #fff;
}
}
.book-grid { .book-grid {
margin-top: 10px; margin-top: 10px;
display: grid; display: grid;
@ -132,4 +160,5 @@ const handleCollect = async (item) => {
justify-content: end justify-content: end
} }
} }
}
</style> </style>

View File

@ -1,6 +1,14 @@
<template> <template>
<div class="my-container">
<MyHeader></MyHeader> <MyHeader></MyHeader>
<div class="container"> <div class="container">
<div class="bread-container">
<el-breadcrumb separator=">">
<el-breadcrumb-item :to="{ path: '/myUpload' }">个人中心</el-breadcrumb-item>
<el-breadcrumb-item>我的点赞</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-card v-loading="loading" element-loading-text="数据加载中..."> <el-card v-loading="loading" element-loading-text="数据加载中...">
<div class="book-grid" v-if="resourceList.length > 0"> <div class="book-grid" v-if="resourceList.length > 0">
<el-card v-for="item in resourceList"> <el-card v-for="item in resourceList">
@ -33,6 +41,7 @@
</el-card> </el-card>
</div> </div>
<MyFooter></MyFooter> <MyFooter></MyFooter>
</div>
</template> </template>
<script setup> <script setup>
@ -75,7 +84,7 @@ const handleSizeChange = (val) => {
} }
const goto = (item) => { const goto = (item) => {
router.push({ path: 'subjectDetail', query: { id: item.id } }) // router.push({ path: 'subjectDetail', query: { id: item.id } })
} }
const handleLike = async (item) => { const handleLike = async (item) => {
@ -94,7 +103,26 @@ const handleLike = async (item) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.my-container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.container { .container {
.bread-container {
padding: 25px 0;
:deep(.el-breadcrumb__inner) {
color: #fff;
font-size: 16px;
}
:deep(.el-breadcrumb__separator) {
color: #fff;
}
}
.book-grid { .book-grid {
margin-top: 10px; margin-top: 10px;
display: grid; display: grid;
@ -132,4 +160,5 @@ const handleLike = async (item) => {
justify-content: end justify-content: end
} }
} }
}
</style> </style>

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="my-container">
<MyHeader></MyHeader> <MyHeader></MyHeader>
<div class="container"> <div class="container">
<div class="bread-container">
<el-breadcrumb separator=">">
<el-breadcrumb-item :to="{ path: '/myUpload' }">个人中心</el-breadcrumb-item>
<el-breadcrumb-item>我的收藏</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-card v-loading="loading" element-loading-text="数据加载中..."> <el-card v-loading="loading" element-loading-text="数据加载中...">
<div class="book-grid" v-if="resourceList.length > 0"> <div class="book-grid" v-if="resourceList.length > 0">
<el-card v-for="item in resourceList"> <el-card v-for="item in resourceList">
@ -28,6 +35,7 @@
</el-card> </el-card>
</div> </div>
<MyFooter></MyFooter> <MyFooter></MyFooter>
</div>
</template> </template>
<script setup> <script setup>
@ -70,12 +78,31 @@ const handleSizeChange = (val) => {
} }
const goto = (item) => { const goto = (item) => {
router.push({ path: 'subjectDetail', query: { id: item.id } }) // router.push({ path: 'subjectDetail', query: { id: item.id } })
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.my-container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.container { .container {
.bread-container {
padding: 25px 0;
:deep(.el-breadcrumb__inner) {
color: #fff;
font-size: 16px;
}
:deep(.el-breadcrumb__separator) {
color: #fff;
}
}
.book-grid { .book-grid {
margin-top: 10px; margin-top: 10px;
display: grid; display: grid;
@ -113,4 +140,5 @@ const goto = (item) => {
justify-content: end justify-content: end
} }
} }
}
</style> </style>

View File

@ -1,4 +1,5 @@
<template> <template>
<div class="my-container">
<MyHeader></MyHeader> <MyHeader></MyHeader>
<div class="container"> <div class="container">
<div class="bread-container"> <div class="bread-container">
@ -55,11 +56,10 @@
<el-pagination class="footer" background layout="prev, pager, next, sizes,jumper" :total="total" <el-pagination class="footer" background layout="prev, pager, next, sizes,jumper" :total="total"
@current-change="handleCurrentChange" @size-change="handleSizeChange" /> @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</template> </template>
</el-card> </el-card>
</div> </div>
<MyFooter></MyFooter> <MyFooter></MyFooter>
</div>
</template> </template>
<script setup> <script setup>
@ -150,16 +150,8 @@ const handleClear = () => {
myUploadListData() myUploadListData()
} }
const goTarget = (url) => {
window.open(url, '__blank');
}
const handleRowClick = (row) => { const handleRowClick = (row) => {
if (row.type == 1) {
goTarget(row.url)
} else {
router.push(`news/${row.trendId}`)
}
} }
const preview = (item) => { const preview = (item) => {
@ -181,7 +173,15 @@ const handleDelete = async (row) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.my-container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.container { .container {
flex: 1;
.bread-container { .bread-container {
padding: 25px 0; padding: 25px 0;
@ -216,4 +216,5 @@ const handleDelete = async (row) => {
} }
} }
}
</style> </style>

View File

@ -8,7 +8,10 @@
</div> </div>
<el-collapse v-model="activeNames"> <el-collapse v-model="activeNames">
<el-collapse-item title="" name="1"> <el-collapse-item title="" name="1" style="position: relative;">
<template #title>
<div style="position: absolute;right: 30px;font-size: 16px;">{{ activeNames == '1' ? '收起' : '展开' }}</div>
</template>
<el-form label-width="auto" style="padding-left: 20px;"> <el-form label-width="auto" style="padding-left: 20px;">
<el-form-item v-if="textbook2List && textbook2List.length" label="学段"> <el-form-item v-if="textbook2List && textbook2List.length" label="学段">
<el-radio-group v-model="radio2" @change="handle2Change"> <el-radio-group v-model="radio2" @change="handle2Change">

View File

@ -19,12 +19,12 @@
<span>上传时间{{ info.createTime }}</span> <span>上传时间{{ info.createTime }}</span>
<el-icon @click="handleLike"> <el-icon @click="handleCollect">
<Star :color="isLike ? '#FE4A4B' : ''" /> <Star :color="isCollect ? '#FE4A4B' : ''" />
</el-icon> </el-icon>
<el-icon @click="handleCollect"> <el-icon @click="handleLike">
<Pointer :color="isCollect ? '#FE4A4B' : ''" /> <Pointer :color="isLike ? '#FE4A4B' : ''" />
</el-icon> </el-icon>
<span> <span>