|
@@ -9,7 +9,8 @@
|
|
|
class="header-top-usearch"></u-search>
|
|
|
<view class="header-top-notice" @tap="openPage('pages/notification/notification')">
|
|
|
<u-icon name="bell" color="#FFFFFF" size="48"></u-icon>
|
|
|
- <u-badge size="mini" type="error" :count="unreadInfoNum" :absolute="false" class="header-top-notice-badge">
|
|
|
+ <u-badge size="mini" type="error" :count="unreadInfoNum" :absolute="false"
|
|
|
+ class="header-top-notice-badge">
|
|
|
</u-badge>
|
|
|
</view>
|
|
|
<view class="header-top-scan">
|
|
@@ -31,7 +32,6 @@
|
|
|
<!-- 宫格 -->
|
|
|
<view class="service">
|
|
|
<view class="service-body u-flex u-flex-wrap u-row-left">
|
|
|
- <!-- <view class="service-item" @click="openPage('pages/policyNews/policyNews')"> -->
|
|
|
<view class="service-item" @click="openPage('pages/policyInfo/policyInfo')">
|
|
|
<image class="service-item-img" src="../../static/img/index-service-01.png" mode="aspectFill">
|
|
|
</image>
|
|
@@ -162,7 +162,7 @@
|
|
|
*/
|
|
|
getUnreadInfoNum() {
|
|
|
this.$u.api.indexApi.getUnreadInfoNumApi().then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
+ if (res?.code === 200) {
|
|
|
this.unreadInfoNum = res.data;
|
|
|
}
|
|
|
})
|
|
@@ -172,7 +172,7 @@
|
|
|
*/
|
|
|
getNewestInfo() {
|
|
|
this.$u.api.indexApi.getNewestInfoApi().then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
+ if (res?.code === 200) {
|
|
|
this.noticeList = res.data.map(item => {
|
|
|
return item.name
|
|
|
})
|
|
@@ -189,15 +189,8 @@
|
|
|
pageSize: 10
|
|
|
}
|
|
|
this.$u.api.indexApi.getIndexNewsListApi(params).then(res => {
|
|
|
- if (!res) return;
|
|
|
if (res?.code == 200) {
|
|
|
this.newsList = res.rows;
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- type: 'error',
|
|
|
- title: res.msg
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -206,7 +199,7 @@
|
|
|
*/
|
|
|
getBannerList() {
|
|
|
this.$u.api.indexApi.indexBannerListApi().then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
+ if (res?.code === 200) {
|
|
|
this.bannerList = res.data.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
@@ -214,6 +207,8 @@
|
|
|
title: item.name
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|