1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view>
- <u-navbar :is-back="false" title="消息" :background="background" title-color="#fff"></u-navbar>
- <view class="newsIndex">
- <view class="newsIndex-item" v-for="(item,i) in list " :key="i" @click="gotoUrlNews(item)">
- <u-avatar :src="src[item.classifyId]"></u-avatar>
- <view class="newsIndex-text">
- <view class="newsIndex-row">
- <h3>{{item.classify}}</h3>
- <p>{{item.newMessage&&item.newMessage.createTime}}</p>
- </view>
- <view class="newsIndex-row">
- <p>{{item.newMessage&&item.newMessage.title}}</p>
- <u-badge size="mini" type="error" :count="item.num" :offset="[0,0]"></u-badge>
- </view>
- </view>
- </view>
- </view>
- <Tabbar-Job :current="2" ></Tabbar-Job>
-
- </view>
- </template>
- <script>
- import api from './index.js'
- export default api;
- </script>
- <style>
- page{
- background-color: #F7F7F7;
- }
- </style>
- <style scoped lang="scss">
- .newsIndex-item{
- display: flex;
- padding: 20rpx;
- background-color: #fff;
- align-items: center;
- .newsIndex-text{
- flex: 1;
- min-width: 0;
- margin-left: 20rpx;
- }
- .newsIndex-row{
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10rpx;
- position: relative;
- &:first-child{
- margin-top: 0;
- }
- p{
- color:#999;
- }
- }
- }
- </style>
|