门户改版代码提交

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'>
.app_footer {
overflow: hidden;
background-color: #fff;
padding-top: 20px;
.extra {
background-color: #1F6682;

View File

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

View File

@ -4,9 +4,24 @@ import LayoutFooter from './components/LayoutFooter.vue'
</script>
<template>
<div class="box">
<LayoutHeader />
<!-- 添加key 破坏复用机制 强制销毁重建 -->
<!-- <RouterView :key="$route.fullPath" /> -->
<RouterView />
<LayoutFooter />
<RouterView class="content" />
<LayoutFooter class="footer" />
</div>
</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>
<div class="my-container">
<MyHeader></MyHeader>
<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="数据加载中...">
<div class="book-grid" v-if="resourceList.length > 0">
<el-card v-for="item in resourceList">
@ -33,6 +41,7 @@
</el-card>
</div>
<MyFooter></MyFooter>
</div>
</template>
<script setup>
@ -75,7 +84,7 @@ const handleSizeChange = (val) => {
}
const goto = (item) => {
router.push({ path: 'subjectDetail', query: { id: item.id } })
// router.push({ path: 'subjectDetail', query: { id: item.id } })
}
const handleCollect = async (item) => {
@ -94,7 +103,26 @@ const handleCollect = async (item) => {
</script>
<style lang="scss" scoped>
.my-container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.container {
.bread-container {
padding: 25px 0;
:deep(.el-breadcrumb__inner) {
color: #fff;
font-size: 16px;
}
:deep(.el-breadcrumb__separator) {
color: #fff;
}
}
.book-grid {
margin-top: 10px;
display: grid;
@ -132,4 +160,5 @@ const handleCollect = async (item) => {
justify-content: end
}
}
}
</style>

View File

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

View File

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

View File

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

View File

@ -8,7 +8,10 @@
</div>
<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-item v-if="textbook2List && textbook2List.length" label="学段">
<el-radio-group v-model="radio2" @change="handle2Change">

View File

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