|
@@ -35,12 +35,12 @@
|
|
|
</view>
|
|
|
<view class="list animated fadeInDown">
|
|
|
<view class="news_item" v-for="(item, index) in newsList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
|
|
|
- <image src="../../static/news.jpg" mode="aspectFill" class="img"></image>
|
|
|
+ <image src="../../static/tp.jpg" mode="aspectFill" class="img"></image>
|
|
|
<view class="con">
|
|
|
<view class="title ellip">{{ item.title }}</view>
|
|
|
<view class="source omit">
|
|
|
<text class="icon"></text>
|
|
|
- <text>{{item.readCount}}</text>
|
|
|
+ <text>{{ item.readCount }}</text>
|
|
|
</view>
|
|
|
<view class="releaseTime">{{ item.releaseTime }}</view>
|
|
|
</view>
|
|
@@ -69,17 +69,21 @@ export default {
|
|
|
this.getMenu();
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.http.request({
|
|
|
- url: '/sp-admin/app/TbMessage/getRead',
|
|
|
- loading: 'false',
|
|
|
- success: res => {
|
|
|
- if (res.data.data.count > 0) {
|
|
|
- uni.setTabBarBadge({ index: 1, text: res.data.data.count });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ this.keyword = '';
|
|
|
+ this.getRead();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getRead() {
|
|
|
+ this.http.request({
|
|
|
+ url: '/sp-admin/app/TbMessage/getRead',
|
|
|
+ loading: 'false',
|
|
|
+ success: res => {
|
|
|
+ if (res.data.data.count > 0) {
|
|
|
+ uni.setTabBarBadge({ index: 1, text: res.data.data.count });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getBannerList() {
|
|
|
this.http.request({
|
|
|
url: '/level-one-server/app/TbBanner/getList',
|
|
@@ -113,6 +117,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ search() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/news/list?keyword=' + this.keyword
|
|
|
+ });
|
|
|
+ },
|
|
|
navTo(url) {
|
|
|
uni.navigateTo({
|
|
|
url: url,
|