|
@@ -35,12 +35,12 @@
|
|
</view>
|
|
</view>
|
|
<view class="list animated fadeInDown">
|
|
<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)">
|
|
<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="con">
|
|
<view class="title ellip">{{ item.title }}</view>
|
|
<view class="title ellip">{{ item.title }}</view>
|
|
<view class="source omit">
|
|
<view class="source omit">
|
|
<text class="icon"></text>
|
|
<text class="icon"></text>
|
|
- <text>{{item.readCount}}</text>
|
|
|
|
|
|
+ <text>{{ item.readCount }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="releaseTime">{{ item.releaseTime }}</view>
|
|
<view class="releaseTime">{{ item.releaseTime }}</view>
|
|
</view>
|
|
</view>
|
|
@@ -69,17 +69,21 @@ export default {
|
|
this.getMenu();
|
|
this.getMenu();
|
|
},
|
|
},
|
|
onShow() {
|
|
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: {
|
|
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() {
|
|
getBannerList() {
|
|
this.http.request({
|
|
this.http.request({
|
|
url: '/level-one-server/app/TbBanner/getList',
|
|
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) {
|
|
navTo(url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: url,
|
|
url: url,
|