reportSecretDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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 v-if="isPlay" @click="audiouspend" :src="require('../image/suspend_icon.png')"></image>
  19. <image v-else @click="audioPlay" :src="require('../image/play_icon.png')" mode=""></image>
  20. </view>
  21. <view class="audio-title">
  22. <text>{{detali.VideoName}}</text>
  23. <text>{{detali.VideoPlaySeconds}}</text>
  24. </view>
  25. </view>
  26. <view v-if="detali.Abstract" class="content-abstract">
  27. <text>摘要:</text>
  28. <text>
  29. {{detali.Abstract}}
  30. </text>
  31. </view>
  32. <view v-if="detali.ProductDescription&&isType==1" class="content-abstract">
  33. <text>产品说明:</text>
  34. <text>
  35. {{detali.ProductDescription}}
  36. </text>
  37. </view>
  38. <view v-if="detali.UpdateDescription&&isType==1" class="content-abstract">
  39. <text>变更说明:</text>
  40. <text>
  41. {{detali.UpdateDescription}}
  42. </text>
  43. </view>
  44. <view v-if="detali.FocusOn&&isType==1" class="content-focuson">
  45. <text class="focuson">近期重点关注方向:</text>
  46. <rich-text :nodes="detali.FocusOn"></rich-text>
  47. </view>
  48. </view>
  49. <view class="container-text">
  50. <researchSummary v-if="isType==1 ||isType==3" :dataList="dataList" />
  51. <reportChoiceness v-if="isType==2" :dataListResearch="dataListResearch"/>
  52. </view>
  53. <statement :show="isShowStatement"/>
  54. </block>
  55. <view class="noauth-cont" v-else-if="hasPermission==3 || hasPermission==4">
  56. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  57. <block>
  58. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  59. <view class="btn-cont" @click="applyAuth">
  60. 立即申请
  61. </view>
  62. </block>
  63. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import statement from '@/components/statement.vue'
  69. import researchSummary from './components/researchSummary.vue'
  70. import reportChoiceness from './components/reportChoiceness.vue'
  71. import {Reports} from '@/config/api.js'
  72. let app = getApp()
  73. export default {
  74. data() {
  75. return {
  76. isShowStatement:false,
  77. isPlay:false,
  78. audioContext:'', //音频
  79. isType:'',//类型
  80. id:'',//
  81. detali:'',//详情
  82. dataList:[],//精选,上周 数组
  83. dataListResearch:[],//本周数组
  84. hasPermission:'',//权限判断
  85. videoUrl:''
  86. //bgAudioManager:''
  87. }
  88. },
  89. methods: {
  90. audioPlay(){
  91. this.isPlay=true
  92. app.globalData.bgAudioManager.title = this.detali.VideoName
  93. app.globalData.bgAudioManager.src = this.videoUrl
  94. },
  95. audiouspend(){
  96. this.isPlay=false
  97. app.globalData.bgAudioManager.pause()
  98. },
  99. async getDetilaiList(){
  100. if(this.isType==1||this.isType==3){
  101. const res = this.isType==1 ? await Reports.reportSelectionDetail({ArticleId:this.id})
  102. : await Reports.minutesSummaryDetail({ ArticleId:this.id})
  103. if(res.Ret===200){
  104. this.detali = res.Data.Detail
  105. this.hasPermission=res.Data.HasPermission
  106. this.videoUrl=res.Data.Detail.VideoUrl
  107. this.dataList=res.Data.List
  108. if( app.globalData.bgAudioManager.src === this.videoUrl) {
  109. this.isPlay = true
  110. }
  111. }
  112. }else {
  113. const res = await Reports.researchSummaryDetail({ArticleId:this.id})
  114. if(res.Ret===200){
  115. this.detali = res.Data.Detail
  116. this.hasPermission=res.Data.HasPermission
  117. this.dataListResearch=res.Data.List
  118. this.videoUrl=res.Data.Detail.VideoUrl
  119. if( app.globalData.bgAudioManager.src === this.videoUrl) {
  120. this.isPlay = true
  121. }
  122. }
  123. }
  124. },
  125. /* 无权限申请开通权限 */
  126. applyAuth() {
  127. this.hasPermission === 4
  128. ? uni.navigateTo({
  129. url:"/pages/applyTrial/applyTrial"
  130. })
  131. : uni.showModal({
  132. title: '',
  133. content: '您已经提交过申请了,请耐心等待',
  134. showCancel:false,
  135. confirmColor:'#365595',
  136. success: function (res) {
  137. uni.navigateBack({
  138. fail(){
  139. uni.switchTab({
  140. url:'/pages/index/index'
  141. })
  142. }
  143. })
  144. }
  145. });
  146. },
  147. // 返回首頁
  148. backIndex() {
  149. uni.switchTab({
  150. url:'/pages/index/index'
  151. })
  152. },
  153. },
  154. components:{
  155. statement,
  156. researchSummary,
  157. reportChoiceness
  158. },
  159. onLoad(option) {
  160. this.isType=option.type
  161. this.id=Number(option.id) ||''
  162. uni.setNavigationBarTitle({
  163. title:this.isType==1 ? '报告精选' : this.isType==2 ? '本周研究汇总' : '上周纪要汇总'
  164. })
  165. app.globalData.bgAudioManager.onEnded(res=>{
  166. this.isPlay=true
  167. })
  168. },
  169. onShow() {
  170. this.$store.dispatch('checkHandle').then(res => {
  171. app.globalData.isAuth = res.IsAuth;
  172. app.globalData.isBind = res.IsBind;
  173. if((!res.IsAuth) && (!res.IsBind)) { //已授权已绑定
  174. this.getDetilaiList()
  175. }else if(res.IsAuth) { //未授权
  176. uni.navigateTo({
  177. url:'/pages/authGuide/authGuide'
  178. })
  179. }else if(res.IsBind && !res.IsAuth){ //已授权未绑定
  180. uni.navigateTo({
  181. url:'/pages/login/login'
  182. })
  183. }
  184. })
  185. },
  186. onUnload(){
  187. },
  188. /**
  189. * 用户点击分享
  190. */
  191. onShareAppMessage: function (res) {
  192. return {
  193. title: this.detali.Title,
  194. path: '/reportPages/reportSecretDetail/reportSecretDetail?type=' + this.isType + '&id='+this.id,
  195. success: (res)=> {
  196. },
  197. fail: (err)=> {
  198. }
  199. }
  200. },
  201. }
  202. </script>
  203. <style lang="scss" scoped>
  204. .content-secret {
  205. @import '../jurisdiction.scss';
  206. padding:10rpx 34rpx 34rpx;
  207. .container-top {
  208. font-size: 28rpx;
  209. .content-title {
  210. color: #4A4A4A;
  211. font-size: 34rpx;
  212. font-weight: bold;
  213. }
  214. .content-time {
  215. margin:24rpx 0 34rpx 0;
  216. display: flex;
  217. justify-content: space-between;
  218. color: #333333;
  219. }
  220. .content-statement {
  221. display: flex;
  222. color: #707070;
  223. .statement {
  224. margin-left: 10rpx;
  225. color: #3385FF;
  226. }
  227. }
  228. .content-audio {
  229. margin: 60rpx 0;
  230. width: 682rpx;
  231. align-items: center;
  232. background: #FFFFFF;
  233. box-shadow: 0rpx 0rpx 12rpx rgba(33, 74, 135, 0.16);
  234. opacity: 1;
  235. border-radius: 16rpx;
  236. display: flex;
  237. padding: 24rpx 21rpx 18rpx;
  238. .audio-img{
  239. width: 154rpx;
  240. height: 154rpx;
  241. margin-right: 20rpx;
  242. image {
  243. width: 154rpx;
  244. height: 154rpx;
  245. }
  246. }
  247. .audio-title {
  248. font-size: 28rpx;
  249. color:#333;
  250. :first-child{
  251. width: 450rpx;
  252. overflow: hidden;
  253. text-overflow:ellipsis;
  254. white-space: nowrap;
  255. margin-bottom:30rpx ;
  256. font-size: 32rpx
  257. }
  258. }
  259. }
  260. .content-abstract {
  261. margin-bottom: 30rpx;
  262. font-size: 32rpx;
  263. color: #4A4A4A;
  264. :first-child{
  265. float:left;
  266. font-weight: 700;
  267. }
  268. }
  269. .content-focuson {
  270. font-size: 32rpx !important;
  271. margin-bottom: 30rpx;
  272. color: #4A4A4A;
  273. .focuson {
  274. font-weight: 700;
  275. }
  276. }
  277. }
  278. }
  279. </style>