宣传资讯

This commit is contained in:
shijingjing
2022-04-24 11:38:19 +08:00
parent 2c299ab442
commit c28a0e6794
3 changed files with 261 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<template>
<div class="AppInfotainment">
<div>
<div class="title">点击进入栏目</div>
<div class="project">
<span @click="toProject">通知公告</span>
</div>
</div>
<!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else /> -->
</div>
</template>
<script>
export default {
name: 'AppInfotainment',
appName: '宣传资讯',
data() {
return {
}
},
methods: {
toProject() {
uni.navigateTo({url: './projectList'})
}
},
onShow() {
document.title = '政策动态'
},
}
</script>
<style lang="scss" scoped>
.uni-page-body {
background: pink !important;
}
.AppInfotainment {
.title {
padding: 30px;
box-sizing: border-box;
color: #B9B9B9;
font-size: 26px;
}
.project {
padding: 10px 30px;
box-sizing: border-box;
span {
padding: 5px 20px;
border: 1px solid #CBCBCB;
border-radius: 24px;
margin-right: 20px;
}
}
}
</style>

View File

@@ -0,0 +1,59 @@
<template>
<div class="detail">
<h2 class="title">加强检疫,精准防控广州举办疫情防 控新</h2>
<div>通知公告 2021-06-23</div>
<u-parse :html="content" />
<div class="accessory">
<p>附件</p>
</div>
</div>
</template>
<script>
export default {
name: 'detail',
data () {
return {}
},
methods: {
// 下载附件
// previewFile(file) {
// let fileList = [{
// index: 0,
// url: file.accessUrl
// }]
// if(file.postfix == ".png" || file.postfix == "jpg") {
// uni.previewImage({
// urls: fileList.map(v => v.url),
// current: file.accessUrl
// })
// } else {
// wx.downloadFile({
// url: file.accessUrl,
// success: function (res) {
// const filePath = res.tempFilePath
// wx.openDocument({
// filePath: filePath,
// success: function (res) {
// console.log('打开文档成功')
// }
// })
// }
// })
// }
// },
},
onShow() {
document.title = '详情'
},
}
</script>
<style>
</style>

View File

@@ -0,0 +1,145 @@
<template>
<div class="projectList">
<AiTopFixed>
<scroll-view :scroll-x="true" style="width: 100%;background: #FFF;">
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item.name}}<span></span></div>
</div>
</scroll-view>
</AiTopFixed>
<div class="List">
<div class="item">
<!-- <video class="banner-img" :src="item.videoUrl"></video> -->
<div class="info">
<div class="left">
<h2>最新消息我国正在研制鼻喷或 雾化的新型,最新消息我国正在研制鼻喷或 雾化的新型,最新消息我国正在研制鼻喷或 雾化的新型</h2>
<p><span>通知公告</span> 2021-06-23</p>
</div>
<div class="right">
<!-- <img src="" alt=""> -->
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'projectList',
data() {
return {
tabIndex: 0,
tabs: [
{id:'A1',name:'全部'},
{id:'A2',name:'通知公告'},
{id:'A3',name:'工作动态'},
{id:'A4',name:'惠民政策'},
{id:'A5',name:'中央政策'},
{id:'A6',name:'政策动态'},
{id:'A7',name:'新闻资讯'},
{id:'A8',name:'军事新闻'},
{id:'A9',name:'娱乐大事件'},],
}
},
methods: {
// scroll(e) {
// console.log(e);
// },
tabClick(index) {
this.tabIndex = index;
}
},
onShow() {
document.title = '新闻列表'
},
}
</script>
<style lang="scss" scoped>
.projectList {
::v-deep .AiTopFixed .content {
padding: 0 30px;
}
.tab-select {
width: 100%;
height: 90px;
line-height: 90px;
background: #FFF;
display: flex;
.item{
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666666;
white-space: nowrap;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #3376FD;
span{
width: 48px;
height: 4px;
background: #3376FD;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.List {
padding: 0 30px;
box-sizing: border-box;
background: #FFF;
.item {
padding: 30px 0 20px 0;
border-bottom: 1px solid #DDDDDD ;
.info {
display: flex;
.left {
width: 420px;
h2 {
font-size: 30px;
color: #333333;
font-weight: 600;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
p {
margin-top: 30px;
font-size: 22px;
color: #999999;
span {
margin-right: 20px;
}
}
}
.right {
width: 224px;
height: 140px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
}
</style>