12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097 |
- <template>
- <view class="container Index-container">
- <view class="top-content-box">
- <view class="nav-bar-wrap" :style="{ height: navBarStyle.height, paddingTop: navBarStyle.paddingTop, paddingBottom: navBarStyle.paddingBottom }">
- <view class="content" @click="goSearch">
- <icon type="search" size="15" class="search_ico" />
- <text class="sea_ipt">{{ searchPlaceholderList.SummarySearch || "" }}</text>
- </view>
- </view>
- <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 }}
- <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>
- <view class="active" v-if="item.Id == topTabsActive"></view>
- </view>
- </block>
- </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)">
- {{ 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>
- </block>
- <view class="active" v-if="item.ChartPermissionId == secondActive"></view>
- </view>
- </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>
- </block>
- </view>
- </view>
- <block v-if="haveData">
- <view class="audio-video-content" v-if="topTabsActive == 4">
- <view :class="item.Type == 1 ? 'audio-item' : 'video-item'" v-for="item in videoAudioList" :key="item.Id">
- <view class="cover-item" :style="{ 'background-image': 'url(' + item.BackgroundImg + ')' }">
- <block v-if="item.Type == 2">
- <video
- :id="item.Id"
- :src="item.ResourceUrl"
- :poster="item.BackgroundImg"
- enable-play-gesture
- object-fit="contain"
- show-mute-btn
- autoplay
- @ended="handleVideoEnd"
- v-if="item.Id == curVideoId"
- ></video>
- <image v-else class="img-bg" @click="handelPlay(item)" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/play_icon_index.png"></image>
- </block>
- <block v-else>
- <image
- class="img-bg"
- @click.stop="handelPlay(item)"
- :src="
- curVoiceId === item.ActivityId && !curAudioPaused
- ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop_index.png'
- : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group_index.png'
- "
- ></image>
- </block>
- <text class="time">{{ item.PublishTime }}</text>
- </view>
- <view class="title-share">
- <view class="title text_twoLine">{{ item.Title }}</view>
- <view class="share">
- <view class="share-text" :style="[classifyColor(item.ChartPermissionName)]">
- <image :src="classifyIcon(item)"></image>
- {{ item.Type == 1 ? "音频" : "视频" }}|{{ item.ChartPermissionName }}
- </view>
- <button class="share-icon" open-type="share" :data-item="item">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/share-btn-icon.png"></image>
- </button>
- </view>
- </view>
- </view>
- </view>
- <view class="data-cont" v-else>
- <view class="report-ul">
- <view class="report-item" v-for="(report, index) in dataList" :key="index" v-if="index % 2 === 0" @click="goDetail(report)">
- <block v-if="report.HomeType === 1">
- <view class="audio-video-content">
- <view class="audio-item">
- <view class="cover-item" :style="{ 'background-image': 'url(' + report.MicroAudio.AudioImgUrl + ')' }">
- <image
- class="img-bg"
- @click.stop="handelPlay(report.MicroAudio)"
- :src="
- curVoiceId === report.MicroAudio.AudioActivityId && !curAudioPaused
- ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop_index.png'
- : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group_index.png'
- "
- ></image>
- <text class="time">{{ report.MicroAudio.AudioPublishTime }}</text>
- </view>
- <view class="title-share">
- <view class="title text_twoLine">{{ report.MicroAudio.AudioTitle }}</view>
- <view class="share">
- <view class="share-text" :style="[classifyColor(report.MicroAudio.AudioChartPermissionName)]">
- <image :src="classifyIcon(report.MicroAudio)"></image>
- 音频|{{ report.MicroAudio.AudioChartPermissionName }}
- </view>
- <button class="share-icon" open-type="share" :data-item="report.MicroAudio">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/share-btn-icon.png"></image>
- </button>
- </view>
- </view>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="item-content-img" v-if="report.BodyHtml">
- <image :src="report.BodyHtml" mode=""></image>
- </view>
- <view class="item-content" v-else>{{ report.Body }}</view>
- <view class="line"></view>
- <text :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']">{{ report.Title }}</text>
- <view class="item-abstract text_twoLine" v-if="report.ExpertBackground">
- {{ report.ExpertBackground }}
- </view>
- <block v-if="report.Source == 1">
- <view class="item-createtime">
- <text>{{ report.PublishDate }}</text>
- <view class="item-examine" v-if="report.IsResearch">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
- <text>{{ report.Pv }}</text>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="item-createtime chart-tag">
- <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
- <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
- </view>
- <view class="chart-collect" v-if="topTabsActive == 3 && secondActive == 0">
- <text class="cancel" @click.stop="myChartIsTop(report.ChartId)">{{ report.IsTop ? "取消置顶" : "置顶" }}</text>
- <text class="remove" @click.stop="myChartCollect(report.ChartId)">移除</text>
- </view>
- <view class="my-chart-collect" v-if="topTabsActive == 3 && secondActive == 0 && report.IsTop"></view>
- </block>
- </block>
- </view>
- </view>
- <view class="report-ul">
- <view class="report-item" v-for="(report, index) in dataList" :key="index" v-if="index % 2 !== 0" @click="goDetail(report)">
- <block v-if="report.HomeType === 1">
- <view class="audio-video-content">
- <view class="audio-item">
- <view class="cover-item" :style="{ 'background-image': 'url(' + report.MicroAudio.AudioImgUrl + ')' }">
- <image
- class="img-bg"
- @click.stop="handelPlay(report.MicroAudio)"
- :src="
- curVoiceId === report.MicroAudio.AudioActivityId && !curAudioPaused
- ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop_index.png'
- : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group_index.png'
- "
- ></image>
- <text class="time">{{ report.MicroAudio.AudioPublishTime }}</text>
- </view>
- <view class="title-share">
- <view class="title text_twoLine">{{ report.MicroAudio.AudioTitle }}</view>
- <view class="share">
- <view class="share-text" :style="[classifyColor(report.MicroAudio.AudioChartPermissionName)]">
- <image :src="classifyIcon(report.MicroAudio)"></image>
- 音频|{{ report.MicroAudio.AudioChartPermissionName }}
- </view>
- <button class="share-icon" open-type="share" :data-item="report">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/share-btn-icon.png"></image>
- </button>
- </view>
- </view>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="item-content-img" v-if="report.BodyHtml">
- <image :src="report.BodyHtml"></image>
- </view>
- <view class="item-content" v-else>{{ report.Body }}</view>
- <view class="line"></view>
- <text :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']">{{ report.Title }}</text>
- <view class="item-abstract text_twoLine" v-if="report.ExpertBackground">
- {{ report.ExpertBackground }}
- </view>
- <block v-if="report.Source == 1">
- <view class="item-createtime">
- <text>{{ report.PublishDate }}</text>
- <view class="item-examine" v-if="report.IsResearch">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
- <text>{{ report.Pv }}</text>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="item-createtime chart-tag">
- <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
- <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
- </view>
- <view class="chart-collect" v-if="topTabsActive == 3 && secondActive == 0">
- <text class="cancel" @click.stop="myChartIsTop(report.ChartId)">{{ report.IsTop ? "取消置顶" : "置顶" }}</text>
- <text class="remove" @click.stop="myChartCollect(report.ChartId)">移除</text>
- </view>
- <view class="my-chart-collect" v-if="topTabsActive == 3 && secondActive == 0 && report.IsTop"></view>
- </block>
- </block>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="pageNum > 1" />
- </block>
- <view class="nodata" v-else-if="haveData === false" style="padding-top: 400rpx">
- <block class="nodata" v-if="!isBindingMobile && secondActive == 0">
- <text>请先绑定联系方式</text>
- <view class="bind-mobile" @click="bindingMobile">绑定联系方式</view>
- </block>
- <block v-else>
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
- <text>{{ topTabsActive == 3 && secondActive == 0 ? "暂无收藏的图表" : "暂时没有数据" }}</text>
- </block>
- </view>
- <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
- <view v-if="showAudioBox">
- <audioModule :showAudioPop.sync="showAudioPop" />
- </view>
- <suspenButton v-if="wholeShowListData.IsShow" />
- <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
- </view>
- </template>
- <script>
- import { Home, Reports, Chart, activity } from "@/config/api.js";
- import { Throttle, deepCopy } from "@/config/util.js";
- import freeCharge from "@/components/freeCharge";
- import suspenButton from "@/components/suspen_button.vue";
- import { color_word_bg, MultimediaIcon } from "@/utils/styleClassify";
- import audioModule from "@/components/audioModule/index";
- import modalDialog from "@/components/modalDialog.vue";
- let app = getApp();
- export default {
- data() {
- return {
- topTabBars: [],
- topTabsActive: 1, //一级top的tabs
- secondActive: "", //二级的tabs
- secondBars: [], //二级的tabs数组
- chartChildren: [], //二级的tabs下的标签
- chartChildrenActive: 0,
- refresh: false,
- pageSize: 10, //条数
- pageNum: 1, //页码
- haveMore: true, //是否有更多数据
- haveData: null, //是否有数据
- //数据列表
- dataList: [],
- status: "loadmore",
- loadText: {
- loadmore: "上拉加载更多",
- loading: "加载中",
- nomore: "已经到底了",
- },
- showTransition: false, //点击绝密后的隐现
- isBindingMobile: true, //图表我的收藏是否绑定手机号
- videoContext: null,
- showAudioPop: false, //播放音频
- isShowhasPermission: false, // 联系销售的提交申请
- applyForIsShow: false, // 提交申请
- jurisdictionList: {},
- hasPermission: "", //权限
- audioShareId: "", //通过分享单个音频点进页面时使用
- videoShareId: "", //通过分享单个视频点进页面时使用
- videoAudioList: [], //音频 视频 list
- curVideoId: 0, //音频Id
- videoPlayTime: 0, //
- };
- },
- components: {
- freeCharge,
- suspenButton,
- modalDialog,
- audioModule,
- },
- watch: {},
- onLoad(optios) {
- this.getHeaderTab();
- uni.getSystemInfo({
- success: function (res) {
- if (res.windowWidth > 700) {
- uni.reLaunch({
- url: "/pages/pcWebViev/pcWebViev",
- });
- }
- },
- });
- if (optios.topTabsActive) {
- this.topTabsActive = optios.topTabsActive;
- this.secondActive = optios.secondActive;
- this.chartChildrenActive = optios.childrenActive;
- this.videoShareId = optios.videoShareId;
- this.audioShareId = optios.audioShareId;
- this.getTabs();
- }
- this.initNavBar();
- this.getReportList();
- this.$store.dispatch("checkHandle", "noGO");
- },
- onShow() {
- //进入页面的记录
- this.$store.dispatch("statistics", { PageType: "Activit" });
- // #ifdef MP-WEIXIN
- uni.hideHomeButton();
- // #endif
- this.$store.commit("audioBg/parseIntAudio", true);
- },
- computed: {
- curVoiceId() {
- //当前正在播放的音频id
- return this.$store.state.audioBg.indexId;
- },
- curAudioPaused() {
- //当前音频是否暂停状态
- return this.$store.state.audioBg.paused;
- },
- showAudioBox() {
- return this.$store.state.audioBg.parseIntShow;
- },
- },
- methods: {
- //获取胶囊位置
- initNavBar() {
- let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
- this.navBarStyle = {
- height: menuButtonInfo.height + menuButtonInfo.top + 8 + "px",
- paddingTop: menuButtonInfo.top - 4 + "px",
- paddingBottom: "4px",
- };
- },
- //点击顶部一级分类
- topTabsChange(item) {
- this.topTabsActive = item.Id;
- this.chartChildren = [];
- this.chartChildrenActive = 0;
- this.secondActive = "";
- this.pageNum = 1;
- this.dataList = [];
- this.audioShareId = "";
- this.videoShareId = "";
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 0,
- });
- if (this.topTabsActive == "2" || this.topTabsActive == "3") {
- this.getTabs();
- } else {
- this.initData();
- }
- },
- //点击顶部二级分类
- handleClickTopSub(item) {
- this.secondActive = item.ChartPermissionId;
- this.chartChildren = [];
- this.chartChildrenActive = 0;
- this.childrenChartData();
- this.initData();
- },
- //点击图标的二级分类 处理数据
- childrenChartData() {
- if (this.topTabsActive == 3 && this.secondActive != 0) {
- let arr = [];
- this.secondBars &&
- this.secondBars.forEach((item) => {
- if (this.secondActive == item.ChartPermissionId) {
- deepCopy(arr, item.List);
- arr.unshift({
- CtagId: 0,
- Name: "全部",
- });
- this.chartChildren = arr;
- }
- });
- this.chartChildrenActive > 0 ? "" : (this.chartChildrenActive = 0);
- }
- },
- //点击图标的三级分类
- handleChartChildren(item) {
- this.chartChildrenActive = item.CtagId;
- this.initData();
- },
- //点击
- initData() {
- this.pageNum = 1;
- this.dataList = [];
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 0,
- });
- this.getReportList();
- },
- /* 获取tab分类 */
- getTabs() {
- this.secondBars = [];
- this.topTabsActive == "2"
- ? Home.Tab().then((res) => {
- if (res.Ret === 200) {
- this.secondBars = res.Data.List;
- this.secondActive > 0 ? "" : (this.secondActive = this.secondBars[0].ChartPermissionId);
- this.getReportList();
- }
- })
- : this.topTabsActive == "3"
- ? Chart.getChartPatg().then((res) => {
- if (res.Ret === 200) {
- let arr = res.Data;
- arr.unshift({
- ChartPermissionId: 0,
- PermissionName: "我的收藏",
- });
- this.secondBars = arr;
- this.secondActive ? "" : (this.secondActive = 0);
- this.secondActive > 0 && this.childrenChartData();
- this.getReportList();
- }
- })
- : "";
- },
- /* 获取列表 */
- async getReportList() {
- if (this.topTabsActive == "3" && this.secondActive == 0) {
- const res = await Chart.getChartcollection({
- PageSize: this.pageSize,
- CurrentIndex: this.pageNum,
- });
- if (res.Ret === 200) {
- this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
- this.isBindingMobile = res.Data.IsBindingMobile;
- if (this.pageNum === 1) {
- this.dataList = res.Data.List || [];
- this.haveData = this.dataList.length > 0 ? true : false;
- } else {
- this.dataList = this.dataList.concat(res.Data.List);
- }
- }
- } else if (this.topTabsActive == 4) {
- const res = await Home.microRoadshowList({
- PageSize: this.pageSize,
- CurrentIndex: this.pageNum,
- AudioId: this.audioShareId,
- VideoId: this.videoShareId,
- });
- if (res.Ret === 200) {
- this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
- if (this.pageNum == 1) {
- this.videoAudioList = res.Data.List || [];
- this.haveData = this.videoAudioList.length > 0 ? true : false;
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- } else {
- this.videoAudioList = this.videoAudioList.concat(res.Data.List);
- }
- }
- } else {
- const res = await Home.getList({
- PageSize: this.pageSize,
- CurrentIndex: this.pageNum,
- ChartPermissionId: this.secondActive,
- CtagId: this.chartChildrenActive,
- ListType: this.topTabsActive,
- });
- if (res.Ret === 200) {
- this.processingData(res);
- }
- }
- },
- //处理数据
- processingData(res) {
- if (!res.Data.HaveResearch) {
- this.$util.modalShow("", "您暂无查看买方研选权限", "", () => {
- uni.reLaunch({
- url: "/pages/index/index",
- });
- });
- }
- this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
- res.Data.List &&
- res.Data.List.forEach((item) => {
- if (item.BodyHtml) {
- item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
- }
- });
- if (this.topTabsActive == "2") {
- if (this.pageNum === 1) {
- this.dataList = res.Data.List || [];
- this.haveData = this.dataList.length ? true : false;
- } else {
- this.dataList = this.dataList.concat(res.Data.List);
- }
- } else {
- if (this.pageNum === 1) {
- this.haveData = res.Data.List ? true : res.Data.ChartList ? true : false;
- }
- if (!res.Data.List) {
- this.dataList = this.dataList.concat(res.Data.ChartList);
- } else if (!res.Data.ChartList) {
- this.dataList = this.dataList.concat(res.Data.List);
- } else {
- this.dataList.push(res.Data.List.shift());
- let newArr = [];
- let newArrTwo = [];
- for (let i = 0; i < res.Data.List.length; i += 2) {
- newArr.push(res.Data.List.slice(i, i + 2));
- }
- for (let i = 0; i < res.Data.ChartList.length; i += 2) {
- newArrTwo.push(res.Data.ChartList.slice(i, i + 2));
- }
- let arr = [];
- newArr.forEach((item, index) => {
- if (newArrTwo[index]) {
- arr.push(newArrTwo[index], item);
- } else {
- arr.push(item);
- }
- });
- this.dataList = this.dataList.concat(arr.flat(Infinity));
- }
- }
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- },
- //我的收藏的删除
- myChartCollect(id) {
- uni.showModal({
- content: "确认要将该图表移除我的收藏吗?",
- confirmColor: "#3385FF",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await Chart.myChartCollect({
- ChartId: id,
- });
- if (res.Ret === 200) {
- this.initData();
- this.$util.toast("已取消收藏");
- }
- }
- },
- });
- },
- //我的收藏 置顶
- async myChartIsTop(id) {
- const res = await Chart.myChartTop({
- ChartId: id,
- });
- if (res.Ret === 200) {
- this.initData();
- this.$util.toast(res.Msg);
- }
- },
- /* 进入详情 校验是否有该品种权限 */
- goDetail(item) {
- if (item.HomeType !== 1) {
- if (item.Source == 2) {
- /* 无需授权且已绑定 检验是或否有权限 */
- this.$store.dispatch("checkHandle", "/pageMy/chartPage/chartPage?id=" + item.ChartId);
- } else {
- /* 无需授权且已绑定 检验是或否有权限 */
- this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
- }
- }
- },
- /* 搜索 */
- goSearch() {
- this.$store.dispatch("checkHandle", "/pages-search/indedxSearch/indedxSearch?isType=" + this.topTabsActive);
- },
- /* 绑定联系方式 */
- bindingMobile() {
- uni.navigateTo({
- url: "/pageMy/login/login",
- });
- },
- //视频播放结束
- handleVideoEnd() {
- // 此处因为如果不调用退出全屏方法 安卓和ios页面均会表现异常,安卓横屏不恢复竖屏,ios底部tabbar渲染异常
- this.videoContext.exitFullScreen();
- Home.microAideoHistoryAdd({ VideoId: this.curVideoId, PlaySeconds: Number(this.videoPlayTime) });
- setTimeout(() => {
- this.curVideoId = 0;
- this.videoContext = null;
- }, 200);
- },
- //播放的权限判断
- handelPlay(item) {
- let content_item = null;
- if (item.AudioActivityId) {
- content_item = {
- ActivityId: item.AudioActivityId,
- PlaySeconds: item.AudioPlaySeconds,
- ResourceUrl: item.AudioResourceUrl,
- Title: item.AudioTitle,
- Type: item.AudioType,
- };
- }
- if (!this.$store.state.isAuth && !this.$store.state.isBind) {
- if (item.AuthInfo.HasPermission == 1) {
- item.Type == 1 || item.AudioType == 1 ? this.audioPlayBack(content_item ? content_item : item) : this.handelVideoPlay(item);
- } else {
- this.hasPermission = item.AuthInfo.HasPermission;
- this.jurisdictionList.ActivityId = item.Id;
- this.jurisdictionList.isAudioVideo = item.Type;
- if (this.hasPermission == 2) {
- this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
- this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
- this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
- this.isShowhasPermission = true;
- } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
- this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
- this.applyForIsShow = true;
- }
- }
- } else {
- this.$store.dispatch("checkHandle");
- }
- },
- //视频的播放事件
- handelVideoPlay(item) {
- this.curVideoId = item.Id;
- this.videoPlayTime = item.PlaySeconds;
- this.globalBgAudioManager.stop();
- setTimeout(() => {
- this.videoContext = wx.createVideoContext(item.Id.toString());
- }, 300);
- Home.microAideoHistoryAdd({ VideoId: item.Id, PlaySeconds: 0 });
- },
- //音频的播放事件
- async audioPlayBack(item) {
- this.curVideoId = 0;
- this.videoContext && this.videoContext.stop;
- this.$store.commit("audioBg/parseIntAudio", true);
- // 判断是否为同一个音频
- if (this.$store.state.audioBg.indexId == item.ActivityId) {
- if (this.globalBgAudioManager.paused) {
- this.globalBgAudioManager.play();
- } else {
- this.globalBgAudioManager.pause();
- }
- } else {
- let VoiceList = {
- Url: item.ResourceUrl,
- Name: item.Title,
- PlaySeconds: item.PlaySeconds,
- };
- this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title });
- }
- this.showAudioPop = true;
- },
- //音视频的背景色 文字颜色
- classifyColor(item) {
- let text_color = color_word_bg.color_word.find((key) => key.name == item).color;
- let back_ground = color_word_bg.color_bg.find((key) => key.name == item).color;
- let _isColor = { color: text_color, "background-color": back_ground };
- return _isColor;
- },
- //音视频的图标
- classifyIcon(item) {
- let srcItem = MultimediaIcon.find((key) => key.name == (item.AudioChartPermissionName || item.ChartPermissionName));
- let imgSrc = item.Type == 1 || item.AudioType == 1 ? srcItem.audio : srcItem.video;
- return imgSrc;
- },
- //获取顶部导航
- async getHeaderTab() {
- const res = await Home.headerTab();
- if (res.Ret === 200) {
- this.topTabBars = res.Data || [];
- }
- },
- },
- onHide() {
- this.$store.commit("audioBg/parseIntAudio", false);
- this.curVideoId = 0;
- },
- mounted() {
- uni.$on("updateAudioVideo", (data) => {
- console.log("执行了");
- this.$store.dispatch("checkHandle", "noGO");
- this.getReportList();
- });
- },
- /* 下拉刷新 */
- onPullDownRefresh: Throttle(function () {
- this.audioShareId = "";
- this.videoShareId = "";
- this.status = "loadmore";
- this.refresh = true;
- this.dataList = [];
- this.pageNum = 1;
- this.getReportList();
- }),
- // 上拉加载
- onReachBottom: Throttle(function () {
- if (this.status === "nomore") return;
- this.status = "loading";
- this.pageNum++;
- this.getReportList();
- }),
- /** 用户点击分享*/
- onShareAppMessage: function ({ from, target }) {
- if (from === "button") {
- let item = target.dataset.item;
- let audio_id = item.Type == 1 || item.AudioType == 1 ? item.Id : "";
- let video_id = item.Type == 2 ? item.Id : "";
- console.log(item);
- let title_share = item.AudioTitle || item.Title;
- return {
- title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : title_share,
- path: "/pages/index/index?topTabsActive=4" + "&audioShareId=" + audio_id + "&videoShareId=" + video_id,
- imageUrl: item.AudioShareImg || item.ShareImg,
- };
- } else {
- return {
- title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "您手边的弘则研究素材检索库",
- path: "/pages/index/index?topTabsActive=" + this.topTabsActive + "&secondActive=" + this.secondActive + "&childrenActive=" + this.chartChildrenActive,
- imageUrl: this.topTabsActive == 1 ? "https://hzstatic.hzinsights.com/cygx/czbk/home_share.png" : "",
- success: (res) => {},
- fail: (err) => {},
- };
- }
- },
- };
- </script>
- <style lang="scss">
- .Index-container {
- background-color: #f7f7f7;
- font-size: 30rpx;
- .top-content-box {
- position: sticky;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 9;
- .top-tabs {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 34rpx;
- background-color: #fff;
- padding: 35rpx 0 10rpx;
- &::-webkit-scrollbar {
- width: 0;
- height: 0;
- display: none;
- }
- .item {
- position: relative;
- padding-bottom: 8rpx;
- margin-right: 60rpx;
- flex-shrink: 0;
- .limit-img {
- position: absolute;
- top: -15rpx;
- right: -50rpx;
- z-index: 99;
- }
- .active {
- position: absolute;
- left: 0;
- bottom: 0;
- height: 4rpx;
- width: 100%;
- border-radius: 1rpx;
- background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
- }
- }
- .tabs-active {
- color: #3385ff;
- font-weight: 500;
- }
- }
- }
- .nav-bar-wrap {
- background-color: #fff;
- width: 100%;
- padding-left: 35rpx;
- display: flex;
- align-items: center;
- .content {
- position: relative;
- display: flex;
- align-items: center;
- width: 70%;
- height: 63rpx;
- font-size: 30rpx;
- color: #8D8D8D;
- background-color: #f6f6f6;
- padding-left: 33rpx;
- border-radius: 70rpx;
- // border: 1rpx solid #e5e5e5;
- .sea_ipt {
- padding-left: 15rpx;
- }
- }
- }
- .tabs-content {
- padding: 0 30rpx;
- background-color: #fff;
- .children-ul {
- display: flex;
- flex-wrap: wrap;
- .children-active {
- background-color: #3385ff;
- color: #fff;
- }
- }
- .chart-children {
- padding: 10rpx 20rpx;
- margin: 0rpx 20rpx 20rpx 0;
- background-color: #f9f9f9;
- color: #666666;
- font-size: 26rpx;
- border-radius: 4rpx;
- }
- }
- .second-tabs {
- width: 100%;
- display: flex;
- overflow-x: auto;
- background-color: #fff;
- font-size: 30rpx;
- color: #999999;
- padding: 20rpx 0;
- &::-webkit-scrollbar {
- width: 0;
- height: 0;
- display: none;
- }
- .item {
- position: relative;
- padding-bottom: 16rpx;
- margin-right: 50rpx;
- flex-shrink: 0;
- .limit-img {
- position: absolute;
- top: -15rpx;
- right: -50rpx;
- z-index: 99;
- }
- .active {
- position: absolute;
- left: 0;
- bottom: 0;
- height: 4rpx;
- width: 100%;
- border-radius: 1rpx;
- background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
- }
- }
- .tabs-active {
- color: #3385ff;
- font-weight: 500;
- }
- }
- .data-cont {
- padding: 28rpx 20rpx 10rpx;
- display: flex;
- .report-ul {
- width: 50%;
- &:first-child {
- margin-right: 10rpx;
- }
- .report-item {
- padding: 20rpx 20rpx 24rpx 20rpx;
- margin-bottom: 20rpx;
- border-radius: 8rpx;
- box-shadow: 0 3rpx 6rpx rgba($color: #000000, $alpha: 0.16);
- background: #fff;
- position: relative;
- overflow: hidden;
- .audio-video-content {
- width: calc(100% + 40rpx);
- height: calc(100% + 25rpx);
- margin: -20rpx 0 0 -20rpx;
- padding: 0 !important;
- .audio-item {
- width: 100%;
- height: auto;
- box-shadow: none;
- }
- }
- .my-chart-collect {
- content: "";
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- width: 0;
- height: 0;
- border-top: 60rpx solid #3385ff;
- border-right: 60rpx solid transparent;
- }
- .item-content-img {
- display: flex;
- align-items: center;
- width: 330rpx;
- margin-left: -6rpx;
- margin-bottom: -20rpx;
- image {
- width: 100%;
- height: 262rpx;
- vertical-align: middle;
- }
- }
- .item-content {
- height: 273rpx;
- font-size: 24rpx;
- line-height: 40rpx;
- color: #7f7f7f;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 7;
- -webkit-box-orient: vertical;
- image {
- width: 100% !important;
- }
- }
- .line {
- margin: 18rpx 0;
- content: "";
- width: 100%;
- height: 1px;
- padding: 0 32rpx;
- box-sizing: border-box;
- background-color: #e5e5e5;
- -webkit-transform: scale(1, 0.5);
- transform: scale(1, 0.5);
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- }
- .item-title {
- font-size: 28rpx;
- color: #4a4a4a;
- margin-bottom: 10rpx;
- position: relative;
- text-indent: 0.5em;
- &::before {
- content: "";
- position: absolute;
- top: 5rpx;
- left: 0;
- width: 6rpx;
- height: 31rpx;
- background-color: #3385ff;
- }
- }
- .chart-title {
- height: 72rpx;
- padding-bottom: 10rpx;
- text-indent: 0em;
- &::before {
- display: none;
- }
- }
- .item-abstract {
- font-size: 26rpx;
- color: #6a6a6a;
- margin-bottom: 10rpx;
- .report_ico {
- width: 32rpx;
- height: 26rpx;
- margin-right: 20rpx;
- display: inline-block;
- }
- }
- .item-createtime {
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #acacac;
- font-size: 24rpx;
- .item-examine {
- display: flex;
- align-items: center;
- image {
- width: 30rpx;
- height: 24rpx;
- margin: 0 10rpx 0 15rpx;
- }
- }
- }
- .chart-tag {
- padding-top: 1rpx;
- height: 36rpx;
- .tag-item {
- width: 148rpx;
- border-radius: 28rpx;
- border: 2rpx solid rgba(49, 137, 255, 1);
- overflow: hidden;
- color: #3385ff;
- text-align: center;
- line-height: 30rpx;
- }
- }
- .chart-collect {
- margin-top: 20rpx;
- padding-top: 20rpx;
- padding: 20rpx 0 0 20rpx;
- border-top: 1rpx solid #dcdfe6;
- display: flex;
- align-items: center;
- .cancel {
- background: #3385ff;
- margin-right: 20rpx;
- color: #ffffff;
- }
- .remove {
- border: 1px solid #3385ff;
- color: #3385ff;
- }
- text {
- width: 130rpx;
- height: 46rpx;
- line-height: 46rpx;
- border-radius: 4rpx;
- text-align: center;
- font-size: 24rpx;
- }
- }
- }
- }
- }
- .content-intimate {
- position: fixed;
- display: flex;
- align-items: center;
- bottom: 96rpx;
- right: 41rpx;
- height: 156rpx;
- .content {
- width: 432rpx;
- height: 112rpx;
- background-color: #fff;
- display: flex;
- border-radius: 56rpx;
- overflow: hidden;
- .cont-border {
- margin: 0 2rpx;
- }
- view {
- flex: 1;
- background-color: #3385ff;
- font-size: 30rpx;
- color: #fff;
- padding-top: 15rpx;
- text-align: center;
- }
- }
- image {
- width: 156rpx;
- height: 100%;
- z-index: 99;
- }
- }
- .tabs-img {
- width: 46rpx;
- height: 26rpx;
- }
- .nodata {
- font-size: 40rpx;
- .bind-mobile {
- width: 244rpx;
- height: 58rpx;
- background: #3385ff;
- border-radius: 8rpx;
- font-size: 28rpx;
- line-height: 58rpx;
- text-align: center;
- color: #fff;
- margin: 50rpx auto;
- }
- }
- @import "@/components/audioVideo.scss";
- }
- </style>
|