master^2
commit
4470b6bb11
@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<view slot="content" class="content">
|
||||||
|
<view class="index">
|
||||||
|
<view class="back">
|
||||||
|
<u-icon @click="goback" name="arrow-left"></u-icon>
|
||||||
|
<text>{{title}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="contentwrap">
|
||||||
|
<scroll-view class="list" scroll-y @scrolltolower="onreachBottom">
|
||||||
|
<view style="height: 1000rpx;" v-if="itemList.length==0" class="">
|
||||||
|
<u-empty text="暂无数据" mode="list"></u-empty>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view @click="gocontent" v-for="(item,indexkey) in itemList" :key="indexkey">
|
||||||
|
<view class="listitem u-body-item u-border-bottom u-col-between u-p-t-0">
|
||||||
|
<view :class="current==0?'titles titles100':'titles'">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.title}}</view>
|
||||||
|
<view class="times">{{item.time}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<tab-bar :currentPage="2"></tab-bar>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
onload(options){
|
||||||
|
// console.log(options)
|
||||||
|
// this.titleindex = options.index
|
||||||
|
// this.title=this.titlelist[this.titleindex]
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.titleindex = this.util.RQ("index")
|
||||||
|
this.title=this.titlelist[this.titleindex].name
|
||||||
|
// var that = this
|
||||||
|
// console.log('before',that.menuIndex)
|
||||||
|
// that.menuIndex = uni.getStorageSync('menuIndex')?uni.getStorageSync('menuIndex'):0
|
||||||
|
// console.log('after',that.menuIndex)
|
||||||
|
// uni.removeStorageSync('menuIndex')
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menuIndex:0,
|
||||||
|
titleindex:0,
|
||||||
|
titlelist:[{
|
||||||
|
name: '图片新闻'
|
||||||
|
}, {
|
||||||
|
name: '综合新闻'
|
||||||
|
}, {
|
||||||
|
name: '市局通知'
|
||||||
|
},{
|
||||||
|
name: '市局文件'
|
||||||
|
},{
|
||||||
|
name: '各地警讯'
|
||||||
|
}, {
|
||||||
|
name: '机关动态'
|
||||||
|
}, {
|
||||||
|
name: '好警纪实'
|
||||||
|
}, {
|
||||||
|
name: '警营文化'
|
||||||
|
}],
|
||||||
|
title:"",
|
||||||
|
itemList:[{
|
||||||
|
title:"于贵平到高新区督导检查党的二十大安保调研指导公安工作",
|
||||||
|
imgs:"http://czga.langye.net/d/file/p/2022/08-24/3b37b135aad8a23ca8b8d698400dad62.jpg",
|
||||||
|
url:"",
|
||||||
|
time:"2022-08-24"
|
||||||
|
},{
|
||||||
|
title:"陈志良到市公安局调研指导全国文明典范城市创建工作",
|
||||||
|
imgs:"http://czga.langye.net/d/file/p/2022/08-24/8add932b25cae61e29dba1dcc57702b0.jpg",
|
||||||
|
url:"",
|
||||||
|
time:"2022-08-21"
|
||||||
|
},{
|
||||||
|
title:"于贵平到经开区督导检查党的二十大安保调研指导公安工作",
|
||||||
|
imgs:"http://czga.langye.net/d/file/p/2022/08-24/332b29eb92aebd076756b63aeefb8dce.jpg",
|
||||||
|
url:"",
|
||||||
|
time:"2022-08-21"
|
||||||
|
},{
|
||||||
|
title:"市公安局召开半年度全市公安工作推进会暨“一月一观摩”活动",
|
||||||
|
imgs:"http://czga.langye.net/d/file/p/2022/08-24/88de79255eb9003cc81be1f085fe6597.jpg",
|
||||||
|
url:"",
|
||||||
|
time:"2022-08-21"
|
||||||
|
},{
|
||||||
|
title:"全市公安系统功模代表座谈会召开",
|
||||||
|
imgs:"http://czga.langye.net/d/file/p/2022/08-24/31eb5aaea4cf6702f699a2f17e8eee88.jpg",
|
||||||
|
url:"",
|
||||||
|
time:"2022-08-21"
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goback(){
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/list/tpxw'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gocontent(){
|
||||||
|
uni.redirectTo({
|
||||||
|
url:'/pages/content/content'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.index {
|
||||||
|
/* background: url(@/static/images/homebg.png) no-repeat; */
|
||||||
|
background: linear-gradient(90deg, #D81B28 0%, #F96767 100%);
|
||||||
|
background-color: #fff;
|
||||||
|
background-size: 100%;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 435rpx;
|
||||||
|
/* position: fixed; */
|
||||||
|
}
|
||||||
|
.back{
|
||||||
|
font-size: 46rpx;
|
||||||
|
color:#fff;
|
||||||
|
padding:40rpx 40rpx;
|
||||||
|
position: relative;
|
||||||
|
top:0;
|
||||||
|
left:0
|
||||||
|
}
|
||||||
|
.back text{
|
||||||
|
position: absolute;
|
||||||
|
left:50%;
|
||||||
|
top:50%;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.contentwrap{
|
||||||
|
background: #fff;
|
||||||
|
padding:180rpx 10rpx;
|
||||||
|
padding-top:0;
|
||||||
|
margin-top:-300rpx
|
||||||
|
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
width:100%;
|
||||||
|
height:1000rpx;
|
||||||
|
/* padding:40rpx */
|
||||||
|
}
|
||||||
|
.list .listitem{
|
||||||
|
font-size:0;
|
||||||
|
padding-bottom:30rpx;
|
||||||
|
margin: 30rpx 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.titles{
|
||||||
|
width:100%;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.titles100{
|
||||||
|
width:70%;
|
||||||
|
}
|
||||||
|
/deep/ .titles .u-body-item-title{
|
||||||
|
height:96rpx;
|
||||||
|
}
|
||||||
|
.list .listitem view{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: SourceHanSansCN-Normal, SourceHanSansCN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
}
|
||||||
|
.list .listitem image{
|
||||||
|
width:30%;
|
||||||
|
height:133rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.list .listitem .times{
|
||||||
|
color:#808080;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue