智慧保安互联网APP
liuyg
2021-07-31 728835c2e27dfab328472e61acb514bac42892e6
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
<template>
    <view class="container">
        <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
            height="100" @change="change"></u-tabs>
        <u-search v-model="keyword" shape="round" class="u-search" input-align="center" height="70" :show-action="false"></u-search>
        <view class="inTmain" v-for="(item,index) in dataList">
            <u-card :title="item.title" v-show="item.category == current + 1">
                <view class="" slot="body">
                    <view>
                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                            通知类型:{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
                    </view>
                    <view>
                        <view class="u-body-item-title u-line-1">通知日期:{{item.releaseTime}}</view>
                    </view>
                </view>
                <view class="" slot="foot">
                    </u-icon>发布单位:{{item.depName}}</view>
            </u-card>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                dataList: [],
                list: [{
                        name: '单位公告'
                    },
                    {
                        name: '公安公告'
                    }
                ],
                current: 0,
                keyword: ''
            };
        },
        onLoad() {
 
        },
        onReachBottom() {
 
        },
        mounted() {
            this.getCompany();
        },
        methods: {
            getCompany() {
                var that = this;
                uni.request({
                    url: this.$store.state.piAPI + "/blade-desk/notice/page",
                    method: "get",
                    data: {
 
                    },
                    success: (res) => {
                        var resdata = res.data.data.records;
                        that.dataList = resdata;
                    }
                });
            },
            change(index) {
                this.current = index;
            }
        }
    };
</script>
 
<style lang="scss">
    .u-card-wrap {
        background-color: $u-bg-color;
        padding: 1px;
    }
 
    .u-body-item {
        font-size: 32rpx;
        color: #333;
        padding: 20rpx 10rpx;
    }
 
    .u-body-item image {
        width: 120rpx;
        flex: 0 0 120rpx;
        height: 120rpx;
        border-radius: 8rpx;
        margin-left: 12rpx;
    }
 
    .u-search {
        padding: 20rpx 30rpx 0 30rpx;
    }
 
    .inTmain {}
</style>