|
@@ -1,18 +1,7 @@
|
|
|
<template>
|
|
|
<page-meta :page-style="isMorningShow ? 'overflow: hidden;' : ''">
|
|
|
<view class="container New-container">
|
|
|
- <view :class="[1 == 2 ? 'banne-content' : 'content-search']">
|
|
|
- <swiper v-if="1 == 2" autoplay :interval="4000" circular indicator-dots>
|
|
|
- <block v-for="item in banerList" :key="item.name">
|
|
|
- <swiper-item>
|
|
|
- <image :src="item.img"></image>
|
|
|
- <view class="banner-title">
|
|
|
- {{ item.name }}
|
|
|
- <text class="time"> 时间</text>
|
|
|
- </view>
|
|
|
- </swiper-item>
|
|
|
- </block>
|
|
|
- </swiper>
|
|
|
+ <view :class="['content-search', bannerClass && 'banne-bg',bannerPosition && 'banner-Position']">
|
|
|
<view class="top-content-box">
|
|
|
<search-bar @goSearch="goSearch" :searchTitle="searchPlaceholderList.SummarySearch" :width="44">
|
|
|
<template slot="content-left">
|
|
@@ -27,6 +16,21 @@
|
|
|
</search-bar>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="banne-content" v-if="bannerDataList.length">
|
|
|
+ <swiper autoplay :interval="4000" circular indicator-dots>
|
|
|
+ <view v-for="item in bannerDataList" :key="item.BannerId" @click="bannerSwiperHandler(item)">
|
|
|
+ <swiper-item>
|
|
|
+ <image :src="item.IndexImg"></image>
|
|
|
+ <view class="banner-title">
|
|
|
+ <text class="text_twoLine" :style="{ 'font-size': item.Subtitle.length > 24 ? '45rpx' : '50rpx' }">
|
|
|
+ {{ item.Title }}
|
|
|
+ </text>
|
|
|
+ <text class="time text_twoLine"> {{ item.Subtitle }}</text>
|
|
|
+ </view>
|
|
|
+ </swiper-item>
|
|
|
+ </view>
|
|
|
+ </swiper>
|
|
|
+ </view>
|
|
|
<view class="content-ul">
|
|
|
<view class="item-ul">
|
|
|
<block v-for="(item, index) in newDataList" :key="index">
|
|
@@ -83,6 +87,7 @@
|
|
|
</view>
|
|
|
<morning-dlg v-if="isMorningShow" :isMorningShow.sync="isMorningShow" :morningItem.sync="morningItem" />
|
|
|
</view>
|
|
|
+ <videoModule :showVideoPop.sync="showVideoPopUp" :videoPopList="videoPopListUp" />
|
|
|
<suspenButton :show.sync="wholeShowListData.IsShow" v-if="wholeShowListData.IsShow" />
|
|
|
</page-meta>
|
|
|
</template>
|
|
@@ -96,6 +101,7 @@ import ActivityItem from "@/components/ItemComponent/activityItem.vue";
|
|
|
import SearchBar from "@/components/search-bar/searchBar.vue";
|
|
|
import MorningDlg from "./components/morningDlg.vue";
|
|
|
import ItemContent from "./components/ItemContent.vue";
|
|
|
+import videoModule from "@/components/videoModule/index";
|
|
|
import suspenButton from "@/components/suspen_button.vue";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -111,24 +117,22 @@ export default {
|
|
|
nomore: "已经到底了",
|
|
|
},
|
|
|
info: {},
|
|
|
- banerList: [
|
|
|
- {
|
|
|
- img: "https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/test/Group%20150.png",
|
|
|
- name: "test1",
|
|
|
- },
|
|
|
- {
|
|
|
- img: "https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/test/Group%20152.png",
|
|
|
- name: "test2",
|
|
|
- },
|
|
|
- {
|
|
|
- img: "https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/test/Group%20154.png ",
|
|
|
- name: "test3",
|
|
|
- },
|
|
|
- ],
|
|
|
isMorningShow: false, // 晨会的弹框
|
|
|
morningItem: {}, // 晨会的弹框
|
|
|
+ bannerDataList: [], // banner数据
|
|
|
+ showVideoPopUp: false, //
|
|
|
+ videoPopListUp: {},
|
|
|
+ isScrollNumber: 0,
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ bannerClass() {
|
|
|
+ return this.bannerDataList.length > 0 && this.isScrollNumber < 235;
|
|
|
+ },
|
|
|
+ bannerPosition() {
|
|
|
+ return this.bannerDataList.length > 0 ;
|
|
|
+ },
|
|
|
+ },
|
|
|
components: {
|
|
|
ChartItem,
|
|
|
ReportItem,
|
|
@@ -137,6 +141,7 @@ export default {
|
|
|
SearchBar,
|
|
|
MorningDlg,
|
|
|
ItemContent,
|
|
|
+ videoModule,
|
|
|
suspenButton,
|
|
|
},
|
|
|
methods: {
|
|
@@ -232,13 +237,48 @@ export default {
|
|
|
let obj = item.ThreeSummary ? { ...item.ThreeSummary, Source: item.Source } : {};
|
|
|
return obj;
|
|
|
},
|
|
|
+ // 获取banner 列表
|
|
|
+ async getBannerList() {
|
|
|
+ const res = await Home.bannerList();
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.bannerDataList = res.Data.List || [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // bannaer 点击事件
|
|
|
+ async bannerSwiperHandler(item) {
|
|
|
+ let { Type, SourceId, Path } = item.BannerUrlResp;
|
|
|
+ if (Type == 1) return;
|
|
|
+ await Home.bannerHistory({
|
|
|
+ BannerId: item.BannerId,
|
|
|
+ });
|
|
|
+ if (Type == 5) {
|
|
|
+ let obj = {
|
|
|
+ BackgroundImg: "https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/my_log.png",
|
|
|
+ Id: SourceId,
|
|
|
+ PlaySeconds: "15",
|
|
|
+ ResourceUrl: "https://hzstatic.hzinsights.com/static/yb/video/8617330c2a76e0c35999f6466b4470c4.mp4",
|
|
|
+ Title: "三分钟了解弘则研究体系和方法论",
|
|
|
+ Type: "三分钟了解弘则研究体系和方法论",
|
|
|
+ };
|
|
|
+ this.videoPopListUp = obj;
|
|
|
+ this.showVideoPopUp = true;
|
|
|
+ await Mine.addHistory();
|
|
|
+ } else {
|
|
|
+ Path &&
|
|
|
+ uni.navigateTo({
|
|
|
+ url: Path + SourceId,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
uni.$on("updateNewList", (data) => {
|
|
|
+ this.page_no = 1;
|
|
|
this.getNewList();
|
|
|
});
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ this.getBannerList();
|
|
|
this.getNewList();
|
|
|
},
|
|
|
onShow() {
|
|
@@ -260,6 +300,9 @@ export default {
|
|
|
this.refresh = true;
|
|
|
this.getNewList();
|
|
|
},
|
|
|
+ onPageScroll(val) {
|
|
|
+ this.isScrollNumber = val.scrollTop;
|
|
|
+ },
|
|
|
/** 用户点击分享*/
|
|
|
onShareAppMessage: function ({ from, target }) {
|
|
|
if (from === "button") {
|
|
@@ -305,13 +348,15 @@ export default {
|
|
|
z-index: 9;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ .banner-Position {
|
|
|
+ position: fixed !important;
|
|
|
+ }
|
|
|
+ .banne-bg {
|
|
|
+ /deep/ .nav-bar-wrap {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
.banne-content {
|
|
|
- position: sticky;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- z-index: 9;
|
|
|
height: 402rpx;
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
@@ -324,15 +369,17 @@ export default {
|
|
|
}
|
|
|
.banner-title {
|
|
|
position: absolute;
|
|
|
- bottom: 80rpx;
|
|
|
+ bottom: 35rpx;
|
|
|
left: 20rpx;
|
|
|
color: #fff;
|
|
|
font-weight: 500;
|
|
|
- font-size: 50rpx;
|
|
|
- line-height: 70rpx;
|
|
|
+ line-height: 65rpx;
|
|
|
+ min-height: 160rpx;
|
|
|
+ max-height: 225rpx;
|
|
|
+ overflow: hidden;
|
|
|
.time {
|
|
|
- font-size: 27rpx;
|
|
|
- line-height: 38rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ line-height: 39rpx;
|
|
|
}
|
|
|
}
|
|
|
.top-content-box {
|
|
@@ -342,9 +389,6 @@ export default {
|
|
|
width: 100%;
|
|
|
z-index: 9;
|
|
|
}
|
|
|
- /deep/ .nav-bar-wrap {
|
|
|
- background-color: transparent;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/deep/ .nav-bar-wrap {
|
|
@@ -373,8 +417,9 @@ export default {
|
|
|
z-index: 9;
|
|
|
}
|
|
|
.content-my {
|
|
|
- width: 165rpx;
|
|
|
+ width: 163rpx;
|
|
|
height: 64rpx;
|
|
|
+ margin-left: 2rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
background-color: #f7f7f7;
|