|
@@ -6,7 +6,8 @@
|
|
<view class="vse">
|
|
<view class="vse">
|
|
<u-search placeholder="搜索资讯" v-model="keyword" @search="search" :actionStyle="{ color: 'white' }" :animation="true" actionText="取消"></u-search>
|
|
<u-search placeholder="搜索资讯" v-model="keyword" @search="search" :actionStyle="{ color: 'white' }" :animation="true" actionText="取消"></u-search>
|
|
</view>
|
|
</view>
|
|
- <view class="icon" @click="scanCode()"></view>
|
|
|
|
|
|
+ <view class="icon" @click="message()"></view>
|
|
|
|
+ <view class="bage" v-if="count > 0"></view>
|
|
</view>
|
|
</view>
|
|
<!--轮播图-->
|
|
<!--轮播图-->
|
|
<u-swiper circular :radius="5" :indicator="true" keyName="image" :list="bannerList" :height="110" class="uni-swiper" @click="click"></u-swiper>
|
|
<u-swiper circular :radius="5" :indicator="true" keyName="image" :list="bannerList" :height="110" class="uni-swiper" @click="click"></u-swiper>
|
|
@@ -60,7 +61,8 @@ export default {
|
|
newsList: [],
|
|
newsList: [],
|
|
noticeList: ['边民互市贸易APP上线了', '关于边民互市贸易开通注意事项'],
|
|
noticeList: ['边民互市贸易APP上线了', '关于边民互市贸易开通注意事项'],
|
|
roleMenu: [],
|
|
roleMenu: [],
|
|
- menuList: []
|
|
|
|
|
|
+ menuList: [],
|
|
|
|
+ count: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -79,6 +81,7 @@ export default {
|
|
loading: 'false',
|
|
loading: 'false',
|
|
success: res => {
|
|
success: res => {
|
|
if (res.data.data.count > 0) {
|
|
if (res.data.data.count > 0) {
|
|
|
|
+ this.count = res.data.data.count;
|
|
uni.setTabBarBadge({ index: 1, text: res.data.data.count });
|
|
uni.setTabBarBadge({ index: 1, text: res.data.data.count });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -117,10 +120,15 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //点击轮播图
|
|
|
|
+ click(index) {
|
|
|
|
+ uni.navigateTo({ url: '/pages/news/detail?id=8' });
|
|
|
|
+ },
|
|
|
|
+ message() {
|
|
|
|
+ uni.switchTab({ url: '/pages/message/message' });
|
|
|
|
+ },
|
|
search() {
|
|
search() {
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/news/list?keyword=' + this.keyword
|
|
|
|
- });
|
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/news/list?keyword=' + this.keyword });
|
|
},
|
|
},
|
|
navTo(url) {
|
|
navTo(url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -163,6 +171,15 @@ page {
|
|
font-size: 25px;
|
|
font-size: 25px;
|
|
top: 5px;
|
|
top: 5px;
|
|
}
|
|
}
|
|
|
|
+ .bage {
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background-color: #f44336;
|
|
|
|
+ top: 0px;
|
|
|
|
+ right: 0px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.uni-swiper {
|
|
.uni-swiper {
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|