Browse Source

Merge branch 'master' into 10.3.1

bding 1 year ago
parent
commit
1c3aeb0b20

+ 1 - 1
activityPages/playBack/playBack.vue

@@ -86,7 +86,7 @@
       <view v-if="showAudioBox">
         <audioModule :showAudioPop.sync="showAudioPop" />
       </view>
-      <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+      <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
 
       <!-- 所有自定义弹框 -->
       <modalDialog

+ 1 - 1
activityPages/themeActivity/themeActivity.vue

@@ -209,7 +209,7 @@
       <view v-if="showAudioBox">
         <audioModule :showAudioPop.sync="showAudioPop" />
       </view>
-      <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+      <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
     </view>
     <not-have-login v-else />
   </block>

+ 1 - 1
components/ItemComponent/roadshowItem.vue

@@ -48,7 +48,7 @@
     <view v-if="showAudioBox">
       <audioModule :showAudioPop.sync="showAudioPop" />
     </view>
-    <videoModule :showVideoPop="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
+    <videoModule :showVideoPop.sync="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
     <modalDialog
       :isShowhasPermission="isShowhasPermission"
       :applyForIsShow="applyForIsShow"

+ 2 - 1
components/activity/selectPopup.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 参会方式弹出层 -->
-  <view class="select-box">
+  <view class="select-box" catchtap="preventPropagation">
     <u-popup v-model="popupShow" mode="bottom" @close="closeSelectHandle">
       <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
       <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 1)">预约外呼</view>
@@ -49,6 +49,7 @@ export default {
     signupIsAddOfCancel(val, type) {
       this.$emit("signupIsAddOfCancel", val, type);
     },
+    preventPropagation() {},
   },
 };
 </script>

+ 0 - 6
components/suspen_button.vue

@@ -27,12 +27,6 @@
       <view :class="['top-button', 'px-button', 'ot-button', open && 'active-top', !first && !open && 'hidden-top']" @click.stop="goSecretDetail(1)">
         <image v-if="!$slots.top" mode="widthFix" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/company_icon.png"> </image>
       </view>
-      <view
-        :class="['left-button', 'px-button', 'ot-button', open && 'active-left', !first && !open && 'hidden-left']"
-        @click.stop="goSecretDetail(2)"
-      >
-        <image v-if="!$slots.bottom" mode="widthFix" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/this_week.png"> </image>
-      </view>
       <view
         :class="['bottom-button', 'px-button', 'ot-button', open && 'active-bottom', !first && !open && 'hidden-bottom']"
         @click.stop="goSecretDetail(3)"

+ 4 - 1
components/videoModule/index.vue

@@ -11,6 +11,7 @@
         show-mute-btn
         @ended="handleVideoEnd"
         @timeupdate="handleVideoTimeUpdate"
+        autoplay
       ></video>
       <view class="title text_twoLine">
         {{ videoPopList.Title }}
@@ -89,7 +90,8 @@ export default {
       this.$store.commit("videoPlay/palyTimeUpdate", time);
     },
     handleShow() {
-      this.$parent.showVideoPop = false;
+      // this.$parent.showVideoPop = false;
+      this.$emit("update:showVideoPop",false);
     },
   },
 };
@@ -133,6 +135,7 @@ export default {
     z-index: 112;
     display: flex;
     justify-content: flex-end;
+    z-index: inherit;
     image {
       height: 48rpx;
       width: 48rpx;

+ 5 - 0
config/api.js

@@ -51,6 +51,11 @@ export const Mine = {
   addHistory: (params) => {
     return postHttp("/config/aboutUs/addHistory", params);
   },
+  /* 上传文章阅读时间 */
+  report_selectionAddStopTime: (params) => {
+    return postHttp("/report_selection/addStopTime", params);
+  },
+  
 };
 /* 搜索 */
 export const Search = {

+ 9 - 0
config/modules/Home.js

@@ -36,4 +36,13 @@ export const Home = {
   microRoadshowCollect: (params) => {
     return postHttp("/micro_roadshow/collect", params);
   },
+  /* banner 列表 */
+  bannerList: (params) => {
+    return getHttp("/banner/list", params, 0);
+  },
+  /* banner 记录点击信息 */
+  bannerHistory: (params) => {
+    return postHttp("/banner/add/history", params, 0);
+  },
+  
 };

+ 3 - 0
pageMy/login/login.vue

@@ -218,6 +218,9 @@ export default {
             case "pages/material/material":
               uni.$emit("updateAudioVideo");
               break;
+            case "pageMy/myPage/myPage":
+              uni.$emit("updateNewList");
+              break;
             default:
               this.pathArrData.includes(path) ? prevPage.onLoad(prevPage.options) : "";
           }

+ 1 - 1
pageMy/mySchedulepage/mySchedulepage.vue

@@ -127,7 +127,7 @@
     <view v-if="showAudioBox">
       <audioModule :showAudioPop.sync="showAudioPop" />
     </view>
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+    <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
   </view>
 </template>
 

+ 1 - 1
pages-search/components/activityBack.vue

@@ -124,7 +124,7 @@
       <audioModule :showAudioPop.sync="showAudioPop" />
     </view>
     <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+    <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
     <u-modal
       v-model="specialGoFollowShow"
       :content-style="{ fontSize: '32rpx' }"

+ 1 - 1
pages-search/components/report.vue

@@ -157,7 +157,7 @@
       </view>
     </u-modal>
     <!-- 视频模块 -->
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" class="industry-video-module" />
+    <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" class="industry-video-module" />
     <!-- 权限弹窗 -->
     <modalDialog
       :isShowhasPermission="isShowhasPermission"

+ 86 - 41
pages/index/index.vue

@@ -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;

+ 1 - 1
pages/reportForm/reportForm.vue

@@ -178,7 +178,7 @@
     </u-modal>
     <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
     <!-- 视频模块 -->
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+    <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
     <modalDialog
       :isShowhasPermission="isShowhasPermission"
       :applyForIsShow="applyForIsShow"

+ 1 - 1
reportPages/hotList/hotList.vue

@@ -92,7 +92,7 @@
         <rich-text :nodes="accounts"></rich-text>
       </view>
     </u-modal>
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
+    <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
     <modalDialog
       :isShowhasPermission="isShowhasPermission"
       :applyForIsShow="applyForIsShow"

+ 26 - 1
reportPages/keyCompany/keyCompany.vue

@@ -100,7 +100,7 @@
 </template>
 
 <script>
-import { Reports } from "@/config/api.js";
+import { Reports, Mine } from "@/config/api.js";
 import statement from "@/reportPages/components/statement.vue";
 import { Throttle } from "@/config/util.js";
 import NotHaveLogin from "../../components/notHaveLogin.vue";
@@ -117,6 +117,8 @@ export default {
       areacodeShow: false,
       haveData: true,
       hasPermission: "",
+      readTiem: 0,
+      setIntervalTiem: null,
     };
   },
   components: { statement, NotHaveLogin },
@@ -232,9 +234,22 @@ export default {
             },
           });
     },
+    // 上传阅读时长的记录
+    async postStopTime(type) {
+      const res = await Mine.report_selectionAddStopTime({
+        ArticleId: this.reportDetail.ArticleId,
+        StopTime: this.readTiem,
+        OutType: type,
+        Source: 1,
+      });
+    },
   },
   onLoad() {},
   onShow() {
+    this.readTiem = 0;
+    this.setIntervalTiem = setInterval(() => {
+      this.readTiem++;
+    }, 1000);
     if (!this.$store.state.isAuth && !this.$store.state.isBind) this.reportSelectionDetail();
     this.$store.commit("setRouterReport", "重点公司");
   },
@@ -247,6 +262,16 @@ export default {
       path: "/reportPages/keyCompany/keyCompany",
     };
   },
+  // 页面隐藏/切入后台时触发
+  async onHide() {
+    clearInterval(this.setIntervalTiem);
+    this.postStopTime(2)
+  },
+  // 页面卸载时触发
+  async onUnload() {
+    clearInterval(this.setIntervalTiem);
+    this.postStopTime(1)
+  },
 };
 </script>
 

+ 26 - 3
reportPages/reportSecretDetail/reportSecretDetail.vue

@@ -133,7 +133,7 @@ import researchSummary from "./components/researchSummary.vue";
 import reportChoiceness from "./components/reportChoiceness.vue";
 import audioModule from "@/components/audioModule/index";
 import freeCharge from "@/components/freeCharge";
-import { Reports, FreeButton } from "@/config/api.js";
+import { Reports, FreeButton, Mine } from "@/config/api.js";
 import NotHaveLogin from "@/components/notHaveLogin.vue";
 let app = getApp({ allowDefault: true });
 export default {
@@ -159,6 +159,8 @@ export default {
       showAudioBox: false,
       curTime: 0,
       titleTxT: "",
+      readTiem: 0,
+      setIntervalTiem: null,
     };
   },
   filters: {
@@ -229,7 +231,7 @@ export default {
     },
     /* 无权限申请开通权限 */
     applyAuth() {
-      let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary"
+      let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary";
       this.hasPermission === 4
         ? uni.navigateTo({
             url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
@@ -320,6 +322,15 @@ export default {
         url: "/reportPages/secretDetails/secretDetails?type=" + this.isType,
       });
     },
+    // 上传阅读时长的记录
+    async postStopTime(type) {
+      const res = await Mine.report_selectionAddStopTime({
+        ArticleId: this.id,
+        StopTime: this.readTiem,
+        OutType: type,
+        Source: +this.isType,
+      });
+    },
   },
   components: {
     statement,
@@ -339,14 +350,26 @@ export default {
   },
 
   onShow() {
+    this.readTiem = 0;
+    this.setIntervalTiem = setInterval(() => {
+      this.readTiem++;
+    }, 1000);
     if (!this.$store.state.isAuth && !this.$store.state.isBind) {
       this.getDetilaiList();
     }
     this.$store.commit("setRouterReport", this.titleTxT);
     this.showAudioBox = true;
   },
-  onHide() {
+  // 页面隐藏/切入后台时触发
+  async onHide() {
     this.showAudioBox = false;
+    clearInterval(this.setIntervalTiem);
+    this.postStopTime(2);
+  },
+  // 页面卸载时触发
+  async onUnload() {
+    clearInterval(this.setIntervalTiem);
+    this.postStopTime(1);
   },
   /**
    * 用户点击分享