小彬 2 年 前
コミット
d61c7fb791

+ 0 - 1
App.vue

@@ -26,7 +26,6 @@ export default {
     userInfo: null, //用户信息
     access_token: "",
     loadOver: "",
-    bgAudioManager: uni.getBackgroundAudioManager(),
   },
   methods: {
     /* 微信code换临时token */

+ 1 - 1
activityPages/activitySearch/activitySearch.vue

@@ -28,7 +28,7 @@
       </view>
       <!-- 气泡主题list -->
       <view class="dynamic-content" v-if="!isShowSearch">
-        <view class="target-title"> 更多主题搜索: </view>
+        <view class="target-title"> 推荐关键词: </view>
         <view class="target-item">
           <view class="target-ul target-left">
             <view class="target-text" v-for="(item, index) in dynamicList" :key="index" v-if="index % 2 === 0">

+ 344 - 0
activityPages/playBack/playBack.vue

@@ -0,0 +1,344 @@
+<template>
+  <view class="container container-play-back">
+    <!-- 筛选部分 -->
+    <view class="screen-item">
+      <text :class="[isShowJurisdiction ? 'active' : '', 'text-item']" @click="permissioActivity">有权限行业</text>
+      <!-- 各种状态选择 -->
+      <view class="select-conyent">
+        <van-dropdown-menu active-color="#333333">
+          <van-dropdown-item id="industry" :title="chartPermissionName">
+            <view class="menu-items">
+              <view class="menu-items-box" v-for="item in listChartPermission" :key="item.ChartPermissionId" @click="overallClick(item)">
+                <view class="items-box">
+                  <u-icon v-if="item.IsChoose" name="checkbox-mark" :color="isShowJurisdiction ? '#ccc' : '#2C83FF'" size="24"></u-icon>
+                </view>
+                <text>{{ item.PermissionName }}</text>
+              </view>
+            </view>
+            <view class="replacement">
+              <text @click="replacementBtn" class="replacement-box">重置</text>
+              <text @click="replacementConfirm">确定</text>
+            </view>
+          </van-dropdown-item>
+        </van-dropdown-menu>
+      </view>
+      <text v-for="item in activityTimeList" :key="item.Id" :class="item.IsChoose ? 'active' : ''" @click="isActivityDate(item.Id)">{{ item.StatusName }}</text>
+    </view>
+    <!-- 活动列表 -->
+    <view class="collect-ul">
+      <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
+        <view class="title-date" @click="goDetail(item)">
+          <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
+          {{ item.ActivityTimeText }}
+          <view class="audio-back" v-if="!item.AudioLink" @click.stop="audioPlayBack(item)">
+            <image class="audio-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group.png"></image>
+            回放
+          </view>
+        </view>
+        <view class="item-li">
+          <view class="item-img" @click="goDetail(item)">
+            <image :src="item.ImgUrl"> </image>
+            <text v-if="item.ActiveState == 1" class="img-status begin">未开始</text>
+            <text v-else-if="item.ActiveState == 2" class="img-status proceed">进行中</text>
+            <text v-else class="img-status">已结束</text>
+            <view class="img-type">
+              <image :src="item.ImgUrlText" mode=""></image>
+            </view>
+          </view>
+          <view class="item">
+            <view class="item-text" @click="goDetail(item)">
+              <text class="activity-title"> {{ item.ActivityName }} </text>
+              <text class="text_twoLine" v-if="item.Expert">专家背景:{{ item.Expert }} </text>
+              <text class="text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
+              <text class="text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
+    </view>
+    <audioModule :showAudioPop.sync="showAudioPop" />
+  </view>
+</template>
+
+<script>
+import { activity, User } from "@/config/api.js";
+import { Throttle } from "@/config/util.js";
+import audioModule from "@/components/audioModule/index";
+export default {
+  data() {
+    return {
+      page_no: 1,
+      pageSize: 10,
+      collectList: [],
+      status: "loadmore",
+      refresh: false, //正在下拉
+      isShowJurisdiction: false,
+      isGetJurisdiction: 0,
+      listChartPermission: [],
+      chartPermissionName: "所有行业",
+      chartPermissionIds: "",
+      loadText: {
+        loadmore: "上拉加载更多",
+        loading: "加载中",
+        nomore: "已经到底了",
+      },
+      showAudioPop: true,
+    };
+  },
+  components: { audioModule },
+  methods: {
+    //获取活动
+    async getActivityList() {
+      const res = await activity.getActivityList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        ActiveState: "3",
+        IsShowJurisdiction: this.isGetJurisdiction,
+        ChartPermissionIds: this.chartPermissionIds,
+      });
+      if (res.Ret === 200) {
+        this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
+        if (this.page_no === 1) {
+          this.collectList = res.Data.List || [];
+          this.haveData = this.collectList.length ? true : false;
+          if (this.refresh) {
+            uni.stopPullDownRefresh();
+            this.refresh = false;
+          }
+        } else {
+          this.collectList = this.collectList.concat(res.Data.List);
+        }
+      }
+    },
+    async getUserSearchContent() {
+      const res = await activity.getUserSearchContent({
+        IsShowJurisdiction: this.isGetJurisdiction,
+      });
+      if (res.Ret === 200) {
+        this.isShowJurisdiction = res.Data.IsShowJurisdiction;
+        this.listChartPermission = res.Data.ListChartPermission;
+        this.clickPermission();
+      }
+    },
+    //是否有权限的点击事件
+    async permissioActivity() {
+      if (!this.$store.state.isAuth && !this.$store.state.isBind) {
+        this.selectComponent("#industry").toggle(false);
+        this.isShowJurisdiction = !this.isShowJurisdiction;
+        this.isGetJurisdiction = this.isShowJurisdiction ? 1 : 2;
+        await this.getUserSearchContent();
+
+        if (this.isShowJurisdiction) {
+          this.getActivityList();
+        } else {
+          this.replacementBtn();
+        }
+      } else {
+        //已授权未绑定
+        uni.navigateTo({
+          url: "/pageMy/login/login",
+        });
+      }
+    },
+    //点击后有权限的
+    clickPermission() {
+      if (this.isShowJurisdiction) {
+        const arr = [];
+        this.listChartPermission &&
+          this.listChartPermission.forEach((key) => {
+            if (key.IsChoose) {
+              arr.push(key.ChartPermissionId);
+            }
+          });
+        this.chartPermissionIds = arr.join(",");
+      }
+    },
+    //下拉选择的确定事件
+    replacementConfirm() {
+      const arr = [];
+      const str = [];
+      this.listChartPermission &&
+        this.listChartPermission.forEach((key) => {
+          if (key.IsChoose) {
+            arr.push(key.ChartPermissionId);
+            str.push(key.PermissionName);
+          }
+        });
+      if ((str.length == 6 && this.listChartPermission.length == 6) || str.length <= 0) {
+        this.chartPermissionName = "所有行业";
+      } else {
+        this.chartPermissionName = str.join(",");
+      }
+      this.chartPermissionIds = arr.join(",");
+      this.getActivityList();
+      this.selectComponent("#industry").toggle(false);
+    },
+    // 下拉的选择的重置事件
+    replacementBtn() {
+      this.chartPermissionIds = "";
+      this.isShowJurisdiction = false;
+      this.listChartPermission.map((item) => (item.IsChoose = false));
+      this.chartPermissionName = "所有行业";
+      this.getActivityList();
+    },
+    // 选择的选中事件
+    overallClick(item) {
+      if (this.isShowJurisdiction) return;
+      item.IsChoose = !item.IsChoose;
+    },
+    //点击了回放
+    audioPlayBack(item) {
+      // 判断是否为同一个音频
+      if (this.$store.state.audioBg.activityId == item.ActivityId) {
+        if (this.globalBgAudioManager.paused) {
+          this.globalBgAudioManager.play();
+        } else {
+          this.globalBgAudioManager.pause();
+        }
+      } else {
+        item.VideoList = {
+          Url:'https://hzstatic.hzinsights.com/static/yb_wx/voice_broadcast/o0hlQa36oHH61sTY3rkBPc9XyT98.mp3',
+          Time:'3.80',
+          Title:'测试测试'
+        }
+        this.showAudioPop = true;
+        this.$store.commit("audioBg/addAudio", { list: item.VideoList, activityId: item.ActivityId , activityTitle:item.ActivityName});
+      }
+    },
+  },
+  onLoad() {
+    this.getActivityList();
+    this.getUserSearchContent();
+  },
+  /* 触底 */
+  onReachBottom: Throttle(function () {
+    if (this.status === "nomore") return;
+    this.status = "loading";
+    this.page_no++;
+    this.getActivityList();
+  }),
+};
+</script>
+
+<style lang="scss" scoped>
+.container-play-back {
+  background: #f7f7f7;
+  padding-bottom: 30rpx;
+  .title-date {
+    position: relative;
+    .audio-back {
+      position: absolute;
+      right: 0;
+      top: 50%;
+      transform: translateY(-50%);
+      width: 99rpx;
+      height: 39rpx;
+      font-size: 24rpx;
+      color: #fff;
+      display: flex;
+      align-items: center;
+      background-color: #3385ff;
+      border-radius: 20rpx;
+      .audio-img {
+        width: 30rpx;
+        height: 30rpx;
+        margin: 0 5rpx;
+      }
+    }
+  }
+  .screen-item {
+    position: sticky;
+    top: 0;
+    left: 0;
+    z-index: 99;
+    background-color: #fff;
+    height: 111rpx;
+    padding: 0 34rpx;
+    font-size: 24rpx;
+    color: #333;
+    display: flex;
+    align-items: center;
+    .text-item {
+      width: 150rpx;
+      text-align: center;
+      line-height: 51rpx;
+      box-sizing: border-box;
+      border-radius: 26rpx;
+      background-color: #f8f8fa;
+      margin-right: 20rpx;
+    }
+    .active {
+      background-color: #3385ff;
+      color: #fff;
+    }
+  }
+  .select-conyent {
+    .items-box {
+      width: 40rpx;
+    }
+    .menu-items {
+      background-color: #f8f8fa;
+      width: 100%;
+      display: flex;
+      flex-wrap: wrap;
+      padding: 30rpx 30rpx 0;
+      .menu-items-box {
+        display: flex;
+        width: 50%;
+        font-size: 28rpx;
+        font-weight: 400;
+        margin-bottom: 40rpx;
+      }
+    }
+    .replacement {
+      margin: 0rpx 30rpx 20rpx;
+      display: flex;
+      background-color: #2c83ff;
+      height: 60rpx;
+      line-height: 58rpx;
+      font-size: 28rpx;
+      font-weight: 400;
+      color: #ffffff;
+      border-radius: 30rpx;
+      text {
+        flex: 1;
+        text-align: center;
+        line-height: 60rpx;
+      }
+      .replacement-box {
+        border: 1rpx solid #2c83ff;
+        line-height: 58rpx;
+        color: #2c83ff;
+        background: #ffffff;
+        border-radius: 28rpx 0rpx 28rpx 28rpx;
+      }
+    }
+  }
+  @import "../components/indexActivity.scss";
+}
+/deep/.van-dropdown-menu {
+  background-color: #fff;
+  box-shadow: none !important;
+  display: flex;
+  align-items: center;
+}
+/deep/.van-dropdown-menu__item {
+  box-sizing: border-box;
+  width: 190rpx;
+  margin-right: 40rpx;
+  padding-right: 20rpx;
+  height: 51rpx;
+  border-radius: 26rpx;
+  background: #f8f8fa;
+}
+/deep/.van-dropdown-item {
+  margin-top: -10rpx;
+}
+/deep/[data-index="2"] {
+  margin-right: 0rpx;
+}
+/deep/ .van-ellipsis {
+  font-size: 24rpx;
+}
+</style>

+ 187 - 0
components/audioModule/index.vue

@@ -0,0 +1,187 @@
+<template>
+  <van-overlay :show="showAudioPop" @click="isShowMaskHandler" z-index="999">
+    <view class="container global-audio-box">
+      <view class="audio-box">
+        <view class="activity-title">
+          {{ activityTitle }}
+          <van-icon name="cross" />
+        </view>
+        <view class="audio-card">
+          <view class="card-title">{{ title }}</view>
+          <slider activeColor="#3385FF" :max="audioTime" :value="curTime" @change="handleAudioSliderChange($event)" block-size="16" class="slider" />
+          <view class="card-time">
+            <text class="time">{{ curTime | formatVoiceTime }}</text>
+            <text class="time">{{ audioTime | formatVoiceTime }}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </van-overlay>
+</template>
+
+<script>
+export default {
+  name: "",
+  filters: {
+    formatVoiceTime(e) {
+      let m = parseInt(e / 60);
+      let s = parseInt(e % 60);
+      return `${m > 9 ? m : "0" + m}:${s > 9 ? s : "0" + s}`;
+    },
+  },
+  components: {},
+  props: {
+    showAudioPop: {
+      type: Boolean,
+      default: false,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      curTime: 0,
+      audioTime: 0, //当前音频总时长
+      title: "", //当前音频标题
+      activityTitle: "", //当前活动标题
+      play: false,
+    };
+  },
+  computed: {
+    audioInit() {
+      return {
+        activityId: this.$store.state.audioBg.activityId,
+      };
+    },
+  },
+  watch: {
+    audioInit: {
+      handler(nval) {
+        console.log(nval);
+        this.init();
+      },
+      immediate: true,
+    },
+  },
+
+  created() {},
+  mounted() {
+    this.init();
+  },
+  methods: {
+    isShowMaskHandler() {
+      this.$emit("update:showAudioPop", false);
+    },
+    init() {
+      console.log(this.$store.state.audioBg.activityTitle);
+      let delyTime = 0;
+      if (this.showAudioPop) {
+        this.globalBgAudioManager.stop();
+        delyTime = 300;
+      }
+      const curAudio = {
+        Url: "https://hzstatic.hzinsights.com/static/yb_wx/voice_broadcast/o0hlQa36oHH61sTY3rkBPc9XyT98.mp3",
+        Time: "300.80",
+        Title: "测试测试",
+      };
+      // this.$store.state.audioBg.list;
+      setTimeout(() => {
+        if (this.globalBgAudioManager.src != curAudio.Url) {
+          this.globalBgAudioManager.src = curAudio.Url;
+          this.globalBgAudioManager.title = curAudio.Title;
+        }
+        this.audioTime = curAudio.Time;
+        this.title = curAudio.Title;
+        this.activityTitle = this.$store.state.audioBg.activityTitle;
+        this.curTime = parseInt(this.globalBgAudioManager.currentTime);
+        this.play = !this.globalBgAudioManager.paused;
+        this.listenAudio();
+      }, delyTime);
+    },
+    //音频播放事件
+    listenAudio() {
+      console.log("设置监听事件");
+      this.globalBgAudioManager.onPlay(() => {
+        console.log("开始播放");
+        this.play = true;
+        this.$store.commit("audioBg/updateAudioPause", false);
+      });
+      this.globalBgAudioManager.onPause(() => {
+        console.log("音频暂停");
+        this.play = false;
+        this.$store.commit("audioBg/updateAudioPause", true);
+      });
+      this.globalBgAudioManager.onStop(() => {
+        console.log("音频停止");
+        this.$store.commit("audioBg/removeAudio");
+      });
+      this.globalBgAudioManager.onEnded(() => {
+        console.log("音频onEnded");
+        this.$store.commit("audioBg/removeAudio");
+      });
+      this.globalBgAudioManager.onError((e) => {
+        console.log("音频onError", e);
+        this.$store.commit("audioBg/removeAudio");
+        uni.showToast({
+          title: "音频播放错误",
+          icon: "none",
+        });
+      });
+      this.globalBgAudioManager.onTimeUpdate(() => {
+        this.curTime = parseInt(this.globalBgAudioManager.currentTime);
+        this.$store.commit("audioBg/updateAudioTime", this.curTime);
+      });
+    },
+    //拖动进度条
+    handleAudioSliderChange(e) {
+      const value = e.detail.value;
+      this.globalBgAudioManager.seek(value);
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.global-audio-box {
+  display: flex;
+  height: 100%;
+  position: relative;
+  .activity-title {
+    font-size: 30rpx;
+    font-weight: 500;
+    margin-bottom: 35rpx;
+  }
+  .audio-box {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+    width: 100%;
+    height: 460rpx;
+    background: #ffffff;
+    padding: 30rpx;
+    box-sizing: border-box;
+    border-radius: 30rpx 30rpx 0 0;
+  }
+  .audio-card {
+    width: 100%;
+    height: 282rpx;
+    background: #f5f9ff;
+    border-radius: 16rpx;
+    margin: 0 auto;
+    padding: 30rpx;
+    .slider {
+      width: 100%;
+      margin: 0;
+    }
+    .card-title {
+      color: #3385ff;
+    }
+    .card-time {
+      display: flex;
+      justify-content: space-between;
+      color: #999999;
+      font-size: 20rpx;
+    }
+  }
+}
+</style>

+ 2 - 2
main.js

@@ -4,7 +4,7 @@ import store from './store'
 import * as Db from './config/db.js';//缓存操作
 import * as Util from './config/util.js';//通用方法
 import uView from "uview-ui";
-import ferrMin from './components/freeMixin.js'
+import indexMixin from './mixin'
 Vue.use(uView);
 
 Vue.config.productionTip = false
@@ -13,7 +13,7 @@ Vue.prototype.$db = Db;
 Vue.prototype.$util = Util;
 Vue.prototype.$global = App.globalData;
 App.mpType = 'app'
-Vue.mixin(ferrMin)
+Vue.mixin(indexMixin)
 const app = new Vue({
    ...App,
 	store

+ 6 - 4
components/freeMixin.js → mixin/index.js

@@ -1,13 +1,15 @@
-// import freeCharge  from '@/components/freeCharge'
 import { FreeButton } from "@/config/api.js";
 export default {
-  //   components: {
-  //     freeCharge
-  // },
   data() {
     return {
       isShowFree: false, //免费标签的隐现
       isHorzMobile: null, //手机号是否是弘则的
+      globalBgAudioManager: uni.getBackgroundAudioManager(), //背景音频
+      navBarStyle: {
+        height: 60 + "px",
+        paddingTop: 40 + "px",
+        paddingBottom: "4px",
+      },
     };
   },
   onShow() {

+ 87 - 5
pageMy/browseHistory/browseHistory.vue

@@ -1,12 +1,38 @@
 <template>
   <view class="container browseHistory-container">
     <view class="history-ul" v-if="haveData">
-      <view class="history-ltem" v-for="(item, index) in historyList" :key="index" @click="goDetail(item.ArticleId)">
+      <!-- <view class="history-ltem" v-for="(item, index) in historyList" :key="index" @click="goDetail(item.ArticleId)">
         <view class="item-left">
           <text class="title text_twoLine">{{ item.Title }}</text>
           <text class="text_twoLine desc">{{ item.Body }}</text>
         </view>
         <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
+      </view> -->
+      <view class="content-item" v-for="item in historyList" :key="item.ArticleId">
+        <view class="item-user" v-if="item.Source == 2">
+          <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/user_report.png"></image>
+          <text> {{ item.NickName }}</text>
+        </view>
+        <view class="item-title">
+          <text style="display: inline" @click="goDetailReport(item)">
+            {{ item.Title }}
+          </text>
+          <text class="item-industry" v-if="item.IndustryName" @click="themeDetails(item)">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
+        </view>
+        <view class="item-more">
+          <text>{{ item.PublishDate }}</text>
+          <view class="pv-ollect" v-if="item.Source == 2">
+            <view>
+              <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
+              {{ item.Pv }}
+            </view>
+            <view @click="collectClick(item)">
+              <image v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
+              <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png"></image>
+              {{ item.CollectNum }}人收藏
+            </view>
+          </view>
+        </view>
       </view>
       <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="10" margin-bottom="10" v-if="totalPage > 1" />
     </view>
@@ -68,10 +94,19 @@ export default {
         }
       });
     },
-    goDetail(id) {
-      uni.navigateTo({
-        url: "/pageMy/reportDetail/reportDetail?id=" + id,
-      });
+    //去往文章详情页面
+    goDetailReport(item) {
+      this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
+    },
+    //去往主题详情
+    themeDetails(item) {
+      if (item.Source === 1) {
+        //非严选
+        this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId);
+      } else {
+        //严选
+        this.$store.dispatch("checkHandle", "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId);
+      }
     },
   },
   /* 触底 */
@@ -95,6 +130,53 @@ export default {
   background-color: #f7f7f7;
   .history-ul {
     padding-top: 4rpx;
+
+    .content-item {
+      background-color: #fff;
+      padding: 35rpx 20rpx 0;
+      .item-title {
+        font-weight: 500;
+        .item-industry {
+          margin-left: 10rpx;
+          color: #3385ff;
+          display: inline-block;
+        }
+      }
+      .item-user {
+        display: flex;
+        align-items: center;
+        color: #999999;
+        font-size: 28rpx;
+        margin-bottom: 20rpx;
+        image {
+          width: 23rpx;
+          height: 26rpx;
+          margin-right: 20rpx;
+        }
+      }
+      .item-more {
+        display: flex;
+        justify-content: space-between;
+        color: #cecece;
+        margin: 20rpx 0 0;
+        padding-bottom: 30rpx;
+        border-bottom: 1rpx solid #ececec;
+        .pv-ollect {
+          display: flex;
+          align-items: center;
+          width: 40%;
+          justify-content: space-between;
+          image {
+            width: 22rpx;
+            height: 21rpx;
+            margin-right: 10rpx;
+          }
+          .pv {
+            height: 16rpx;
+          }
+        }
+      }
+    }
     .history-ltem {
       display: flex;
       padding: 30rpx 34rpx;

+ 0 - 5
pageMy/freeTrial/freeTrial.vue

@@ -22,11 +22,6 @@ import { FreeButton } from "@/config/api.js";
 export default {
   data() {
     return {
-      navBarStyle: {
-        height: 60 + "px",
-        paddingTop: 40 + "px",
-        paddingBottom: "4px",
-      },
       wechatCode:'',//二维码
       scene:"",//用户的id
     };

+ 13 - 3
pages.json

@@ -117,7 +117,16 @@
             "enablePullDownRefresh": false
           }
         }
-      ]
+          ,{
+                    "path" : "playBack/playBack",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "活动回放",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+            ]
     },
     {
       "root": "reportPages",
@@ -254,7 +263,7 @@
         {
           "path": "browseHistory/browseHistory",
           "style": {
-            "navigationBarTitleText": "浏览历史",
+            "navigationBarTitleText": "足迹",
             "enablePullDownRefresh": true
           }
         },
@@ -338,7 +347,8 @@
       "van-tag": "/wxcomponents/vant/dist/tag/index",
       "van-icon": "/wxcomponents/vant/dist/icon/index",
       "van-radio": "/wxcomponents/vant/dist/radio/index",
-      "van-radio-group": "/wxcomponents/vant/dist/radio-group/index"
+      "van-radio-group": "/wxcomponents/vant/dist/radio-group/index",
+      "van-overlay": "/wxcomponents/vant/dist/overlay/index"
     }
   },
   "tabBar": {

+ 19 - 9
pages/activity/activity.vue

@@ -41,14 +41,16 @@
         <view class="half">
           <view class="activity-ltem" v-for="(item, index) in collectTypeList" :key="index" v-if="item.Position == 1">
             <image class="zindex-one" :src="item.ImgUrl"></image>
-            <image class="zindex-two" :src="item.ImgUrlBg"></image>
+            <!-- <image class="zindex-two" :src="item.ImgUrlBg"></image> -->
             <view class="content">
               <view class="item-img" @click="goDetails(item)">
                 {{ item.ActivityTypeName }}
               </view>
-              <view class="activity-li" v-for="val in item.List" :key="val.KeyWord" @click="goDetails(val, item.Resource)">
-                <image class="item-image" lazy-load :src="val.ImgUrlBg"></image>
-                <text class="text_oneLine"> {{ val.KeyWord }}</text>
+              <view :style="{ 'background-image': 'url(' + item.ImgUrlBg + ')' }" class="activity-ui">
+                <view class="activity-li" v-for="val in item.List" :key="val.KeyWord" @click="goDetails(val, item.Resource)">
+                  <image class="item-image" lazy-load :src="val.ImgUrlBg"></image>
+                  <text class="text_oneLine"> {{ val.KeyWord }}</text>
+                </view>
               </view>
             </view>
           </view>
@@ -56,14 +58,16 @@
         <view class="half">
           <view class="activity-ltem" v-for="(item, index) in collectTypeList" :key="index" v-if="item.Position == 2">
             <image class="zindex-one" :src="item.ImgUrl"></image>
-            <image class="zindex-two" :src="item.ImgUrlBg"></image>
+            <!-- <image class="zindex-two" :src="item.ImgUrlBg"></image> -->
             <view class="content">
               <view class="item-img" @click="goDetails(item)">
                 {{ item.ActivityTypeName }}
               </view>
-              <view class="activity-li" v-for="val in item.List" :key="val.KeyWord" @click="goDetails(val, item.Resource)">
-                <image class="item-image" lazy-load :src="val.ImgUrlBg"></image>
-                <text class="text_oneLine"> {{ val.KeyWord }}</text>
+              <view :style="{ 'background-image': 'url(' + item.ImgUrlBg + ')' }" class="activity-ui">
+                <view class="activity-li" v-for="val in item.List" :key="val.KeyWord" @click="goDetails(val, item.Resource)">
+                  <image class="item-image" lazy-load :src="val.ImgUrlBg"></image>
+                  <text class="text_oneLine"> {{ val.KeyWord }}</text>
+                </view>
               </view>
             </view>
           </view>
@@ -624,7 +628,9 @@ export default {
       top: 0;
       left: 0;
       width: 100%;
-      padding-bottom: 30rpx;
+      // padding-bottom: 30rpx;
+      border-radius:15rpx;
+      overflow: hidden;
       z-index: 3;
     }
     .item-img {
@@ -671,6 +677,10 @@ export default {
     color: #3385ff;
     margin-top: 90rpx;
   }
+  .activity-ui {
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+  }
 }
 /deep/.van-dropdown-menu {
   background-color: #fff;

+ 0 - 5
pages/index/index.vue

@@ -136,11 +136,6 @@ let app = getApp();
 export default {
   data() {
     return {
-      navBarStyle: {
-        height: 60 + "px",
-        paddingTop: 40 + "px",
-        paddingBottom: "20px",
-      },
       topTabBars: [
         //一级top
         { type: "最新", val: 1 },

+ 0 - 6
pages/purchaser/purchaser.vue

@@ -147,12 +147,6 @@ export default {
         { titel: "主题热度榜", name: "主题" },
         { titel: "KOL榜", name: "专家" },
       ],
-      navBarStyle: {
-        height: 60 + "px",
-        paddingTop: 40 + "px",
-        paddingBottom: "4px",
-      },
-
       confirmText: "知道了",
       accounts: "",
       isCancelBtn: false,

+ 0 - 5
pages/reportForm/reportForm.vue

@@ -233,11 +233,6 @@ export default {
       showTransition: false, //点击绝密后的隐现
       reportShow: false, //绝密标签的隐现
       isShowHot: false,//榜单的隐现
-      navBarStyle: {
-        height: 60 + "px",
-        paddingTop: 40 + "px",
-        paddingBottom: "4px",
-      },
     };
   },
   onLoad(option) {

+ 10 - 10
reportPages/reportSecretDetail/reportSecretDetail.vue

@@ -97,17 +97,17 @@ export default {
   },
   methods: {
     audioPlay() {
-      if (this.videoUrl === app.globalData.bgAudioManager.src) {
-        app.globalData.bgAudioManager.play();
+      if (this.videoUrl === this.globalBgAudioManager.src) {
+        this.globalBgAudioManager.play();
       } else {
-        app.globalData.bgAudioManager.title = this.detali.VideoName;
-        app.globalData.bgAudioManager.src = this.videoUrl;
+        this.globalBgAudioManager.title = this.detali.VideoName;
+        this.globalBgAudioManager.src = this.videoUrl;
       }
       this.isPlay = true;
     },
     audiouspend() {
       this.isPlay = false;
-      app.globalData.bgAudioManager.pause();
+      this.globalBgAudioManager.pause();
     },
     async getDetilaiList() {
       const res =
@@ -127,7 +127,7 @@ export default {
         this.hasPermission = res.Data.HasPermission;
         this.videoUrl = res.Data.Detail.VideoUrl;
         this.isType == 1 ? (this.dataList = res.Data.List || []) : (this.dataListResearch = res.Data.List || []);
-        if (app.globalData.bgAudioManager.src === this.videoUrl && app.globalData.bgAudioManager.paused === false) {
+        if (this.globalBgAudioManager.src === this.videoUrl && this.globalBgAudioManager.paused === false) {
           this.isPlay = true;
         }
       }
@@ -181,16 +181,16 @@ export default {
       title: this.isType == 1 ? "报告精选" : this.isType == 2 ? "本周研究汇总" : "上周纪要汇总",
     });
     this.userIsShowAlert();
-    app.globalData.bgAudioManager.onEnded((res) => {
+    this.globalBgAudioManager.onEnded((res) => {
       this.isPlay = false;
     });
-    app.globalData.bgAudioManager.onPause((res) => {
+    this.globalBgAudioManager.onPause((res) => {
       this.isPlay = false;
     });
-    app.globalData.bgAudioManager.onPlay((res) => {
+    this.globalBgAudioManager.onPlay((res) => {
       this.isPlay = true;
     });
-    app.globalData.bgAudioManager.onStop((res) => {
+    this.globalBgAudioManager.onStop((res) => {
       this.isPlay = false;
     });
   },

+ 10 - 10
reportPages/roadEssence/roadEssence.vue

@@ -83,7 +83,7 @@ export default {
         this.detali = res.Data.Detail;
         this.haveAuth = res.Data.HasPermission;
         this.videoUrl = res.Data.Detail.VideoUrl;
-        if (app.globalData.bgAudioManager.src === this.videoUrl && app.globalData.bgAudioManager.paused === false) {
+        if (this.globalBgAudioManager.src === this.videoUrl && this.globalBgAudioManager.paused === false) {
           this.isPlay = true;
         }
       }
@@ -122,17 +122,17 @@ export default {
       });
     },
     audioPlay(e) {
-      if (this.videoUrl === app.globalData.bgAudioManager.src) {
-        app.globalData.bgAudioManager.play();
+      if (this.videoUrl === this.globalBgAudioManager.src) {
+        this.globalBgAudioManager.play();
       } else {
-        app.globalData.bgAudioManager.title = this.detali.VideoName;
-        app.globalData.bgAudioManager.src = this.videoUrl;
+        this.globalBgAudioManager.title = this.detali.VideoName;
+        this.globalBgAudioManager.src = this.videoUrl;
       }
       this.isPlay = true;
     },
     audiouspend() {
       this.isPlay = false;
-      app.globalData.bgAudioManager.pause();
+      this.globalBgAudioManager.pause();
     },
     //获取权限弹窗是否展示免费月卡接口
     async userIsShowAlert() {
@@ -148,16 +148,16 @@ export default {
   },
   onLoad(option) {
     this.id = Number(option.id) || "";
-    app.globalData.bgAudioManager.onEnded((res) => {
+    this.globalBgAudioManager.onEnded((res) => {
       this.isPlay = false;
     });
-    app.globalData.bgAudioManager.onPause((res) => {
+    this.globalBgAudioManager.onPause((res) => {
       this.isPlay = false;
     });
-    app.globalData.bgAudioManager.onPlay((res) => {
+    this.globalBgAudioManager.onPlay((res) => {
       this.isPlay = true;
     });
-    app.globalData.bgAudioManager.onStop((res) => {
+    this.globalBgAudioManager.onStop((res) => {
       this.isPlay = false;
     });
     this.userIsShowAlert();

+ 3 - 2
store/index.js

@@ -2,7 +2,7 @@ import Vue from "vue";
 import Vuex from "vuex";
 import { checkToken, User } from "@/config/api.js";
 import { set } from "@/config/db.js"; //缓存操作
-
+import audioBg from "./modules/audioBg";
 Vue.use(Vuex);
 
 const store = new Vuex.Store({
@@ -43,7 +43,7 @@ const store = new Vuex.Store({
                   });
                 }
               }
-              resolve()
+              resolve();
             }
           })
           .catch((err) => {
@@ -67,6 +67,7 @@ const store = new Vuex.Store({
     },
   },
   getters: {},
+  modules: { audioBg },
 });
 
 export default store;

+ 35 - 0
store/modules/audioBg.js

@@ -0,0 +1,35 @@
+// 全局音频背景播放状态管理模块
+const audioModules = {
+  namespaced: true,
+  state: {
+    list: [], //[{url:音频地址,time:音频时长,title:音频标题,}]
+    activityId: 0, //当前是哪个报告的音频
+    paused: true, //当前是否音频正在播放 true暂停状态
+    curTime: 0, //当前正在播放的音频播放的时间
+    activityTitle: "",
+  },
+  mutations: {
+    addAudio(state, payload) {
+      console.log(payload, "asdas");
+      state.list = payload.list;
+      state.activityTitle = payload.activityTitle;
+      state.activityId = payload.activityId || 0;
+    },
+    // 音频状态
+    updateAudioPause(state, payload) {
+      state.paused = payload;
+    },
+    // 更新音频播放进度
+    updateAudioTime(state, payload) {
+      state.curTime = payload;
+    },
+    //删除当前音频播放
+    removeAudio(state, payload) {
+      state.list = [];
+      state.activityId = 0;
+      state.paused = true;
+    },
+  },
+};
+
+export default audioModules;