| | |
| | | <template> |
| | | <div> |
| | | 123 |
| | | </div> |
| | | <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, |
| | | }; |
| | | }, |
| | | 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> |
| | | <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> |