819527061@qq.com
2024-05-11 f73ed7862edc9c3cb78a2610486643a2fa079fde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<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>