迁移党史教育

This commit is contained in:
aixianling
2021-12-20 10:22:24 +08:00
parent e563bd7588
commit 350119e783
9 changed files with 149 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
<template>
<section class="home">
<section class="AppPartyHistoryEducation">
<div class="page">
<div class="title">
<div class="left">
@@ -10,7 +10,8 @@
<img src="https://cdn.cunwuyun.cn/img/down.svg" class="right-icon">
</div>
</div>
<div class="header" v-for="(item, index) in todayList" :key="index" @click="handleGoto(`./todayDetail?id=${item.id}`)">
<div class="header" v-for="(item, index) in todayList" :key="index"
@click="handleGoto(`./todayDetail?id=${item.id}`)">
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length">
<p class="text">{{ item.title }}</p>
<p class="time">{{ item.organizationName }} {{ item.publishDate || '' }}</p>
@@ -27,7 +28,8 @@
</div>
</div>
<div class="tab-content">
<div class="tab-item" v-for="(item, index) in classList" :key="index" @click="handleGoto(`./videoDetail?id=${item.id}`)">
<div class="tab-item" v-for="(item, index) in classList" :key="index"
@click="handleGoto(`./videoDetail?id=${item.id}`)">
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length">
<p>{{ item.title }}</p>
</div>
@@ -45,7 +47,8 @@
</div>
<div class="new-list">
<div class="list-content">
<div class="bg-fff" v-for="(item, index) in knowledgeList" :key="index" @click="handleGoto(`./todayDetail?type=know&id=${item.id}`)">
<div class="bg-fff" v-for="(item, index) in knowledgeList" :key="index"
@click="handleGoto(`./todayDetail?type=know&id=${item.id}`)">
<div class="item">
<div class="info">
<p>{{ item.title }}</p>
@@ -62,8 +65,10 @@
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
name: "AppPartyHistoryEducation",
appName: "党史教育",
computed: {
...mapState(["user", "token"]),
},
@@ -74,7 +79,7 @@ export default {
knowledgeList: []
};
},
onLoad(options) {
onLoad() {
this.getTodayList()
this.getClassList()
this.getKnowledgeList()
@@ -137,19 +142,23 @@ export default {
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
.AppPartyHistoryEducation {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.title {
padding: 28px 16px 28px 28px;
background-color: #fff;
display: flex;
justify-content: space-between;
.tips {
display: inline-block;
width: 8px;
@@ -158,14 +167,16 @@ export default {
vertical-align: middle;
margin-right: 18px;
}
.right-icon {
width: 32px;
height: 32px;
float: right;
vertical-align: middle;
transform: rotate(270deg);
padding: 0px 8px 0 0;
padding: 0 8px 0 0;
}
.left {
font-size: 34px;
font-family: PingFang-SC-Heavy, PingFang-SC;
@@ -173,6 +184,7 @@ export default {
color: #333;
line-height: 48px;
}
.right {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
@@ -181,13 +193,16 @@ export default {
line-height: 40px;
}
}
.header {
padding: 0 34px 40px 34px;
img {
width: 684px;
height: 252px;
margin-bottom: 32px;
}
.text {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
@@ -205,6 +220,7 @@ export default {
line-clamp: 2;
-webkit-box-orient: vertical;
}
.time {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
@@ -213,28 +229,33 @@ export default {
line-height: 30px;
}
}
.line-bg {
width: 100%;
height: 12px;
background: #F2F2F2;
}
.tab-content {
padding: 0 0 40px 30px;
overflow-x: hidden;
height: 236px;
width: 800px;
.tab-item {
float: left;
width: 236px;
height: 236px;
background: #FFF;
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
border-radius: 8px;
margin-right: 16px;
img {
width: 236px;
height: 160px;
}
p {
padding: 12px 8px 0;
font-size: 26px;
@@ -248,12 +269,15 @@ export default {
}
}
}
.new-list {
background-color: #fff;
.list-content {
.bg-fff {
padding: 0 30px;
border-top: 1px solid #ddd;
.item {
padding: 24px 0 32px 0;
border-bottom: 2px solid #eee;
@@ -278,6 +302,7 @@ export default {
-webkit-box-orient: vertical;
margin-bottom: 52px;
}
span {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
@@ -286,6 +311,7 @@ export default {
line-height: 30px;
}
}
img {
width: 224px;
height: 168px;
@@ -293,6 +319,7 @@ export default {
}
}
}
.view-more {
background-color: #fff;
font-size: 28px;

View File

@@ -25,7 +25,7 @@ export default {
classList: []
};
},
onLoad(options) {
onLoad() {
this.getClassList()
},
methods: {

View File

@@ -188,33 +188,33 @@ export default {
.page {
.search-box {
width: 100%;
height: 112rpx;
height: 112px;
background-color: #e60012;
padding: 24rpx 32rpx;
padding: 24px 32px;
box-sizing: border-box;
}
.slect {
width: 100%;
height: 96rpx;
height: 96px;
background-color: #fff;
color: #666;
.type-slect {
width: 50%;
border-right: 1rpx solid #f7f7f7;
margin: 30rpx 0;
border-right: 1px solid #f7f7f7;
margin: 30px 0;
box-sizing: border-box;
text-align: center;
font-size: 26rpx;
font-size: 26px;
.uni-input {
display: inline-block;
}
image {
width: 32rpx;
height: 32rpx;
width: 32px;
height: 32px;
display: inline-block;
position: relative;
top: 6rpx;
margin-left: 8srpx;
top: 6px;
margin-left: 8spx;
}
}
.type-slect:nth-child(2) {
@@ -222,12 +222,12 @@ export default {
}
}
.session-list {
padding-top: 112rpx;
padding-top: 112px;
.session-item {
width: 686rpx;
width: 686px;
padding: 32px;
box-sizing: border-box;
margin: 0 auto 32rpx auto;
margin: 0 auto 32px auto;
background-color: #fff;
position: relative;
overflow: hidden;
@@ -286,7 +286,7 @@ export default {
}
.no-affairs {
width: 100%;
height: calc(100% - 210rpx);
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;

View File

@@ -42,8 +42,12 @@
<div class="session-list">
<div class="session-item" v-for="(item, index) in meetList" :key="index" @click="toDetail(item.id)">
<div class="info">
<p v-if="fromType != 'style'"><span :class="item.style == 0 ? 'status0' : 'status1'">{{item.style == 0 ? '党史知识' : '党史图书馆'}}</span>{{item.title}}</p>
<p v-else><span class="status0">{{ $dict.getLabel(`partyHistoryType${optionStyle}`, item.type) }}</span>{{item.title}}</p>
<p v-if="fromType != 'style'"><span
:class="item.style == 0 ? 'status0' : 'status1'">{{ item.style == 0 ? '党史知识' : '党史图书馆' }}</span>{{ item.title }}
</p>
<p v-else><span class="status0">{{
$dict.getLabel(`partyHistoryType${optionStyle}`, item.type)
}}</span>{{ item.title }}</p>
<span class="time">{{ item.organizationName }} {{ item.createDate }}</span>
</div>
<div class="img" v-if="item.thumbUrl && item.thumbUrl.length">
@@ -88,7 +92,10 @@ export default {
onLoad(options) {
console.log(options)
if (options.type == 'knowledge') {
this.array = [{dictName: "全部类型", dictValue: "0|1"}, {dictName: "党史知识 ", dictValue: 0}, {dictName: "党史图书馆", dictValue: 1}]
this.array = [{dictName: "全部类型", dictValue: "0|1"}, {dictName: "党史知识 ", dictValue: 0}, {
dictName: "党史图书馆",
dictValue: 1
}]
}
if (options.type == 'style') {
this.style = ''
@@ -195,55 +202,64 @@ export default {
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
.search-box {
width: 100%;
height: 112rpx;
height: 112px;
background-color: #e60012;
padding: 24rpx 32rpx;
padding: 24px 32px;
box-sizing: border-box;
}
.slect {
width: 100%;
height: 96rpx;
height: 96px;
background-color: #fff;
color: #666;
.type-slect {
width: 50%;
border-right: 1rpx solid #f7f7f7;
margin: 30rpx 0;
border-right: 1px solid #f7f7f7;
margin: 30px 0;
box-sizing: border-box;
text-align: center;
font-size: 26rpx;
font-size: 26px;
.uni-input {
display: inline-block;
}
image {
width: 32rpx;
height: 32rpx;
width: 32px;
height: 32px;
display: inline-block;
position: relative;
top: 6rpx;
margin-left: 8srpx;
top: 6px;
margin-left: 8 spx;
}
}
.type-slect:nth-child(2) {
border: none;
}
}
.session-list {
padding-top: 112rpx;
padding-top: 112px;
.session-item {
width: 686rpx;
width: 686px;
padding: 32px;
box-sizing: border-box;
margin: 0 auto 32rpx auto;
margin: 0 auto 32px auto;
background-color: #fff;
position: relative;
overflow: hidden;
display: flex;
justify-content: space-between;
border-radius: 8px;
.info {
p {
height: 88px;
@@ -259,6 +275,7 @@ export default {
line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 24px;
span {
display: inline-block;
padding: 0 8px;
@@ -268,15 +285,18 @@ export default {
margin-right: 16px;
border-radius: 8px;
}
.status0 {
color: #2266FF;
background-color: #E8EFFF;
}
.status1 {
color: #FF8822;
background-color: #FFF3E9;
}
}
.time {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
@@ -285,8 +305,10 @@ export default {
line-height: 22px;
}
}
.img {
padding-left: 24px;
img {
width: 192px;
height: 144px;
@@ -294,9 +316,10 @@ export default {
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210rpx);
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;

View File

@@ -33,7 +33,7 @@ export default {
pages: 2
};
},
onLoad(options) {
onLoad() {
this.getTodayList();
},
onShow() {