持续集成分支

This commit is contained in:
aixianling
2024-10-31 14:34:57 +08:00
parent 6a833be062
commit 8c56cf808b
2165 changed files with 4116 additions and 8716 deletions

View File

@@ -0,0 +1,108 @@
<template>
<div class="AppInfotainment">
<div class="fiveIndustry" v-if="list.length">
<div class="title">
<h2>{{ parentName }}</h2>
<p v-if="parentName == '产业振兴'">实现乡村振兴的物质基础</p>
<p v-if="parentName == '组织振兴'">保障乡村振兴的政治基础</p>
<p v-if="parentName == '人才振兴'">推动乡村振兴的重要因素</p>
<p v-if="parentName == '文化振兴'">稳固乡村振兴的思想保障</p>
<p v-if="parentName == '生态振兴'">构建乡村振兴的环境基础</p>
</div>
<div class="list">
<div class="item" v-for="(item,index) in list" :key="index" @click="toNewList(item.id,item.categoryName)">
<span>{{ item.categoryName }}</span>
<span><u-icon name="arrow-right"></u-icon></span>
</div>
</div>
</div>
<AiEmpty description="暂无数据" v-else />
</div>
</template>
<script>
export default {
name: 'AppInfotainment',
appName: '宣传资讯',
data() {
return {
current: 1,
categoryType: '0',
list: [],
parentName: '',
}
},
onLoad(o) {
this.parentName = o.listName
},
onShow() {
document.title = this.parentName
if(this.parentName) {
this.getList()
}
},
methods: {
getList() {
this.$http.post('/app/apppublicitycategory/list',null,{
params: {
current: this.current,
parentName: this.parentName,
categoryType: '1',
}
}).then((res)=>{
if (res?.data) {
this.list = this.current == 1? res.data.records:[...this.list,...res.data.records,]
}
})
},
toNewList(id,categoryName) {
uni.navigateTo({url: `./newsList?id=${id}&parentName=${categoryName}`})
}
},
onReachBottom() {
this.current ++,
this.getList()
}
}
</script>
<style lang="scss" scoped>
.AppInfotainment {
::v-deep .AppInfotainment {
background: none;
}
.fiveIndustry {
.title {
padding: 30px 32px;
box-sizing: border-box;
height: 256px;
background: #FFF url('./components/bg.png') no-repeat right;
background-size: 336px 256px;
h2 {
margin-top: 20px;
font-size: 50px;
font-weight: 800;
}
p {
margin-top: 16px;
font-size: 30px;
color: #999999;
}
}
.list {
margin-top: 24px;
background: #FFF;
padding: 0 32px 40px 32px;
box-sizing: border-box;
.item {
display: flex;
justify-content: space-between;
padding: 30px 0;
border-bottom: 1px solid #D8DDE6;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

View File

@@ -0,0 +1,568 @@
<template>
<div class="news-detail" v-if="pageShow">
<div class="detail-top" :class="[info.videoFile ? 'detail-top__active' : '']">
<h2>{{ info.title }}</h2>
<p><span>{{ info.categoryName }}</span>{{ $dateFormat(info.createTime) }}</p>
<u-parse :html="info.content" style="margin-top: 20px;"/>
</div>
<div class="accessory-list" v-if="info.files.length">
<p>
<u-icon name="attach" color="#2979ff" size="28"></u-icon>
附件
</p>
<div class="card-list">
<div class="item" v-for="(item,index) in info.files" :key="index" @click="prevFile(item)">
<img src="./components/files.png" alt="">
<div>{{ item.fileName }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
name: 'newsDetail',
data() {
return {
isShowComment: false,
info: {files: []},
imageProp: {
mode: 'widthFix',
padding: 0,
lazyLoad: false,
domain: ''
},
bottom: 0,
placeholder: '',
pageShow: false,
commnet: '',
commentList: [],
commnetId: '',
areaId: '',
focus: false,
current: 0,
isMore: false,
commentsTotal: 0,
fileList: []
}
},
onLoad(params) {
this.id = params.id
this.$nextTick(() => {
this.getDetail()
this.getComments()
})
},
methods: {
getDetail() {
this.$http.post('/app/apppublicityinfo/queryDetailById', null, {
params: {
id: this.id
}
}).then(res => {
if (res?.data) {
this.info = res.data
this.$nextTick(() => {
this.pageShow = true
})
}
})
},
...mapActions(['previewFile']),
prevFile(e) {
if ([".jpg", ".png", ".gif"].includes(e.postfix.toLowerCase())) {
uni.previewImage({
current: e.url,
urls: [e.url]
})
} else {
this.previewFile({...e})
}
},
onConfirm() {
if (!this.commnet) {
return this.$toast('评论不能为空')
}
this.$http.post('/app/appnewscentercomment/addOrUpdateForWX', {
circleId: this.id,
content: this.commnet,
type: this.commentId ? 2 : 1,
commentId: this.commentId,
name: uni.getStorageSync('userInfo').nickName,
areaId: this.areaId
}).then(res => {
if (res.code === 0) {
this.commnet = ''
this.$toast(this.commentId ? '回复成功' : '评论成功')
this.current = 0
this.isMore = false
this.getComments()
this.commentId = ''
this.placeholder = ''
} else {
this.commentId = ''
this.placeholder = ''
this.$toast(res.msg)
}
this.isShowComment = false
}).catch(() => {
this.commentId = ''
this.placeholder = ''
})
},
getComments() {
this.$http.post('/app/appnewscentercomment/listForWX?size=5&circleId=' + this.id + '&current=' + (this.current + 1)).then(res => {
if (res?.data) {
this.commentsTotal = res.data.total
if (this.current === 0) {
this.commentList = []
}
if (!res.data.records.length) {
this.isMore = true
this.isLoading = false
this.$nextTick(() => {
this.pageShow = true
})
return false
}
const data = res.data.records.map(item => {
item.isShow = '0'
return item
})
this.commentList.push(...data)
this.current = this.current + 1
}
})
}
},
onReachBottom() {
this.getComments()
},
onShareAppMessage() {
return {
title: this.info.title,
imageUrl: this.info.coverFile.url,
path: `/subPages/live/newsDetail?id=${this.id}&areaId=${this.$areaId}`
}
}
}
</script>
<style lang="scss">
.news-detail {
padding-bottom: 120px;
div {
box-sizing: border-box;
}
.comments {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1111;
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
}
}
.comments-wrapper {
position: absolute;
bottom: 0;
z-index: 1;
width: 100%;
padding: 32px 32px 16px;
background: #FFFFFF;
.textarea {
position: relative;
width: 100%;
margin-bottom: 24px;
padding: 16px;
background: #F7F7F7;
border-radius: 8px;
textarea {
width: 100%;
height: 94px;
color: #666;
font-size: 26px;
}
.textarea-bottom {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
color: #999999;
font-size: 26px;
}
}
.comments-bottom {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 16px;
span {
color: #666666;
font-size: 26px;
}
div {
width: 144px;
height: 64px;
line-height: 64px;
text-align: center;
color: #fff;
font-size: 28px;
background: #135AB8;
border-radius: 32px;
}
}
}
.icon-img {
width: 32px;
height: 32px;
margin-right: 8px;
}
.video-item {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
color: #666;
font-size: 28px;
i {
padding-right: 4px;
}
}
.detail-top__active {
padding-top: 30px;
h2 {
margin-bottom: 28px;
}
}
.video {
width: 100%;
height: 396px;
video {
display: block;
width: 100%;
height: 396px;
}
}
}
.no-more {
margin-top: 20px;
text-align: center;
color: #999;
image {
width: 400px;
height: 240px;
}
p {
text-align: center;
color: #999;
font-size: 28px;
}
}
.detail-top {
padding: 10px 30px 26px;
background: #fff;
& > h2 {
margin-bottom: 40px;
color: #333333;
font-size: 40px;
}
p {
font-size: 24px;
span {
margin-right: 15px;
}
}
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
color: #333333;
font-size: 24px;
.right {
display: flex;
align-items: center;
& > div {
display: flex;
align-items: center;
&:first-child {
margin-right: 60px;
}
}
i {
margin-right: 10px;
font-size: 32px;
}
}
}
.detail-content {
margin-top: 46px;
image {
display: block;
width: 100%;
height: 400px;
margin: 0 auto;
}
}
}
.detail-comments {
margin-top: 20px;
padding: 0 30px 20px;
background: #fff;
& > h2 {
padding-top: 16px;
font-size: 30px;
color: #333333;
}
.comments-list {
.item {
display: flex;
margin-top: 35px;
image {
flex-shrink: 1;
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 22px;
}
.item-right {
flex: 1;
.item-right__top {
display: flex;
justify-content: space-between;
height: 50px;
.item-right__top--right {
display: flex;
align-items: center;
padding-left: 20px;
i {
margin-right: 10px;
color: #666;
font-size: 28px;
}
span {
color: #333333;
font-size: 24px;
}
}
}
.item-right__content {
line-height: 46px;
color: #333333;
font-size: 28px;
text-align: justify;
}
.item-right__info {
display: flex;
align-items: center;
margin: 10px 0;
span {
margin-right: 20px;
color: #999999;
font-size: 24px;
}
i {
color: #333333;
font-size: 24px;
}
}
.item-replay {
padding: 30px;
background: #F0F0F0;
.item-replay__item {
display: flex;
line-height: 1.3;
margin-bottom: 10px;
h3 {
color: #333333;
font-size: 26px;
font-weight: 600;
}
span {
font-size: 26px;
}
}
.item-replay__more {
color: #999999;
font-size: 26px;
}
}
}
}
}
}
.footer-bar {
display: flex;
position: fixed;
align-items: center;
justify-content: space-between;
bottom: 0;
left: 0;
width: 100%;
height: 100px;
padding: 0 30px;
box-sizing: border-box;
border-top: 1px solid rgba(0, 0, 0, 0.2);
background: #fff;
input {
width: 460px;
height: 58px;
background: #F0F0F0;
border-radius: 30px;
font-size: 26px;
text-align: center;
}
.footer-bar__right {
display: flex;
align-items: center;
i {
font-size: 30px;
color: #666;
}
.count {
position: relative;
text-align: right;
span {
position: absolute;
top: -18px;
right: -11px;
z-index: 21;
padding: 3px 7px;
font-size: 20px;
color: #fff;
border-radius: 12px;
background: #C41C19;
}
}
.count, & > i {
margin-right: 40px;
}
button {
padding: 0 !important;
font-size: 26px !important;
color: #666 !important;
line-height: 1 !important;
background: transparent !important;
&::after {
border: none;
}
&:last-child {
border-right: none;
}
}
}
}
.accessory-list {
margin-top: 16px;
background: #FFF;
padding: 0 32px 30px 32px;
box-sizing: border-box;
p {
font-size: 32px;
height: 112px;
line-height: 112px;
}
.card-list {
.item {
padding: 16px;
border: 1px solid #CCCCCC;
border-radius: 8px;
display: flex;
margin-bottom: 32px;
img {
width: 96px;
height: 96px;
}
div {
align-self: center;
}
}
}
}
</style>

View File

@@ -0,0 +1,411 @@
<template>
<div class="newList">
<div class="header" v-if="tabList.length">
<div class="header-tab">
<img src="https://cdn.cunwuyun.cn/dvcp/live/dh.png" alt="" class="more-icon" @click="toSelect()">
<u-tabs :list="tabList" :current="currIndex" @change="changeTab" :font-size="26"></u-tabs>
<!-- <scroll-view :scroll-x="true" :scroll-with-animation="true" @scroll="scroll" :scroll-left="left" upper-threshold="60">
<div v-for="(item, index) in tabList" :key="index" @click="changeTab(index)" :class="currIndex == index ? 'tab-item active-item' : 'tab-item'">
{{ item.name }}
<span class="active-line" v-if="currIndex == index"></span>
</div>
</scroll-view> -->
</div>
</div>
<div class="news-list" v-if="tabList.length">
<div class="item" v-for="(item,index) in newsList" :key="index" v-if="newsList.length" @click="toDetail(item.id)">
<div class="left">
<h2>{{ item.title }}</h2>
<p><span>{{ item.categoryName }}</span>{{ item.createTime }}</p>
</div>
<div class="right" v-if="item.pictureUrl.length">
<img :src="item.pictureUrl" alt="">
</div>
</div>
<AiEmpty description="暂无数据" v-if="!newsList.length" style="background: #f3f4f5;"/>
</div>
<AiEmpty description="暂无数据" v-else/>
</div>
</template>
<script>
export default {
name: 'newsList',
data() {
return {
currIndex: 0,
title: '',
isLoading: false,
newsList: [],
isShowEmpty: false,
current: 1,
areaId: '',
tabList: [],
parentId: '',
parentName: '',
}
},
onLoad(params) {
this.parentId = params.id
this.parentName = params.parentName
uni.$on('update', (tabIndex) => {
this.currIndex = tabIndex
})
},
onShow() {
document.title = this.parentName
this.getList().then(() => this.getListInit())
},
methods: {
// 查看分类
toSelect() {
uni.navigateTo({url: `./select?parentId=${this.parentId}&index=${this.currIndex}`})
},
// 切换tab栏
changeTab(index) {
this.newsList = []
this.currIndex = index
this.current = 1
this.getListInit()
},
// scroll(e) {
// console.log(e);
// },
// 获取新闻分类
getList() {
return this.$http.post('/app/apppublicitycategory/list', null, {
params: {
parentId: this.parentId,
categoryType: '2',
}
}).then((res) => {
var array = []
res.data.records.map(item => {
array.push({
name: item.categoryName,
id: item.id,
parentId: item.parentId,
})
})
return this.tabList = array
})
},
getListInit() {
this.current = 1
this.newsList = []
this.getNewsList()
},
// 获取新闻列表
getNewsList() {
this.$http.post(`/app/apppublicityinfo/list?`, null, {
params: {
current: this.current,
moduleId: this.currIndex == 0 ? this.tabList[0].parentId : this.tabList[this.currIndex].parentId,
categoryId: this.tabList[this.currIndex].id,
}
}).then(res => {
if (res.code === 0) {
this.newsList = this.current == 1 ? res.data.records : [...this.newsList, ...res.data.records]
}
})
},
// 查详情
toDetail(id) {
uni.navigateTo({url: `./newsDetail?id=${id}`})
},
},
onReachBottom() {
this.current++,
this.getNewsList()
}
}
</script>
<style lang="scss" scoped>
.header-tab {
background-color: #fff;
position: relative;
padding: 0 100px 0 0;
box-sizing: border-box;
.more-icon {
position: absolute;
width: 40px;
height: 38px;
right: 32px;
top: 20px;
}
// ::v-deep .uni-scroll-view-content {
// display: flex;
// }
div {
height: 80px;
line-height: 80px;
font-size: 26px;
transition-duration: 1s;
padding: 0px 30px;
white-space:nowrap;
}
.tab-item {
color: #666;
position: relative;
}
.active-item {
color: #3376FD;
font-weight: 600;
}
.active-line {
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
background-color: #3376FD;
}
}
.news-list {
background: #FFF;
padding-top: 90px;
box-sizing: border-box;
.item {
padding: 30px 30px 20px 30px;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #DDDDDD;
.left {
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: 15px;
}
}
}
.right {
width: 224px;
height: 140px;
margin-left: 40px;
img {
width: 100%;
height: 100%;
}
}
}
}
.news {
min-height: 100vh;
padding-top: 96px;
background: #fff;
}
.item-video {
position: relative;
height: 388px;
margin-bottom: 24px;
.mask {
position: absolute;
width: 100%;
height: 100%;
z-index: 11;
background: rgba(0, 0, 0, 0.16);
}
.play-btn {
position: absolute;
top: 50%;
left: 50%;
z-index: 121;
width: 80px;
height: 80px;
margin: 0;
transform: translate(-50%, -50%);
}
.item-title {
width: 100%;
padding: 0 30px 10px;
font-size: 28px;
font-weight: 500;
color: #FFF;
line-height: 40px;
position: absolute;
bottom: 0;
left: 0;
word-break: break-all;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
background: rgba(0, 0, 0, .4);
box-sizing: border-box;
}
.cover {
display: block;
width: 100% !important;
height: 388px !important;
margin-left: 0 !important;
}
}
div {
box-sizing: border-box;
}
.noMore {
line-height: 90px;
text-align: center;
color: #999;
font-size: 26px;
}
.news {
background: #fff;
}
.header {
position: fixed;
left: 0;
top: 0;
z-index: 10000;
width: 100%;
padding: 8px 0;
background: #fff;
.header-search {
display: flex;
align-items: center;
width: 690px;
height: 60px;
margin: 0 auto 8px;
padding: 0 32px;
background: #0D6DDC;
border-radius: 30px;
image {
flex-shrink: 1;
width: 32px;
height: 32px;
margin-right: 12px;
}
input {
flex: 1;
height: 100%;
font-size: 28px;
color: #fff;
}
}
}
.item {
padding: 0 30px;
&:first-child {
.item-wrapper {
padding-top: 0 !important;
}
}
.item-wrapper {
padding: 30px 0 20px;
display: flex;
align-items: center;
}
.item-left {
flex: 1;
h2 {
margin-bottom: 32px;
color: #333333;
font-size: 30px;
font-weight: 700;
}
.item-left__bottom {
display: flex;
span {
margin-right: 10px;
color: #999999;
font-size: 22px;
&:last-child {
margin-right: 0;
}
}
.top-text {
font-size: 22px;
color: #EF4645;
margin-right: 16px;
}
}
}
image {
flex-shrink: 0;
width: 224px;
height: 140px;
// margin-left: 46px;
}
}
.no-more {
margin-top: 20px;
text-align: center;
color: #999;
image {
width: 400px;
height: 240px;
}
p {
text-align: center;
color: #999;
font-size: 28px;
}
}
::v-deep .emptyWrap .emptyImg {
margin-top: 40px;
}
</style>

View File

@@ -0,0 +1,86 @@
<template>
<div class="page">
<div class="title">点击进入栏目</div>
<div class="tab-list">
<div v-for="(item, index) in tabList" :key="index" :class="tabIndex == index ? 'tab-item active' : ' tab-item'" @click="tabClick(index)">{{item}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'page',
data () {
return {
tabList: [],
tabIndex: 0,
parentId: ''
}
},
onLoad (option) {
this.tabIndex = option.index,
this.parentId = option.parentId
this.getList()
this.$forceUpdate()
},
methods: {
tabClick(index) {
this.tabIndex = index
uni.navigateBack({
success: ()=>{
uni.$emit('update',this.tabIndex)
}
})
},
getList() {
this.$http.post('/app/apppublicitycategory/list',null,{
params: {
parentId: this.parentId,
categoryType: '2',
}
}).then((res)=>{
var array = []
res.data.records.map(item=>{
array.push(item.categoryName)
})
this.tabList = array
})
},
},
}
</script>
<style lang="scss" scoped>
.page{
height: 100%;
background-color: #FFFFFF;
.title{
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #B9B9B9;
line-height: 36rpx;
padding: 32rpx 0 30rpx 40rpx;
}
.tab-list{
padding: 0 0 0 30rpx;
.tab-item{
display: inline-block;
width: 144rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
border-radius: 24rpx;
border: 2rpx solid #CBCBCB;
font-size: 26rpx;
color: #333;
box-sizing: border-box;
margin: 0 38rpx 32rpx 0;
}
.active{
color: #3376FD;
}
}
}
</style>