<template>
|
<view class="notice-wrap">
|
<!-- <pageNav title="通知" :isHavBack="isHavBack"></pageNav> -->
|
<view class="notice-main">
|
<view class="notice-block"
|
v-for="item in noticeList"
|
:key="item.id"
|
@click="gotoNoticeDetai(item)">
|
<view class="notice-line">
|
<image class="noticeIcon" src="../../static/image/noticeIcon.png" mode="scaleToFill"></image>
|
<text>{{item.title}}</text>
|
</view>
|
<view class="notice-line2">
|
<text>{{item.createTime}}</text>
|
</view>
|
</view>
|
<!-- <view class="notice-block">
|
<view class="notice-line">
|
<image class="noticeIcon" src="../../static/image/noticeIcon.png" mode="scaleToFill"></image>
|
<text>12月访销安排及发票开具通知</text>
|
</view>
|
<view class="notice-line2">
|
<text>2021-12-03</text>
|
</view>
|
</view> -->
|
</view>
|
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
noticeList:[]
|
}
|
},
|
onShow() {
|
this.getByCondition()
|
},
|
onPullDownRefresh() { //下拉刷新
|
this.getByCondition()
|
},
|
methods: {
|
getByCondition() {
|
this.$u.api.getByCondition({type:'商户公告'}).then(res => {
|
if(res.code == 200) {
|
this.noticeList = res.result.content
|
uni.stopPullDownRefresh()
|
}
|
})
|
},
|
gotoNoticeDetai(item) { //跳转通知详情页面
|
let url = '/pagesA/noticeDetail/noticeDetail'
|
this.$navTo.togo(url,item)
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.content-title{
|
width: 100%;
|
height: 176rpx;
|
background-color: #1F9F4C;
|
.title{
|
color: #FFFFFF;
|
line-height: 88rpx;
|
padding-top: 88rpx;
|
padding-left: 32rpx;
|
letter-spacing: 3rpx;
|
font-weight: lighter;
|
text-align: center;
|
}
|
}
|
.noticeIcon{
|
width: 24rpx;
|
height: 32rpx;
|
}
|
.notice-main{
|
width: 100%;
|
padding: 32rpx;
|
box-sizing: border-box;
|
}
|
.notice-block{
|
display: flex;
|
flex-direction: column;
|
padding-bottom: 20rpx;
|
border-bottom:1px dotted #BCBCBC;
|
margin-top: 28rpx;
|
.notice-line{
|
display: flex;
|
align-items: baseline;
|
|
text{
|
font-size: 32rpx;
|
color: #666666;
|
font-weight: Light;
|
margin-left: 20rpx;
|
line-height: 2.5;
|
flex:1;
|
}
|
}
|
.notice-line2{
|
display: flex;
|
align-items: center;
|
text{
|
font-size: 28rpx;
|
color: #666666;
|
font-weight: Light;
|
margin-left: 20rpx;
|
line-height: 2.5;
|
margin-left: 44rpx;
|
}
|
}
|
}
|
</style>
|