reportSecretDetail.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <template>
  2. <view class="container content-secret forbid-copy">
  3. <block v-if="hasPermission == 1 || !hasPermission">
  4. <view class="container-top" v-if="detali">
  5. <view class="content-title">
  6. {{ detali.Title }}
  7. </view>
  8. <view class="content-time">
  9. <text>{{ detali.Department }}</text>
  10. <text>{{ detali.PublishDate }}</text>
  11. </view>
  12. <view class="content-statement">
  13. <text>注:请务必阅读</text>
  14. <text class="statement" @click="isShowStatement = true">免责声明 </text>
  15. </view>
  16. <view class="content-audio">
  17. <view class="audio-img">
  18. <image
  19. @click.stop="audioPlayBack"
  20. class=""
  21. :src="
  22. curVoiceId === detali.ArticleId && !curAudioPaused
  23. ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/suspend_icon.png'
  24. : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/play_icon.png'
  25. "
  26. ></image>
  27. </view>
  28. <view class="audio-title">
  29. <text>{{ detali.VideoName }}</text>
  30. <text>{{ detali.VideoPlaySeconds }}</text>
  31. </view>
  32. </view>
  33. <view v-if="detali.Abstract" class="content-abstract">
  34. <text>摘要:</text>
  35. <text>
  36. {{ detali.Abstract }}
  37. </text>
  38. </view>
  39. <view v-if="detali.ProductDescription && isType == 1" class="content-abstract">
  40. <text>产品说明:</text>
  41. <text>
  42. {{ detali.ProductDescription }}
  43. </text>
  44. </view>
  45. <view v-if="detali.UpdateDescription && isType == 1" class="content-abstract">
  46. <text>变更说明:</text>
  47. <text>
  48. {{ detali.UpdateDescription }}
  49. </text>
  50. </view>
  51. <view v-if="detali.FocusOn && isType == 1" class="content-focuson">
  52. <text class="focuson">近期重点关注方向:</text>
  53. <mp-html :content="detali.FocusOn" />
  54. </view>
  55. </view>
  56. <view class="container-text">
  57. <researchSummary v-if="isType == 1" :dataList="dataList" />
  58. <reportChoiceness v-if="isType == 2 || isType == 3" :dataListResearch="dataListResearch" />
  59. </view>
  60. <statement :show="isShowStatement" />
  61. </block>
  62. <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
  63. <block v-if="!isShowAlert">
  64. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  65. <block>
  66. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  67. <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
  68. </block>
  69. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  70. </block>
  71. <block v-else>
  72. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  73. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  74. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  75. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  76. </block>
  77. </view>
  78. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  79. <audioModule :showAudioPop="false" />
  80. </view>
  81. </template>
  82. <script>
  83. import statement from "@/reportPages/components/statement.vue";
  84. import researchSummary from "./components/researchSummary.vue";
  85. import reportChoiceness from "./components/reportChoiceness.vue";
  86. import audioModule from "@/components/audioModule/index";
  87. import freeCharge from "@/components/freeCharge";
  88. import { Reports, FreeButton } from "@/config/api.js";
  89. let app = getApp({ allowDefault: true });
  90. export default {
  91. data() {
  92. return {
  93. isShowStatement: false,
  94. isPlay: false,
  95. audioContext: "", //音频
  96. isType: "", //类型
  97. id: "", //
  98. detali: "", //详情
  99. dataList: [], //精选,上周 数组
  100. dataListResearch: [], //本周数组
  101. hasPermission: "", //权限判断
  102. videoUrl: "",
  103. isShowAlert: false,
  104. };
  105. },
  106. computed: {
  107. curVoiceId() {
  108. //当前正在播放的音频id
  109. return this.$store.state.audioBg.reportId;
  110. },
  111. curAudioPaused() {
  112. //当前音频是否暂停状态
  113. return this.$store.state.audioBg.paused;
  114. },
  115. },
  116. methods: {
  117. //音频点击暂停播放
  118. audioPlayBack() {
  119. let list = { Url: this.detali.VideoUrl, Name: this.detali.Title, PlaySeconds: this.detali.VideoPlaySeconds };
  120. if (this.globalBgAudioManager.src) {
  121. if (this.$store.state.audioBg.reportId == this.detali.ArticleId) {
  122. if (this.globalBgAudioManager.paused) {
  123. this.globalBgAudioManager.play();
  124. } else {
  125. this.globalBgAudioManager.pause();
  126. }
  127. } else {
  128. this.$store.commit("audioBg/addAudio", { list, reportId: this.detali.ArticleId });
  129. }
  130. } else {
  131. this.$store.commit("audioBg/removeAudio");
  132. this.$store.commit("audioBg/addAudio", { list, reportId: this.detali.ArticleId });
  133. }
  134. },
  135. //获取数据详情
  136. async getDetilaiList() {
  137. const res =
  138. this.isType == 1
  139. ? await Reports.reportSelectionDetail({
  140. ArticleId: this.id,
  141. })
  142. : this.isType == 3
  143. ? await Reports.minutesSummaryDetail({
  144. ArticleId: this.id,
  145. })
  146. : await Reports.researchSummaryDetail({
  147. ArticleId: this.id,
  148. });
  149. if (res.Ret === 200) {
  150. this.detali = res.Data.Detail;
  151. this.hasPermission = res.Data.HasPermission;
  152. this.videoUrl = res.Data.Detail.VideoUrl;
  153. this.isType == 1 ? (this.dataList = res.Data.List || []) : (this.dataListResearch = res.Data.List || []);
  154. if (this.globalBgAudioManager.src === this.videoUrl && this.globalBgAudioManager.paused === false) {
  155. this.isPlay = true;
  156. }
  157. }
  158. },
  159. /* 无权限申请开通权限 */
  160. applyAuth() {
  161. this.hasPermission === 4
  162. ? uni.navigateTo({
  163. url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
  164. })
  165. : uni.showModal({
  166. title: "",
  167. content: "您已经提交过申请了,请耐心等待",
  168. showCancel: false,
  169. confirmColor: "#365595",
  170. success: function (res) {
  171. uni.navigateBack({
  172. fail() {
  173. uni.switchTab({
  174. url: "/pages/index/index",
  175. });
  176. },
  177. });
  178. },
  179. });
  180. },
  181. // 返回首頁
  182. backIndex() {
  183. uni.switchTab({
  184. url: "/pages/index/index",
  185. });
  186. },
  187. //获取权限弹窗是否展示免费月卡接口
  188. async userIsShowAlert() {
  189. const res = await FreeButton.userIsShowAlert();
  190. if (res.Ret === 200) {
  191. this.isShowAlert = res.Data.IsShow;
  192. }
  193. },
  194. },
  195. components: {
  196. statement,
  197. researchSummary,
  198. reportChoiceness,
  199. freeCharge,
  200. audioModule,
  201. },
  202. async onLoad(option) {
  203. this.isType = option.type;
  204. this.id = Number(option.id) || "";
  205. uni.setNavigationBarTitle({
  206. title: this.isType == 1 ? "报告精选" : this.isType == 2 ? "本周研究汇总" : "上周纪要汇总",
  207. });
  208. this.userIsShowAlert();
  209. await this.$store.dispatch("checkHandle");
  210. if (!this.$store.state.isAuth && !this.$store.state.isBind) this.getDetilaiList();
  211. },
  212. /**
  213. * 用户点击分享
  214. */
  215. onShareAppMessage: function (res) {
  216. return {
  217. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.detali.Title,
  218. path: "/reportPages/reportSecretDetail/reportSecretDetail?type=" + this.isType + "&id=" + this.id,
  219. success: (res) => {},
  220. fail: (err) => {},
  221. };
  222. },
  223. };
  224. </script>
  225. <style lang="scss" scoped>
  226. .content-secret {
  227. @import "../jurisdiction.scss";
  228. padding: 10rpx 34rpx 34rpx;
  229. .container-top {
  230. font-size: 28rpx;
  231. .content-title {
  232. color: #4a4a4a;
  233. font-size: 34rpx;
  234. font-weight: bold;
  235. }
  236. .content-time {
  237. margin: 24rpx 0 34rpx 0;
  238. display: flex;
  239. justify-content: space-between;
  240. color: #333333;
  241. }
  242. .content-statement {
  243. display: flex;
  244. color: #707070;
  245. .statement {
  246. margin-left: 10rpx;
  247. color: #3385ff;
  248. }
  249. }
  250. .content-audio {
  251. margin: 60rpx 0;
  252. width: 682rpx;
  253. align-items: center;
  254. background: #ffffff;
  255. box-shadow: 0rpx 0rpx 12rpx rgba(33, 74, 135, 0.16);
  256. opacity: 1;
  257. border-radius: 16rpx;
  258. display: flex;
  259. padding: 24rpx 21rpx 18rpx;
  260. .audio-img {
  261. width: 154rpx;
  262. height: 154rpx;
  263. margin-right: 20rpx;
  264. image {
  265. width: 154rpx;
  266. height: 154rpx;
  267. }
  268. }
  269. .audio-title {
  270. font-size: 28rpx;
  271. color: #333;
  272. :first-child {
  273. width: 450rpx;
  274. overflow: hidden;
  275. text-overflow: ellipsis;
  276. white-space: nowrap;
  277. margin-bottom: 30rpx;
  278. font-size: 32rpx;
  279. }
  280. }
  281. }
  282. .content-abstract {
  283. margin-bottom: 30rpx;
  284. font-size: 32rpx;
  285. color: #4a4a4a;
  286. :first-child {
  287. float: left;
  288. font-weight: 700;
  289. }
  290. }
  291. .content-focuson {
  292. font-size: 32rpx !important;
  293. margin-bottom: 30rpx;
  294. color: #4a4a4a;
  295. .focuson {
  296. font-weight: 700;
  297. }
  298. }
  299. }
  300. .month_card {
  301. width: 100%;
  302. height: 565rpx;
  303. padding-left: -20rpx;
  304. }
  305. .btn-dl {
  306. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  307. color: #333 !important;
  308. margin: 30rpx auto !important;
  309. }
  310. .month-back {
  311. background: #f6f6f6 !important;
  312. color: #999 !important;
  313. }
  314. .moneh-text {
  315. text-align: center;
  316. width: 632rpx;
  317. margin: 0 auto 20rpx;
  318. color: #999999;
  319. }
  320. }
  321. </style>