1.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. <template>
  2. <view class="container Index-container">
  3. <view class="top-content-box">
  4. <view class="nav-bar-wrap" :style="{ height: navBarStyle.height, paddingTop: navBarStyle.paddingTop, paddingBottom: navBarStyle.paddingBottom }">
  5. <view class="content" @click="goSearch">
  6. <icon type="search" size="15" class="search_ico" />
  7. <text class="sea_ipt">{{ searchPlaceholderList.SummarySearch || "" }}</text>
  8. </view>
  9. </view>
  10. <view class="top-tabs">
  11. <block v-for="item in topTabBars" :key="item.Id">
  12. <view v-if="item.IsShow" :class="['item', item.val == topTabsActive && 'tabs-active']" @click="topTabsChange(item)">
  13. {{ item.Name }}
  14. <block v-if="(item.Id === 3 || item.Name == '图表') && wholeShowListData.IsShowChart">
  15. <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
  16. </block>
  17. <view class="active" v-if="item.Id == topTabsActive"></view>
  18. </view>
  19. </block>
  20. </view>
  21. <view class="tabs-content">
  22. <view class="second-tabs" v-if="topTabsActive == '2' || topTabsActive == '3'">
  23. <view :class="['item', item.ChartPermissionId == secondActive && 'tabs-active']" v-for="(item, index) in secondBars" :key="item.ChartPermissionId" @click="handleClickTopSub(item)">
  24. {{ item.PermissionName }}
  25. <block v-if="wholeShowListData.IsShowResearch && index === secondBars.length - 1 && topTabsActive == '2'">
  26. <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
  27. </block>
  28. <view class="active" v-if="item.ChartPermissionId == secondActive"></view>
  29. </view>
  30. </view>
  31. <block v-if="topTabsActive == '3'">
  32. <view class="children-ul">
  33. <view :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']" v-for="item in chartChildren" :key="item.CtagId" @click="handleChartChildren(item)">{{
  34. item.Name
  35. }}</view>
  36. </view>
  37. </block>
  38. <view v-if="topTabsActive == '4'" class="medium-ul">
  39. <view class="item-content">
  40. <view @click="mediumClickHandler(item)" :class="['item', mediumActive === item.value && 'item-act']" v-for="item in mediumSelect" :key="item.value">{{ item.name }}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <block v-if="haveData">
  46. <ChartItem :dataList="dataList" />
  47. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="pageNum > 1" />
  48. </block>
  49. <view class="nodata" v-else-if="haveData === false" style="padding-top: 400rpx">
  50. <block class="nodata" v-if="!isBindingMobile && secondActive == 0">
  51. <text>请先绑定联系方式</text>
  52. <view class="bind-mobile" @click="bindingMobile">绑定联系方式</view>
  53. </block>
  54. <block v-else>
  55. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  56. <text>{{ topTabsActive == 3 && secondActive == 0 ? "暂无收藏的图表" : "暂时没有数据" }}</text>
  57. </block>
  58. </view>
  59. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  60. <view v-if="showAudioBox">
  61. <audioModule :showAudioPop.sync="showAudioPop" />
  62. </view>
  63. <videoModule :showVideoPop="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
  64. <suspenButton :show.sync="wholeShowListData.IsShow" v-if="wholeShowListData.IsShow" />
  65. <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
  66. </view>
  67. </template>
  68. <script>
  69. import { Home, Reports, Chart, activity } from "@/config/api.js";
  70. import { Throttle, deepCopy } from "@/config/util.js";
  71. import freeCharge from "@/components/freeCharge";
  72. import suspenButton from "@/components/suspen_button.vue";
  73. import { color_word_bg, MultimediaIcon } from "@/utils/styleClassify";
  74. import audioModule from "@/components/audioModule/index";
  75. import modalDialog from "@/components/modalDialog.vue";
  76. import videoModule from "@/components/videoModule/index";
  77. import ChartItem from '@/components/ItemComponent/chartItem.vue';
  78. let app = getApp();
  79. export default {
  80. data() {
  81. return {
  82. topTabBars: [],
  83. topTabsActive: 1, //一级top的tabs
  84. secondActive: "", //二级的tabs
  85. secondBars: [], //二级的tabs数组
  86. chartChildren: [], //二级的tabs下的标签
  87. chartChildrenActive: 0,
  88. refresh: false,
  89. pageSize: 10, //条数
  90. pageNum: 1, //页码
  91. haveMore: true, //是否有更多数据
  92. haveData: null, //是否有数据
  93. //数据列表
  94. dataList: [],
  95. status: "loadmore",
  96. loadText: {
  97. loadmore: "上拉加载更多",
  98. loading: "加载中",
  99. nomore: "已经到底了",
  100. },
  101. showTransition: false, //点击绝密后的隐现
  102. isBindingMobile: true, //图表我的收藏是否绑定手机号
  103. videoContext: null,
  104. showAudioPop: false, //播放音频
  105. isShowhasPermission: false, // 联系销售的提交申请
  106. applyForIsShow: false, // 提交申请
  107. jurisdictionList: {},
  108. hasPermission: "", //权限
  109. audioShareId: "", //通过分享单个音频点进页面时使用
  110. videoShareId: "", //通过分享单个视频点进页面时使用
  111. activityShareId: "",
  112. videoAudioList: [], //音频 视频 list
  113. curVideoId: 0, //音频Id
  114. showVideoPop: false,
  115. videoPopList: {},
  116. mediumSelect: [
  117. { name: "全部", value: 0 },
  118. { name: "视频", value: 1 },
  119. { name: "音频", value: 2 },
  120. ],
  121. mediumActive: 0,
  122. };
  123. },
  124. components: {
  125. freeCharge,
  126. suspenButton,
  127. modalDialog,
  128. audioModule,
  129. videoModule,
  130. ChartItem,
  131. },
  132. watch: {},
  133. onLoad(optios) {
  134. this.getHeaderTab();
  135. uni.getSystemInfo({
  136. success: function (res) {
  137. if (res.windowWidth > 700) {
  138. uni.reLaunch({
  139. url: "/pages/pcWebViev/pcWebViev",
  140. });
  141. }
  142. },
  143. });
  144. if (optios.topTabsActive) {
  145. this.topTabsActive = optios.topTabsActive;
  146. this.secondActive = optios.secondActive;
  147. this.chartChildrenActive = optios.childrenActive;
  148. this.videoShareId = optios.videoShareId;
  149. this.audioShareId = optios.audioShareId;
  150. this.activityShareId = optios.activityId;
  151. console.log(this.activityShareId);
  152. this.getTabs();
  153. }
  154. this.initNavBar();
  155. this.getReportList();
  156. this.$store.dispatch("checkHandle", "noGO");
  157. },
  158. onShow() {
  159. //进入页面的记录
  160. this.$store.dispatch("statistics", { PageType: "Activit" });
  161. // #ifdef MP-WEIXIN
  162. uni.hideHomeButton();
  163. // #endif
  164. this.$store.commit("audioBg/parseIntAudio", true);
  165. },
  166. computed: {
  167. curVoiceId() {
  168. //当前正在播放的音频id
  169. return this.$store.state.audioBg.indexId;
  170. },
  171. curAudioPaused() {
  172. //当前音频是否暂停状态
  173. return this.$store.state.audioBg.paused;
  174. },
  175. showAudioBox() {
  176. return this.$store.state.audioBg.parseIntShow;
  177. },
  178. },
  179. methods: {
  180. //获取胶囊位置
  181. initNavBar() {
  182. let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
  183. this.navBarStyle = {
  184. height: menuButtonInfo.height + menuButtonInfo.top + 8 + "px",
  185. paddingTop: menuButtonInfo.top - 4 + "px",
  186. paddingBottom: "4px",
  187. };
  188. },
  189. //点击顶部一级分类
  190. topTabsChange(item) {
  191. this.topTabsActive = item.Id;
  192. this.chartChildren = [];
  193. this.chartChildrenActive = 0;
  194. this.secondActive = "";
  195. this.pageNum = 1;
  196. this.dataList = [];
  197. this.audioShareId = "";
  198. this.videoShareId = "";
  199. uni.pageScrollTo({
  200. scrollTop: 0,
  201. duration: 0,
  202. });
  203. if (this.topTabsActive == "2" || this.topTabsActive == "3") {
  204. this.getTabs();
  205. } else {
  206. this.initData();
  207. }
  208. },
  209. //点击顶部二级分类
  210. handleClickTopSub(item) {
  211. this.secondActive = item.ChartPermissionId;
  212. this.chartChildren = [];
  213. this.chartChildrenActive = 0;
  214. this.childrenChartData();
  215. this.initData();
  216. },
  217. //点击图标的二级分类 处理数据
  218. childrenChartData() {
  219. if (this.topTabsActive == 3 && this.secondActive != 0) {
  220. let arr = [];
  221. this.secondBars &&
  222. this.secondBars.forEach((item) => {
  223. if (this.secondActive == item.ChartPermissionId) {
  224. deepCopy(arr, item.List);
  225. arr.unshift({
  226. CtagId: 0,
  227. Name: "全部",
  228. });
  229. this.chartChildren = arr;
  230. }
  231. });
  232. this.chartChildrenActive > 0 ? "" : (this.chartChildrenActive = 0);
  233. }
  234. },
  235. //点击图标的三级分类
  236. handleChartChildren(item) {
  237. this.chartChildrenActive = item.CtagId;
  238. this.initData();
  239. },
  240. // 点击为路演的筛选
  241. mediumClickHandler(item) {
  242. this.mediumActive = item.value;
  243. this.initData();
  244. },
  245. //点击
  246. initData() {
  247. this.pageNum = 1;
  248. this.dataList = [];
  249. uni.pageScrollTo({
  250. scrollTop: 0,
  251. duration: 0,
  252. });
  253. this.getReportList();
  254. },
  255. /* 获取tab分类 */
  256. getTabs() {
  257. this.secondBars = [];
  258. this.topTabsActive == "2"
  259. ? Home.Tab().then((res) => {
  260. if (res.Ret === 200) {
  261. this.secondBars = res.Data.List;
  262. this.secondActive > 0 ? "" : (this.secondActive = this.secondBars[0].ChartPermissionId);
  263. this.getReportList();
  264. }
  265. })
  266. : this.topTabsActive == "3"
  267. ? Chart.getChartPatg().then((res) => {
  268. if (res.Ret === 200) {
  269. let arr = res.Data;
  270. arr.unshift({
  271. ChartPermissionId: 0,
  272. PermissionName: "我的收藏",
  273. });
  274. this.secondBars = arr;
  275. this.secondActive ? "" : (this.secondActive = 0);
  276. this.secondActive > 0 && this.childrenChartData();
  277. this.getReportList();
  278. }
  279. })
  280. : "";
  281. },
  282. /* 获取列表 */
  283. async getReportList() {
  284. if (this.topTabsActive == "3" && this.secondActive == 0) {
  285. const res = await Chart.getChartcollection({
  286. PageSize: this.pageSize,
  287. CurrentIndex: this.pageNum,
  288. });
  289. if (res.Ret === 200) {
  290. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  291. this.isBindingMobile = res.Data.IsBindingMobile;
  292. if (this.pageNum === 1) {
  293. this.dataList = res.Data.List || [];
  294. this.haveData = this.dataList.length > 0 ? true : false;
  295. } else {
  296. this.dataList = this.dataList.concat(res.Data.List);
  297. }
  298. }
  299. } else if (this.topTabsActive == 4) {
  300. const res = await Home.microRoadshowList({
  301. PageSize: this.pageSize,
  302. CurrentIndex: this.pageNum,
  303. AudioId: this.audioShareId,
  304. VideoId: this.activityShareId ? "" : this.videoShareId,
  305. ActivityVideoId: this.activityShareId && this.videoShareId,
  306. Filter: this.mediumActive,
  307. });
  308. if (res.Ret === 200) {
  309. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  310. if (this.pageNum == 1) {
  311. this.videoAudioList = res.Data.List || [];
  312. this.haveData = this.videoAudioList.length > 0 ? true : false;
  313. if (this.refresh) {
  314. uni.stopPullDownRefresh();
  315. this.refresh = false;
  316. }
  317. } else {
  318. this.videoAudioList = this.videoAudioList.concat(res.Data.List);
  319. }
  320. }
  321. } else {
  322. const res = await Home.getList({
  323. PageSize: this.pageSize,
  324. CurrentIndex: this.pageNum,
  325. ChartPermissionId: this.secondActive,
  326. CtagId: this.chartChildrenActive,
  327. ListType: this.topTabsActive,
  328. });
  329. if (res.Ret === 200) {
  330. this.processingData(res);
  331. }
  332. }
  333. },
  334. //处理数据
  335. processingData(res) {
  336. if (!res.Data.HaveResearch) {
  337. this.$util.modalShow("", "您暂无查看买方研选权限", "", () => {
  338. uni.reLaunch({
  339. url: "/pages/index/index",
  340. });
  341. });
  342. }
  343. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  344. res.Data.List &&
  345. res.Data.List.forEach((item) => {
  346. if (item.BodyHtml) {
  347. item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
  348. }
  349. });
  350. if (this.topTabsActive == "2") {
  351. if (this.pageNum === 1) {
  352. this.dataList = res.Data.List || [];
  353. this.haveData = this.dataList.length ? true : false;
  354. } else {
  355. this.dataList = this.dataList.concat(res.Data.List);
  356. }
  357. } else {
  358. if (this.pageNum === 1) {
  359. this.haveData = res.Data.List ? true : res.Data.ChartList ? true : false;
  360. }
  361. if (!res.Data.List) {
  362. this.dataList = this.dataList.concat(res.Data.ChartList);
  363. } else if (!res.Data.ChartList) {
  364. this.dataList = this.dataList.concat(res.Data.List);
  365. } else {
  366. this.dataList.push(res.Data.List.shift());
  367. let newArr = [];
  368. let newArrTwo = [];
  369. for (let i = 0; i < res.Data.List.length; i += 2) {
  370. newArr.push(res.Data.List.slice(i, i + 2));
  371. }
  372. for (let i = 0; i < res.Data.ChartList.length; i += 2) {
  373. newArrTwo.push(res.Data.ChartList.slice(i, i + 2));
  374. }
  375. let arr = [];
  376. newArr.forEach((item, index) => {
  377. if (newArrTwo[index]) {
  378. arr.push(newArrTwo[index], item);
  379. } else {
  380. arr.push(item);
  381. }
  382. });
  383. this.dataList = this.dataList.concat(arr.flat(Infinity));
  384. }
  385. }
  386. if (this.refresh) {
  387. uni.stopPullDownRefresh();
  388. this.refresh = false;
  389. }
  390. },
  391. //我的收藏的删除
  392. myChartCollect(id) {
  393. uni.showModal({
  394. content: "确认要将该图表移除我的收藏吗?",
  395. confirmColor: "#3385FF",
  396. cancelColor: "#606266",
  397. success: async (res) => {
  398. if (res.confirm) {
  399. const res = await Chart.myChartCollect({
  400. ChartId: id,
  401. });
  402. if (res.Ret === 200) {
  403. this.initData();
  404. this.$util.toast("已取消收藏");
  405. }
  406. }
  407. },
  408. });
  409. },
  410. //我的收藏 置顶
  411. async myChartIsTop(id) {
  412. const res = await Chart.myChartTop({
  413. ChartId: id,
  414. });
  415. if (res.Ret === 200) {
  416. this.initData();
  417. this.$util.toast(res.Msg);
  418. }
  419. },
  420. /* 进入详情 校验是否有该品种权限 */
  421. goDetail(item) {
  422. if (item.HomeType !== 1) {
  423. if (item.Source == 2) {
  424. /* 无需授权且已绑定 检验是或否有权限 */
  425. this.$store.dispatch("checkHandle", "/pageMy/chartPage/chartPage?id=" + item.ChartId);
  426. } else {
  427. /* 无需授权且已绑定 检验是或否有权限 */
  428. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
  429. }
  430. }
  431. },
  432. /* 搜索 */
  433. goSearch() {
  434. this.$store.dispatch("checkHandle", "/pages-search/indedxSearch/indedxSearch?isType=" + this.topTabsActive);
  435. },
  436. /* 绑定联系方式 */
  437. bindingMobile() {
  438. uni.navigateTo({
  439. url: "/pageMy/login/login",
  440. });
  441. },
  442. //播放的权限判断
  443. handelPlay(item) {
  444. let content_item = null;
  445. if (item.AudioActivityId) {
  446. content_item = {
  447. ActivityId: item.AudioActivityId,
  448. PlaySeconds: item.AudioPlaySeconds,
  449. ResourceUrl: item.AudioResourceUrl,
  450. Title: item.AudioTitle,
  451. Type: item.AudioType,
  452. };
  453. }
  454. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  455. if (item.AuthInfo.HasPermission == 1) {
  456. item.Type == 1 || item.AudioType == 1 ? this.audioPlayBack(content_item ? content_item : item) : this.handelVideoPlay(item);
  457. } else {
  458. this.hasPermission = item.AuthInfo.HasPermission;
  459. this.jurisdictionList.ActivityId = item.Id;
  460. this.jurisdictionList.isAudioVideo = item.Type;
  461. if (this.hasPermission == 2) {
  462. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  463. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  464. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  465. this.isShowhasPermission = true;
  466. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  467. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  468. this.applyForIsShow = true;
  469. }
  470. }
  471. } else {
  472. this.$store.dispatch("checkHandle");
  473. }
  474. },
  475. //视频的播放事件
  476. handelVideoPlay(item) {
  477. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  478. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  479. console.log(this.$store.state.videoPlay.palyCurrentTime);
  480. this.$store.commit("videoPlay/playVideo", item.Id);
  481. }
  482. this.globalBgAudioManager.stop();
  483. this.videoPopList = item;
  484. this.showVideoPop = true;
  485. },
  486. //音频的播放事件
  487. async audioPlayBack(item) {
  488. console.log(item);
  489. this.curVideoId = 0;
  490. this.$store.commit("audioBg/parseIntAudio", true);
  491. // 判断是否为同一个音频
  492. if (this.$store.state.audioBg.indexId == item.ActivityId) {
  493. if (this.globalBgAudioManager.paused) {
  494. this.globalBgAudioManager.play();
  495. } else {
  496. this.globalBgAudioManager.pause();
  497. }
  498. } else {
  499. let VoiceList = {
  500. Url: item.ResourceUrl,
  501. Name: item.Title,
  502. PlaySeconds: item.PlaySeconds,
  503. };
  504. this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title });
  505. }
  506. this.showAudioPop = true;
  507. },
  508. //音视频的背景色 文字颜色
  509. classifyColor(item) {
  510. let text_color = color_word_bg.color_word.find((key) => key.name == item).color;
  511. let back_ground = color_word_bg.color_bg.find((key) => key.name == item).color;
  512. let _isColor = { color: text_color, "background-color": back_ground };
  513. return _isColor;
  514. },
  515. //音视频的图标
  516. classifyIcon(item) {
  517. let srcItem = MultimediaIcon.find((key) => key.name == (item.AudioChartPermissionName || item.ChartPermissionName));
  518. let imgSrc = item.Type == 1 || item.AudioType == 1 ? srcItem.audio : srcItem.video;
  519. return imgSrc;
  520. },
  521. //获取顶部导航
  522. async getHeaderTab() {
  523. const res = await Home.headerTab();
  524. if (res.Ret === 200) {
  525. this.topTabBars = res.Data || [];
  526. }
  527. },
  528. // 微路演留言
  529. myLeavingMessageHandler(item) {
  530. uni.navigateTo({
  531. url: "/activityPages/generationAsk/generationAsk?id=" + (item.Type == 3 ? item.Id : item.ActivityId) + "&type=文章&roadshow=" + item.Type + "&roadshowTitle=" + item.Title,
  532. });
  533. },
  534. // 微路演收藏
  535. async isCollectionHandeler(item) {
  536. const res = await Home.microRoadshowCollect({
  537. Id: item.Id,
  538. SourceType: item.Type,
  539. });
  540. if (res.Ret === 200) {
  541. res.Data.Status == 1 ? (item.IsCollect = true) : (item.IsCollect = false);
  542. uni.showToast({
  543. title: res.Msg,
  544. duration: 2000,
  545. });
  546. }
  547. },
  548. },
  549. onHide() {
  550. this.$store.commit("audioBg/parseIntAudio", false);
  551. this.curVideoId = 0;
  552. },
  553. mounted() {
  554. uni.$on("updateAudioVideo", (data) => {
  555. console.log("执行了");
  556. this.$store.dispatch("checkHandle", "noGO");
  557. this.getReportList();
  558. });
  559. },
  560. /* 下拉刷新 */
  561. onPullDownRefresh: Throttle(function () {
  562. this.audioShareId = "";
  563. this.videoShareId = "";
  564. this.activityShareId = "";
  565. this.status = "loadmore";
  566. this.refresh = true;
  567. this.dataList = [];
  568. this.pageNum = 1;
  569. this.getReportList();
  570. }),
  571. // 上拉加载
  572. onReachBottom: Throttle(function () {
  573. if (this.status === "nomore") return;
  574. this.status = "loading";
  575. this.pageNum++;
  576. this.getReportList();
  577. }),
  578. /** 用户点击分享*/
  579. onShareAppMessage: function ({ from, target }) {
  580. if (from === "button") {
  581. let item = target.dataset.item;
  582. let audio_id = item.Type == 1 || item.AudioType == 1 ? item.Id : "";
  583. // type=2 -- 活动视频 type=3 -- 产业视频
  584. let video_id = item.Type == 2 || item.Type == 3 ? item.Id : "";
  585. let activity_id = item.Type == 2 && item.ActivityId > 0 ? item.ActivityId : "";
  586. let title_share = item.AudioTitle || item.Title;
  587. return {
  588. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : title_share,
  589. path: "/pages/index/index?topTabsActive=4" + "&audioShareId=" + audio_id + "&videoShareId=" + video_id + "&activityId=" + activity_id,
  590. imageUrl: item.AudioShareImg || item.ShareImg,
  591. };
  592. } else {
  593. return {
  594. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "您手边的弘则研究素材检索库",
  595. path: "/pages/index/index?topTabsActive=" + this.topTabsActive + "&secondActive=" + this.secondActive + "&childrenActive=" + this.chartChildrenActive,
  596. imageUrl: this.topTabsActive == 1 ? "https://hzstatic.hzinsights.com/cygx/czbk/home_share.png" : "",
  597. success: (res) => {},
  598. fail: (err) => {},
  599. };
  600. }
  601. },
  602. };
  603. </script>
  604. <style lang="scss">
  605. .Index-container {
  606. background-color: #f7f7f7;
  607. font-size: 30rpx;
  608. .top-content-box {
  609. position: sticky;
  610. top: 0;
  611. left: 0;
  612. width: 100%;
  613. z-index: 9;
  614. .top-tabs {
  615. width: 100%;
  616. display: flex;
  617. align-items: center;
  618. justify-content: center;
  619. font-size: 34rpx;
  620. background-color: #fff;
  621. padding: 35rpx 0 10rpx;
  622. &::-webkit-scrollbar {
  623. width: 0;
  624. height: 0;
  625. display: none;
  626. }
  627. .item {
  628. position: relative;
  629. padding-bottom: 8rpx;
  630. margin-right: 60rpx;
  631. flex-shrink: 0;
  632. .limit-img {
  633. position: absolute;
  634. top: -15rpx;
  635. right: -50rpx;
  636. z-index: 99;
  637. }
  638. .active {
  639. position: absolute;
  640. left: 0;
  641. bottom: 0;
  642. height: 4rpx;
  643. width: 100%;
  644. border-radius: 1rpx;
  645. background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
  646. }
  647. }
  648. .tabs-active {
  649. color: #3385ff;
  650. font-weight: 500;
  651. }
  652. }
  653. }
  654. .nav-bar-wrap {
  655. background-color: #fff;
  656. width: 100%;
  657. padding-left: 35rpx;
  658. display: flex;
  659. align-items: center;
  660. .content {
  661. position: relative;
  662. display: flex;
  663. align-items: center;
  664. width: 70%;
  665. height: 63rpx;
  666. font-size: 30rpx;
  667. color: #8d8d8d;
  668. background-color: #f3f3f3;
  669. padding-left: 33rpx;
  670. border-radius: 70rpx;
  671. // border: 1rpx solid #e5e5e5;
  672. .sea_ipt {
  673. padding-left: 15rpx;
  674. }
  675. }
  676. }
  677. .tabs-content {
  678. padding: 0 30rpx;
  679. background-color: #fff;
  680. .children-ul {
  681. display: flex;
  682. flex-wrap: wrap;
  683. .children-active {
  684. background-color: #3385ff;
  685. color: #fff;
  686. }
  687. }
  688. .medium-ul {
  689. display: flex;
  690. justify-content: flex-end;
  691. padding: 10px 0;
  692. .item-content {
  693. display: flex;
  694. height: 51rpx;
  695. background: #f8f8fa;
  696. width: 345rpx;
  697. border-radius: 64rpx;
  698. color: #999999;
  699. }
  700. .item {
  701. display: flex;
  702. align-items: center;
  703. justify-content: center;
  704. width: 115rpx;
  705. height: 51rpx;
  706. border-radius: 47rpx;
  707. }
  708. .item-act {
  709. background-color: #3385ff;
  710. color: #fff;
  711. }
  712. }
  713. .chart-children {
  714. padding: 10rpx 20rpx;
  715. margin: 0rpx 20rpx 20rpx 0;
  716. background-color: #f9f9f9;
  717. color: #666666;
  718. font-size: 26rpx;
  719. border-radius: 4rpx;
  720. }
  721. }
  722. .second-tabs {
  723. width: 100%;
  724. display: flex;
  725. overflow-x: auto;
  726. background-color: #fff;
  727. font-size: 30rpx;
  728. color: #999999;
  729. padding: 20rpx 0;
  730. &::-webkit-scrollbar {
  731. width: 0;
  732. height: 0;
  733. display: none;
  734. }
  735. .item {
  736. position: relative;
  737. padding-bottom: 16rpx;
  738. margin-right: 50rpx;
  739. flex-shrink: 0;
  740. .limit-img {
  741. position: absolute;
  742. top: -15rpx;
  743. right: -50rpx;
  744. z-index: 99;
  745. }
  746. .active {
  747. position: absolute;
  748. left: 0;
  749. bottom: 0;
  750. height: 4rpx;
  751. width: 100%;
  752. border-radius: 1rpx;
  753. background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
  754. }
  755. }
  756. .tabs-active {
  757. color: #3385ff;
  758. font-weight: 500;
  759. }
  760. }
  761. .data-cont {
  762. padding: 28rpx 20rpx 10rpx;
  763. display: flex;
  764. .report-ul {
  765. width: 50%;
  766. &:first-child {
  767. margin-right: 10rpx;
  768. }
  769. .report-item {
  770. padding: 20rpx 20rpx 24rpx 20rpx;
  771. margin-bottom: 20rpx;
  772. border-radius: 8rpx;
  773. box-shadow: 0 3rpx 6rpx rgba($color: #000000, $alpha: 0.16);
  774. background: #fff;
  775. position: relative;
  776. overflow: hidden;
  777. .audio-video-content {
  778. width: calc(100% + 40rpx);
  779. height: calc(100% + 25rpx);
  780. margin: -20rpx 0 0 -20rpx;
  781. padding: 0 !important;
  782. .audio-item {
  783. width: 100%;
  784. height: auto;
  785. box-shadow: none;
  786. }
  787. }
  788. .my-chart-collect {
  789. content: "";
  790. display: block;
  791. position: absolute;
  792. top: 0;
  793. left: 0;
  794. width: 0;
  795. height: 0;
  796. border-top: 60rpx solid #3385ff;
  797. border-right: 60rpx solid transparent;
  798. }
  799. .item-content-img {
  800. display: flex;
  801. align-items: center;
  802. width: 330rpx;
  803. margin-left: -6rpx;
  804. margin-bottom: -20rpx;
  805. image {
  806. width: 100%;
  807. height: 262rpx;
  808. vertical-align: middle;
  809. }
  810. }
  811. .item-content {
  812. height: 273rpx;
  813. font-size: 24rpx;
  814. line-height: 40rpx;
  815. color: #7f7f7f;
  816. overflow: hidden;
  817. text-overflow: ellipsis;
  818. display: -webkit-box;
  819. -webkit-line-clamp: 7;
  820. -webkit-box-orient: vertical;
  821. image {
  822. width: 100% !important;
  823. }
  824. }
  825. .line {
  826. margin: 18rpx 0;
  827. content: "";
  828. width: 100%;
  829. height: 1px;
  830. padding: 0 32rpx;
  831. box-sizing: border-box;
  832. background-color: #e5e5e5;
  833. -webkit-transform: scale(1, 0.5);
  834. transform: scale(1, 0.5);
  835. -webkit-transform-origin: center bottom;
  836. transform-origin: center bottom;
  837. }
  838. .item-title {
  839. font-size: 28rpx;
  840. color: #4a4a4a;
  841. margin-bottom: 10rpx;
  842. position: relative;
  843. text-indent: 0.5em;
  844. &::before {
  845. content: "";
  846. position: absolute;
  847. top: 5rpx;
  848. left: 0;
  849. width: 6rpx;
  850. height: 31rpx;
  851. background-color: #3385ff;
  852. }
  853. }
  854. .chart-title {
  855. height: 72rpx;
  856. padding-bottom: 10rpx;
  857. text-indent: 0em;
  858. &::before {
  859. display: none;
  860. }
  861. }
  862. .item-abstract {
  863. font-size: 26rpx;
  864. color: #6a6a6a;
  865. margin-bottom: 10rpx;
  866. .report_ico {
  867. width: 32rpx;
  868. height: 26rpx;
  869. margin-right: 20rpx;
  870. display: inline-block;
  871. }
  872. }
  873. .item-createtime {
  874. display: flex;
  875. align-items: center;
  876. justify-content: space-between;
  877. color: #acacac;
  878. font-size: 24rpx;
  879. .item-examine {
  880. display: flex;
  881. align-items: center;
  882. image {
  883. width: 30rpx;
  884. height: 24rpx;
  885. margin: 0 10rpx 0 15rpx;
  886. }
  887. }
  888. }
  889. .chart-tag {
  890. padding-top: 1rpx;
  891. height: 36rpx;
  892. .tag-item {
  893. width: 148rpx;
  894. border-radius: 28rpx;
  895. border: 2rpx solid rgba(49, 137, 255, 1);
  896. overflow: hidden;
  897. color: #3385ff;
  898. text-align: center;
  899. line-height: 30rpx;
  900. }
  901. }
  902. .chart-collect {
  903. margin-top: 20rpx;
  904. padding-top: 20rpx;
  905. padding: 20rpx 0 0 20rpx;
  906. border-top: 1rpx solid #dcdfe6;
  907. display: flex;
  908. align-items: center;
  909. .cancel {
  910. background: #3385ff;
  911. margin-right: 20rpx;
  912. color: #ffffff;
  913. }
  914. .remove {
  915. border: 1px solid #3385ff;
  916. color: #3385ff;
  917. }
  918. text {
  919. width: 130rpx;
  920. height: 46rpx;
  921. line-height: 46rpx;
  922. border-radius: 4rpx;
  923. text-align: center;
  924. font-size: 24rpx;
  925. }
  926. }
  927. }
  928. }
  929. }
  930. .content-intimate {
  931. position: fixed;
  932. display: flex;
  933. align-items: center;
  934. bottom: 96rpx;
  935. right: 41rpx;
  936. height: 156rpx;
  937. .content {
  938. width: 432rpx;
  939. height: 112rpx;
  940. background-color: #fff;
  941. display: flex;
  942. border-radius: 56rpx;
  943. overflow: hidden;
  944. .cont-border {
  945. margin: 0 2rpx;
  946. }
  947. view {
  948. flex: 1;
  949. background-color: #3385ff;
  950. font-size: 30rpx;
  951. color: #fff;
  952. padding-top: 15rpx;
  953. text-align: center;
  954. }
  955. }
  956. image {
  957. width: 156rpx;
  958. height: 100%;
  959. z-index: 99;
  960. }
  961. }
  962. .tabs-img {
  963. width: 46rpx;
  964. height: 26rpx;
  965. }
  966. .nodata {
  967. font-size: 40rpx;
  968. .bind-mobile {
  969. width: 244rpx;
  970. height: 58rpx;
  971. background: #3385ff;
  972. border-radius: 8rpx;
  973. font-size: 28rpx;
  974. line-height: 58rpx;
  975. text-align: center;
  976. color: #fff;
  977. margin: 50rpx auto;
  978. }
  979. }
  980. @import "@/components/audioVideo.scss";
  981. }
  982. </style>