Browse Source

11.1 init

bding 1 year ago
parent
commit
75fa2f799c
3 changed files with 82 additions and 76 deletions
  1. 1 1
      components/report/timeLine.vue
  2. 15 38
      pages/material/material.vue
  3. 66 37
      pages/reportForm/reportForm.vue

+ 1 - 1
components/report/timeLine.vue

@@ -117,7 +117,7 @@ export default {
 <style scoped lang="scss">
 .time-line {
   padding: 30rpx 40rpx 20rpx 40rpx;
-  min-height: calc(100vh - 190rpx);
+  min-height: calc(100vh - 390rpx);
   background-color: #ffffff;
   position: relative;
   .texe-color {

+ 15 - 38
pages/material/material.vue

@@ -5,7 +5,7 @@
       <view class="top-tabs">
         <block v-for="item in topTabBars" :key="item.Id">
           <view v-if="item.IsShow" :class="['item', item.val == topTabsActive && 'tabs-active']" @click="topTabsChange(item)">
-            {{ item.Name }}
+            {{ showTabBarsText(item.Name) }}
             <block v-if="(item.Id === 3 || item.Name == '图表') && wholeShowListData.IsShowChart">
               <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
             </block>
@@ -15,12 +15,7 @@
       </view>
       <view class="tabs-content">
         <view class="second-tabs" v-if="topTabsActive == '2' || topTabsActive == '3'">
-          <view
-            :class="['item', item.ChartPermissionId == secondActive && 'tabs-active']"
-            v-for="(item, index) in secondBars"
-            :key="item.ChartPermissionId"
-            @click="handleClickTopSub(item)"
-          >
+          <view :class="['item', item.ChartPermissionId == secondActive && 'tabs-active']" v-for="(item, index) in secondBars" :key="item.ChartPermissionId" @click="handleClickTopSub(item)">
             {{ item.PermissionName }}
             <block v-if="wholeShowListData.IsShowResearch && index === secondBars.length - 1 && topTabsActive == '2'">
               <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
@@ -30,13 +25,9 @@
         </view>
         <block v-if="topTabsActive == '3'">
           <view class="children-ul">
-            <view
-              :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']"
-              v-for="item in chartChildren"
-              :key="item.CtagId"
-              @click="handleChartChildren(item)"
-              >{{ item.Name }}</view
-            >
+            <view :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']" v-for="item in chartChildren" :key="item.CtagId" @click="handleChartChildren(item)">{{
+              item.Name
+            }}</view>
           </view>
         </block>
         <view v-if="topTabsActive == '4'" class="medium-ul">
@@ -59,13 +50,7 @@
           <view class="report-ul" style="width: 49%">
             <block v-for="(item, index) in dataList" :key="index">
               <view v-if="index % 2 == 0">
-                <ChartItem
-                  v-if="topTabsActive == 3"
-                  :list="item"
-                  :isMyChartCollection="isMyChartCollection"
-                  @myChartIsTop="myChartIsTop"
-                  @myChartCollect="myChartCollect"
-                />
+                <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
                 <ReportItem v-if="topTabsActive == 2" :list="item" />
               </view>
             </block>
@@ -73,13 +58,7 @@
           <view class="report-ul" style="width: 49%">
             <block v-for="(item, index) in dataList" :key="index">
               <view v-if="index % 2 !== 0">
-                <ChartItem
-                  v-if="topTabsActive == 3"
-                  :list="item"
-                  :isMyChartCollection="isMyChartCollection"
-                  @myChartIsTop="myChartIsTop"
-                  @myChartCollect="myChartCollect"
-                />
+                <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
                 <ReportItem v-if="topTabsActive == 2" :list="item" />
               </view>
             </block>
@@ -145,8 +124,6 @@ export default {
       mediumSelect: [
         { name: "音频", value: "2", isSelect: false },
         { name: "视频", value: "1", isSelect: false },
-        { name: "逻辑解析", value: "3", isSelect: false },
-        { name: "路演回放", value: "4", isSelect: false },
       ],
       mediumActive: "",
     };
@@ -488,6 +465,12 @@ export default {
         });
       }
     },
+    showTabBarsText(key) {
+      if (key == "微路演") {
+        return "路演回放";
+      }
+      return key;
+    },
   },
   onHide() {
     this.$store.commit("audioBg/parseIntAudio", false);
@@ -534,13 +517,7 @@ export default {
     } else {
       return {
         title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "素材库",
-        path:
-          "/pages/material/material?topTabsActive=" +
-          this.topTabsActive +
-          "&secondActive=" +
-          this.secondActive +
-          "&childrenActive=" +
-          this.chartChildrenActive,
+        path: "/pages/material/material?topTabsActive=" + this.topTabsActive + "&secondActive=" + this.secondActive + "&childrenActive=" + this.chartChildrenActive,
         success: (res) => {},
         fail: (err) => {},
       };
@@ -615,7 +592,7 @@ export default {
       display: flex;
       flex-wrap: wrap;
       .children-active {
-        background-color: #3385ff; 
+        background-color: #3385ff;
         color: #fff;
       }
     }

+ 66 - 37
pages/reportForm/reportForm.vue

@@ -12,12 +12,7 @@
         </template>
       </search-bar>
       <view class="second-tabs">
-        <view
-          :class="['item', item.ChartPermissionId == tabAct_id && 'tabs-active']"
-          v-for="(item, index) in tabBars"
-          :key="item.ChartPermissionId"
-          @click="toggleTab(item, index)"
-        >
+        <view :class="['item', item.ChartPermissionId == tabAct_id && 'tabs-active']" v-for="(item, index) in tabBars" :key="item.ChartPermissionId" @click="toggleTab(item, index)">
           {{ item.PermissionName }}
           <view class="active" v-if="item.ChartPermissionId == tabAct_id"></view>
         </view>
@@ -25,14 +20,18 @@
     </view>
     <!-- 内容 -->
     <view class="strategy" v-if="strategyIndex >= 4">
+      <view class="banne-content" v-if="strategyIndex == 4">
+        <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>
+            </swiper-item>
+          </view>
+        </swiper>
+      </view>
       <view class="tab-cont-two">
         <block v-for="(item, index) in tabBarsTow" :key="item.CategoryId">
-          <view
-            :id="'__' + index"
-            class="scroll-tab-item"
-            :class="{ active: tabAct_idTwo == item.CategoryId }"
-            @click.stop="toggleTabTwo(item, index)"
-          >
+          <view :id="'__' + index" class="scroll-tab-item" :class="{ active: tabAct_idTwo == item.CategoryId }" @click.stop="toggleTabTwo(item, index)">
             {{ item.MatchTypeName }}
             <text class="reg-text" v-if="item.IsRed"></text>
           </view>
@@ -80,12 +79,7 @@
         </view>
       </view>
       <view v-if="labelListData.length" :class="[labelListData.length > 9 ? 'label-content-column' : 'label-content']">
-        <view
-          @click="strategyLabelHadel(item)"
-          :class="['item', item.Stock.length > 6 && 'item-size', 'text_oneLine']"
-          v-for="item in labelListData"
-          :key="item.ArticleId"
-        >
+        <view @click="strategyLabelHadel(item)" :class="['item', item.Stock.length > 6 && 'item-size', 'text_oneLine']" v-for="item in labelListData" :key="item.ArticleId">
           {{ item.Stock }}
         </view>
       </view>
@@ -127,12 +121,7 @@
           </view>
           <view class="content-box" @click="goIndustryReport(item.IndustrialManagementId)">
             <view class="read-more">
-              <view
-                class="industry-video-item"
-                @click.stop="handelVideoPlay(item)"
-                :style="{ 'background-image': 'url(' + item.IndustryVideo.BackgroundImg + ')' }"
-                v-if="item.IndustryVideo"
-              >
+              <view class="industry-video-item" @click.stop="handelVideoPlay(item)" :style="{ 'background-image': 'url(' + item.IndustryVideo.BackgroundImg + ')' }" v-if="item.IndustryVideo">
                 5min
                 <br />
                 逻辑解析
@@ -142,14 +131,10 @@
               </view>
               <block v-if="item.IndustrialSubjectList">
                 <view v-if="item.IndustryVideo" style="display: flex; flex-wrap: wrap; width: 420rpx">
-                  <view v-for="val in item.IndustrialSubjectList.slice(0, 4)" :key="val.IndustrialSubjectId" class="text-box">{{
-                    val.SubjectName
-                  }}</view>
+                  <view v-for="val in item.IndustrialSubjectList.slice(0, 4)" :key="val.IndustrialSubjectId" class="text-box">{{ val.SubjectName }}</view>
                 </view>
                 <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length > 4">
-                  <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box">{{
-                    val.SubjectName
-                  }}</view>
+                  <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box">{{ val.SubjectName }}</view>
                 </block>
                 <block v-if="!item.IndustryVideo">
                   <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box">{{ val.SubjectName }}</view>
@@ -179,12 +164,7 @@
     <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
     <!-- 视频模块 -->
     <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
-    <modalDialog
-      :isShowhasPermission="isShowhasPermission"
-      :applyForIsShow="applyForIsShow"
-      :jurisdictionList="jurisdictionList"
-      :hasPermission="hasPermission"
-    />
+    <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
     <Loading />
   </view>
 </template>
@@ -198,7 +178,7 @@ import modalDialog from "@/components/modalDialog.vue";
 import SearchBar from "@/components/search-bar/searchBar.vue";
 import TimeLine from "@/components/report/timeLine.vue";
 
-import { Reports } from "@/config/api.js";
+import { Reports, Home } from "@/config/api.js";
 let app = getApp();
 export default {
   components: {
@@ -260,10 +240,12 @@ export default {
           Content: "<p>hello,world</p><p>hello,world</p><p>hello,world</p>",
         }, //第一项是为了获取当前手机下,三行是多少相对高度
       ],
+      bannerDataList: [],
     };
   },
   onLoad(option) {
     this.loadList(option);
+    this.getBannerList();
   },
   watch: {
     //监听tabs的变化
@@ -577,6 +559,39 @@ export default {
       //去往文章详情页面
       uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
     },
+    // 获取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,
+          });
+      }
+    },
   },
   /* 触底 */
   onReachBottom: Throttle(function () {
@@ -749,6 +764,20 @@ export default {
   .label-content-column .item-size {
     font-size: 24rpx;
   }
+  .banne-content {
+    height: 200rpx;
+    width: 682rpx;
+    overflow: hidden;
+    margin: 20rpx auto;
+    border-radius: 8rpx;
+    swiper {
+      height: 202rpx;
+    }
+    image {
+      width: 100%;
+      height: 100%;
+    }
+  }
 }
 .content-intimate {
   position: fixed;