小彬 hace 2 años
padre
commit
0e83e2c050

+ 85 - 18
components/audioModule/index.vue

@@ -12,17 +12,30 @@
         <view class="card-title text_oneLine">
           {{ 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 class="slider-paly">
+          <view style="flex: 1; padding-top: 20rpx">
+            <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 class="is-paly-card">
+            <image
+              @click.stop="handleChangePlayStatus"
+              class=""
+              :src="play ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/play_icon.gif' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/pause_icon.png'"
+            ></image>
+          </view>
         </view>
-        <view class="is-paly-card">
-          <image
-            @click.stop="handleChangePlayStatus"
-            class=""
-            :src="play ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/suspend_icon.png' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/play_icon.png'"
-          ></image>
+        <view class="fast-reverse">
+          <image @click="speedReverseHandler('reverse')" class="speed-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/fastReverse_icon.png"></image>
+          <block v-for="(item, index) in timesTheSpeed" :key="item.value">
+            <view class="speed-button" v-if="isTimes == item.value" @click="isTimesHandler(index)">
+              {{ item.name }}
+            </view>
+          </block>
+          <image @click="speedReverseHandler('speed')" class="speed-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/speed_icon.png"></image>
         </view>
       </view>
     </view>
@@ -56,6 +69,13 @@ export default {
       activityTitle: "", //当前活动标题
       play: false,
       isEnded: false,
+      timesTheSpeed: [
+        { name: "倍速", value: 1 },
+        { name: "1.25倍", value: 1.25 },
+        { name: "1.5倍", value: 1.5 },
+        { name: "2倍", value: 2 },
+      ],
+      isTimes: 1,
     };
   },
   computed: {
@@ -90,11 +110,13 @@ export default {
       if (this.globalBgAudioManager.src != curAudio.Url) {
         this.globalBgAudioManager.src = curAudio.Url;
         this.globalBgAudioManager.title = curAudio.Name;
+        this.isTimes = 1;
       }
+      this.globalBgAudioManager.playbackRate = this.isTimes;
       this.audioTime = curAudio.PlaySeconds;
       this.title = curAudio.Name;
       this.activityTitle = this.$store.state.audioBg.activityTitle;
-      this.curTime = parseInt(this.globalBgAudioManager.currentTime);
+      this.curTime = parseInt(this.globalBgAudioManager.currentTime || 0);
       this.play = !this.globalBgAudioManager.paused;
       this.listenAudio();
     },
@@ -148,6 +170,7 @@ export default {
     //拖动进度条
     handleAudioSliderChange(e) {
       const value = e.detail.value;
+      console.log(value, "value");
       this.globalBgAudioManager.seek(value);
     },
     //音频点击暂停播放
@@ -162,6 +185,25 @@ export default {
         this.init();
       }
     },
+    //倍速播放
+    isTimesHandler(i) {
+      let index = i == 3 ? 0 : i + 1;
+      this.isTimes = this.timesTheSpeed[index].value;
+      this.globalBgAudioManager.pause();
+      this.play = true;
+      this.globalBgAudioManager.playbackRate = this.isTimes;
+      this.globalBgAudioManager.startTime = this.curTime;
+      this.globalBgAudioManager.play();
+    },
+    //快进 快退
+    speedReverseHandler(type) {
+      if (!this.globalBgAudioManager.src) {
+        this.init();
+      }
+      let isTime = type == "reverse" ? this.curTime - 15 : this.curTime + 15;
+      isTime = isTime <= 0 ? 0 : isTime;
+      this.globalBgAudioManager.seek(isTime);
+    },
   },
 };
 </script>
@@ -214,7 +256,7 @@ export default {
   .audio-card {
     width: 100%;
     height: 282rpx;
-    background: #f5f9ff;
+    background: #f9f9f9;
     border-radius: 16rpx;
     margin: 0 auto;
     padding: 30rpx;
@@ -222,10 +264,15 @@ export default {
       width: 100%;
       margin: 0;
     }
+    .slider-paly {
+      display: flex;
+      height: 80rpx;
+      align-items: center;
+    }
     .card-title {
       color: #3385ff;
       font-size: 28rpx;
-      padding: 0 66rpx;
+      padding: 0 40rpx;
       text-align: center;
       margin-bottom: 35rpx;
     }
@@ -236,12 +283,32 @@ export default {
       font-size: 20rpx;
     }
     .is-paly-card {
-      width: 100%;
-      text-align: center;
+      width: 70rpx;
+      height: 70rpx;
+      flex-shrink: 0;
+      margin-left: 30rpx;
       image {
-        margin-top: 5rpx;
-        width: 100rpx;
-        height: 100rpx;
+        width: 70rpx;
+        height: 70rpx;
+      }
+    }
+    .fast-reverse {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-top: 30rpx;
+      .speed-button {
+        width: 96rpx;
+        height: 47rpx;
+        background: #eaeaea;
+        border-radius: 8rpx;
+        text-align: center;
+        line-height: 47rpx;
+        margin: 0 70rpx;
+      }
+      .speed-img {
+        width: 50rpx;
+        height: 50rpx;
       }
     }
   }

+ 1 - 1
config/api.js

@@ -361,7 +361,7 @@ export const activity = {
   },
   //背景音频开始播放
   backAudioPlay: (params) => {
-    return postHttp("/activity/voiceHistory/add", params);
+    return postHttp("/activity/voiceHistory/add", params,0);
   },
 };
 export const Research = {

+ 5 - 14
pages/reportForm/reportForm.vue

@@ -491,10 +491,10 @@ export default {
         // this.overallArrangement.forEach((key) => (key.isShow = false));
       }
       this.strategyIndex == 4 ? this.getstrategyAll() : (this.tabAct_idTwo = "");
-      if (this.isScrollShow) {
-        this.selectComponent("#menuItem").toggle(false);
-        this.isScrollShow = false;
-      }
+      // if (this.isScrollShow) {
+      //   this.selectComponent("#menuItem").toggle(false);
+      //   this.isScrollShow = false;
+      // }
       this.isNum = 1;
     },
     /* 页面加载 */
@@ -577,21 +577,12 @@ export default {
       fail: (err) => {},
     };
   },
-  /**
-   *监听页面滚动
-   */
-  onPageScroll() {
-    if (this.isScrollShow) {
-      this.selectComponent("#menuItem").toggle(false);
-      this.isScrollShow = false;
-    }
-  },
+ 
   onHide() {
     if (this.showTransition) {
       this.showTransition = false;
     }
     if (this.strategyIndex == 4 || this.strategyIndex == 5) return;
-    this.selectComponent("#menuItem").toggle(false);
   },
 };
 </script>

+ 22 - 1
reportPages/hotList/hotList.vue

@@ -28,7 +28,8 @@
               <text class="li-serial serial-number" :style="{ background: serialBackground(index) }">
                 {{ index + 1 }}
               </text>
-              <text class="text_oneLine" style="display: inline"> # {{ item.IndustryName }} </text>
+              <text class="title-text text_oneLine" style="display: inline"> # {{ item.IndustryName }} </text>
+              <view class="industry-color" :style="[classifyColor('医药')]">医药</view>
               <image class="new-img" v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/new_icon.png"></image>
             </view>
             <text :class="item.IsFollow ? 'cancel-attention' : 'attention'" @click="isAttention(item, '主题')">{{ item.IsFollow ? "取消关注" : "+ 关注" }}</text>
@@ -54,7 +55,9 @@
           <view class="li-item li-bottom" style="color: #999999">
             <view class="li-user text_oneLine">
               {{ item.PublishDate }}
+               <view class="industry-color" :style="[classifyColor('医药')]">医药</view>
             </view>
+           
           </view>
         </view>
       </view>
@@ -194,6 +197,13 @@ export default {
         url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId,
       });
     },
+    classifyColor(item) {
+      let color_word = item == "医药" ? "#04CE3D" : item == "科技" ? "#3385FF" : item == "消费" ? "#F1BA70" : item == "智造" ? "#8F72E1" : "#F1925C";
+      let color_bg = item == "医药" ? "#EEFFF2" : item == "科技" ? "#EEF5FF" : item == "消费" ? "#FFFAF3" : item == "智造" ? "#F4F0FF" : "#FFFAF2";
+      let _isColor = { color: color_word, border: ` 1px solid ${color_word}`, "background-color": color_bg };
+      console.log(_isColor);
+      return _isColor;
+    },
   },
   onLoad() {
     this.getTabList();
@@ -284,6 +294,8 @@ export default {
       }
       .li-user {
         margin-left: 46rpx;
+        display:flex;
+        align-items: center;
       }
       .li-title {
         display: flex;
@@ -353,5 +365,14 @@ export default {
     color: #c4c4c4;
     font-size: 20rpx;
   }
+  .industry-color {
+    padding: 3rpx 20rpx;
+    border-radius: 4rpx;
+    margin-left: 20rpx;
+  }
+  .title-text {
+    font-size: 28rpx;
+    font-weight: 500;
+  }
 }
 </style>

+ 15 - 1
reportPages/reportSecretDetail/components/reportChoiceness.vue

@@ -2,6 +2,9 @@
   <view>
     <view class="container-report forbid-copy" v-if="dataListResearch.length > 0">
       <view class="content" v-for="(item, index) in dataListResearch" :key="index">
+        <view v-if="item.Type === 'YANX'" class="official-notice">
+          <image src=" https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/mfyx_icon.png"></image>
+        </view>
         <view class="content-title">
           <view></view>
           <image :src="item.IcoLink" mode=""></image>
@@ -67,7 +70,7 @@ export default {
       align-items: center;
       justify-content: center;
       margin: 30rpx 0 30rpx;
-      color: #4A4A4A;
+      color: #4a4a4a;
       image {
         width: 40rpx;
         height: 44rpx;
@@ -118,6 +121,17 @@ export default {
         padding-bottom: 30rpx;
       }
     }
+    .official-notice {
+      width: calc(100% + 68rpx);
+      margin-left: -34rpx;
+      height: 150rpx;
+      margin-top: 70rpx;
+
+      image {
+        width: 100%;
+        height: 100%;
+      }
+    }
   }
 }
 </style>

+ 65 - 6
reportPages/secretDetails/secretDetails.vue

@@ -1,5 +1,11 @@
 <template>
   <view class="container container-secret">
+    <view class="tabs-content">
+      <view :class="['item-li', isType == item.value && 'item-active']" v-for="item in tabsList" :key="item.value" @click="tabsHandler(item)">
+        {{ item.name }}
+        <image v-if="isType == item.value" class="border_act" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/border_act.png"></image>
+      </view>
+    </view>
     <view class="collect-ul" v-if="haveData">
       <view class="collect-ltem" v-for="(item, index) in collectList" :key="index" @click="goDetail(item, index)">
         <text class="title text_twoLine"
@@ -47,12 +53,32 @@ export default {
         loading: "加载中",
         nomore: "已经到底了",
       },
+      tabsList: [
+        { name: "本周研究汇总", value: 2 },
+        { name: "上周纪要汇总", value: 3 },
+        { name: "报告精选", value: 1 },
+      ],
     };
   },
   components: {
     freeCharge,
   },
+  computed: {
+    navigationBarTitle() {
+      return this.isType == 1 ? "报告精选" : this.isType == 2 ? "本周研究汇总" : "上周纪要汇总";
+    },
+  },
   methods: {
+    //点击头部的tabs
+    tabsHandler(item) {
+      this.isType = item.value;
+      uni.setNavigationBarTitle({
+        title: this.navigationBarTitle,
+      });
+      this.page_no = 1;
+      this.getList();
+    },
+    //获取数据
     async getList() {
       const res = await Reports.reportListByType({
         PageSize: this.pageSize,
@@ -74,6 +100,7 @@ export default {
         }
       }
     },
+    //跳转详情
     goDetail(item, index) {
       /* 无需授权且已绑定 检验是或否有权限 */
       this.collectList[index].IsRed = false;
@@ -102,10 +129,13 @@ export default {
     this.refresh = true;
     this.getList();
   }),
-  onShareAppMessage(res) {
+  /* 用户点击分享  */
+  onShareAppMessage: function (res) {
     return {
-      title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.isType == 2 ? "本周研究汇总" : "上周纪要汇总",
+      title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.navigationBarTitle,
       path: "/reportPages/secretDetails/secretDetails?type=" + this.isType,
+      success: (res) => {},
+      fail: (err) => {},
     };
   },
 };
@@ -115,6 +145,35 @@ export default {
 .container-secret {
   background: #f7f7f7;
   padding-bottom: 30rpx;
+  .tabs-content {
+    position: sticky;
+    top: -1rpx;
+    left: 0;
+    background-color: #fff;
+    height: 81rpx;
+    display: flex;
+    font-size: 30rpx;
+    font-weight: 400;
+    padding: 21rpx 35rpx 0;
+    color: #999999;
+    z-index: 99;
+    .item-li {
+      position: relative;
+      margin-right: 60rpx;
+      .border_act {
+        width: 60%;
+        height: 6rpx;
+        position: absolute;
+        bottom: 0rpx;
+        left: 50%;
+        transform: translateX(-50%);
+      }
+    }
+    .item-active {
+      color: #333333;
+      font-weight: 500;
+    }
+  }
   .collect-ul {
     padding-top: 4rpx;
     .collect-ltem {
@@ -167,9 +226,9 @@ export default {
     }
   }
   .title {
-    color: #333333 ;
-    font-size: 30rpx ;
-    font-weight: 400 ;
+    color: #333333;
+    font-size: 30rpx;
+    font-weight: 400;
     width: 100%;
     padding-bottom: 15rpx;
     border-bottom: 1px dashed #ccc;
@@ -178,7 +237,7 @@ export default {
     margin: 20rpx 0 0 30rpx;
     color: #666666;
     font-size: 28rpx;
-    font-weight: 400 ;
+    font-weight: 400;
     padding-right: 10rpx;
   }
 }

+ 1 - 1
store/modules/audioBg.js

@@ -22,7 +22,7 @@ const audioModules = {
     },
     // 更新音频播放进度
     updateAudioTime(state, payload) {
-        state.curTime = payload;
+        state.curTime = Number(payload);
     },
     //删除当前音频播放
     removeAudio(state, payload) {