|
@@ -2,7 +2,7 @@
|
|
<view class="index">
|
|
<view class="index">
|
|
<view class="index-header">
|
|
<view class="index-header">
|
|
<view class="index-header-container">
|
|
<view class="index-header-container">
|
|
- <view class="index-header-left"></view>
|
|
|
|
|
|
+ <!-- <view class="index-header-left"></view>
|
|
<view class="index-header-right"></view>
|
|
<view class="index-header-right"></view>
|
|
<view class="index-header-top">
|
|
<view class="index-header-top">
|
|
<u-search placeholder="请输入您关键词" v-model="headerTopKeyword" :show-action="false"
|
|
<u-search placeholder="请输入您关键词" v-model="headerTopKeyword" :show-action="false"
|
|
@@ -16,9 +16,9 @@
|
|
<view class="header-top-scan">
|
|
<view class="header-top-scan">
|
|
<u-icon name="scan" color="#FFFFFF" size="48" class="header-scan-icon"></u-icon>
|
|
<u-icon name="scan" color="#FFFFFF" size="48" class="header-scan-icon"></u-icon>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
<view class="index-header-banner">
|
|
<view class="index-header-banner">
|
|
- <u-swiper :list="bannerList" name="bannerUrl" border-radius="0" mode="round" height="440"
|
|
|
|
|
|
+ <u-swiper :list="bannerList" name="bannerUrl" border-radius="0" mode="round" height="444"
|
|
img-mode="scaleToFill" @click="swiperClick"/>
|
|
img-mode="scaleToFill" @click="swiperClick"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
<!-- 滚动通知 -->
|
|
<!-- 滚动通知 -->
|
|
<view class="notice">
|
|
<view class="notice">
|
|
- <u-notice-bar mode="horizontal" type="none" :list="noticeList" bg-color="#fff" duration="1000" />
|
|
|
|
|
|
+ <u-notice-bar mode="horizontal" :type="unreadInfoNum > 0 ? 'primary' : 'none'" :list="noticeList" bg-color="#fff" duration="2000" @click="noticeBarClick" />
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 宫格 -->
|
|
<!-- 宫格 -->
|
|
@@ -83,7 +83,7 @@
|
|
<view class="news-list-head-item">
|
|
<view class="news-list-head-item">
|
|
<view class="card-head-title">新闻动态</view>
|
|
<view class="card-head-title">新闻动态</view>
|
|
<view @click="openPage('/pages/newsInformation/newsInformation')">更多<u-icon name="arrow-right"
|
|
<view @click="openPage('/pages/newsInformation/newsInformation')">更多<u-icon name="arrow-right"
|
|
- color="#A3A3A3"></u-icon>
|
|
|
|
|
|
+ color="#d2d3d5"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -91,7 +91,7 @@
|
|
<u-nodata notice="暂无新闻" v-if="newsList.length == 0"></u-nodata>
|
|
<u-nodata notice="暂无新闻" v-if="newsList.length == 0"></u-nodata>
|
|
<view v-for="(item,index) in newsList"
|
|
<view v-for="(item,index) in newsList"
|
|
@click="$u.route('/pages/newsDetails/newsDetails',{ artId: item.artId })" :key="item.artId"
|
|
@click="$u.route('/pages/newsDetails/newsDetails',{ artId: item.artId })" :key="item.artId"
|
|
- class="news-list-body-item u-body-item u-flex u-border-bottom u-col-between u-row-between">
|
|
|
|
|
|
+ class="news-list-body-item u-body-item u-flex u-col-between u-row-between">
|
|
<view class="news-text">
|
|
<view class="news-text">
|
|
<view class="news-text-title u-body-item-title u-line-2">{{item.artTitle}}</view>
|
|
<view class="news-text-title u-body-item-title u-line-2">{{item.artTitle}}</view>
|
|
<view class="news-text-foot foot u-flex u-flex-wrap">
|
|
<view class="news-text-foot foot u-flex u-flex-wrap">
|
|
@@ -101,7 +101,11 @@
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
<u-image :src="item.artImage" mode="aspectFill" width="160" height="120"
|
|
<u-image :src="item.artImage" mode="aspectFill" width="160" height="120"
|
|
- border-radius="10" />
|
|
|
|
|
|
+ border-radius="10">
|
|
|
|
+ <view slot="error">
|
|
|
|
+ <u-image src="../../static/img/default-news.png" mode="aspectFill" width="160" height="120" border-radius="10"/>
|
|
|
|
+ </view>
|
|
|
|
+ </u-image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -127,7 +131,9 @@
|
|
pageSize: 10
|
|
pageSize: 10
|
|
},
|
|
},
|
|
// 轮播图
|
|
// 轮播图
|
|
- bannerList: [],
|
|
|
|
|
|
+ bannerList: [{
|
|
|
|
+ bannerUrl: '../../static/img/default.png'
|
|
|
|
+ }],
|
|
// 新闻列表
|
|
// 新闻列表
|
|
newsList: [],
|
|
newsList: [],
|
|
// 消息通知
|
|
// 消息通知
|
|
@@ -136,7 +142,8 @@
|
|
tabbarConfig: tabbarconfig
|
|
tabbarConfig: tabbarconfig
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad() {},
|
|
|
|
|
|
+ onLoad() {
|
|
|
|
+ },
|
|
onShow() {
|
|
onShow() {
|
|
this.getUnreadInfoNum();
|
|
this.getUnreadInfoNum();
|
|
this.getBannerList();
|
|
this.getBannerList();
|
|
@@ -200,7 +207,9 @@
|
|
* 获取轮播广告
|
|
* 获取轮播广告
|
|
*/
|
|
*/
|
|
getBannerList() {
|
|
getBannerList() {
|
|
- this.$u.api.indexApi.indexBannerListApi({ type: 0 }).then(res => {
|
|
|
|
|
|
+ this.$u.api.indexApi.indexBannerListApi({
|
|
|
|
+ type: 0
|
|
|
|
+ }).then(res => {
|
|
if (res?.code === 200) {
|
|
if (res?.code === 200) {
|
|
this.bannerList = res.data.map(item => {
|
|
this.bannerList = res.data.map(item => {
|
|
return {
|
|
return {
|
|
@@ -233,6 +242,12 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 滚动条
|
|
|
|
+ */
|
|
|
|
+ noticeBarClick() {
|
|
|
|
+ this.openPage('pages/notification/notification')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|