internalDetials.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <block v-if="hasPermission === 1">
  3. <view class="container internal-detials" v-if="haveData">
  4. <view class="report-content-title">{{ reportDetail.Title }}</view>
  5. <view class="author-time">
  6. <text>{{ reportDetail.Department }}</text>
  7. <text>{{ reportDetail.PublishDate }}</text>
  8. </view>
  9. <view class="content-statement">
  10. <text>注:请务必阅读</text>
  11. <text class="statement" @click="isShowStatement = true">免责声明 </text>
  12. </view>
  13. <view class="content-abstract"> 摘要:{{ reportDetail.Abstract }}</text> </view>
  14. <statement :show="isShowStatement" />
  15. <view>
  16. <view
  17. v-for="(item, index) in reportDetail.BodySlice"
  18. :key="index"
  19. @click="goIsTypeDetails(item)"
  20. :style="{ color: item.Type > 1 && '#3385FF', 'word-wrap': 'break-word' }"
  21. >
  22. <mp-html :content="strFontSize(item.Body)" />
  23. </view>
  24. </view>
  25. </view>
  26. <view class="nodata" v-else>
  27. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
  28. <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
  29. </view>
  30. </block>
  31. <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
  32. <block v-if="!isShowAlert">
  33. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  34. <block>
  35. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  36. <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
  37. </block>
  38. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  39. </block>
  40. <block v-else>
  41. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  42. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  43. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  44. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  45. </block>
  46. </view>
  47. </template>
  48. <script>
  49. import { Reports } from "@/config/api.js";
  50. import statement from "@/reportPages/components/statement.vue";
  51. export default {
  52. data() {
  53. return {
  54. reportDetail: {},
  55. isShowStatement: false,
  56. haveData: true,
  57. hasPermission: "",
  58. reportId: 0,
  59. };
  60. },
  61. components: { statement },
  62. methods: {
  63. async reportSelectionDetail() {
  64. const res = await Reports.getProductInteriorDetail({
  65. ProductInteriorId: this.reportId,
  66. });
  67. if (res.Ret === 200) {
  68. this.hasPermission = res.Data.HasPermission;
  69. this.reportDetail = res.Data.Detail;
  70. this.haveData = this.reportDetail ? true : false;
  71. } else {
  72. this.haveData = false;
  73. }
  74. },
  75. /* 无权限申请开通权限 */
  76. applyAuth() {
  77. this.hasPermission === 4
  78. ? uni.navigateTo({
  79. url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
  80. })
  81. : uni.showModal({
  82. title: "",
  83. content: "您已经提交过申请了,请耐心等待",
  84. showCancel: false,
  85. confirmColor: "#365595",
  86. success: function (res) {
  87. uni.navigateBack({
  88. fail() {
  89. uni.switchTab({
  90. url: "/pages/index/index",
  91. });
  92. },
  93. });
  94. },
  95. });
  96. },
  97. // 去往不同的详情页
  98. goIsTypeDetails(item) {
  99. if (item.Type == 1) return;
  100. switch (item.Type) {
  101. case 2:
  102. uni.navigateTo({
  103. url: "/pageMy/reportDetail/reportDetail?id=" + item.SourceId,
  104. });
  105. break;
  106. case 3:
  107. uni.navigateTo({
  108. url: "/activityPages/activityDetail/activityDetail?id=" + item.SourceId,
  109. });
  110. break;
  111. case 4:
  112. uni.navigateTo({
  113. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.SourceId,
  114. });
  115. break;
  116. default:
  117. "";
  118. }
  119. },
  120. },
  121. onLoad(options) {
  122. this.reportId = Number(options.id) || "";
  123. this.reportId > 0 && this.reportSelectionDetail();
  124. },
  125. async onShow() {
  126. await this.$store.dispatch("checkHandle");
  127. // this.$store.commit("setRouterReport", "重点公司");
  128. },
  129. onShareAppMessage() {
  130. return {
  131. title: "xxxxxx",
  132. path: "/reportPages/internalDetials/internalDetials",
  133. };
  134. },
  135. };
  136. </script>
  137. <style lang="scss" scoped>
  138. .internal-detials {
  139. padding: 30rpx 34rpx;
  140. color: #333;
  141. font-size: 28rpx;
  142. .author-time {
  143. display: flex;
  144. justify-content: space-between;
  145. line-height: 39rpx;
  146. margin: 25rpx 0 35rpx;
  147. }
  148. .content-statement {
  149. display: flex;
  150. color: #707070;
  151. .statement {
  152. margin-left: 10rpx;
  153. color: #3385ff;
  154. }
  155. }
  156. .content-abstract {
  157. position: relative;
  158. margin-top: 30rpx;
  159. text-indent: 0.5em;
  160. line-height: 50rpx;
  161. padding-bottom: 30rpx;
  162. border-bottom: 1rpx dashed #ececec;
  163. &::before {
  164. content: "";
  165. width: 4rpx;
  166. height: 28rpx;
  167. position: absolute;
  168. top: 11rpx;
  169. left: 0;
  170. background-color: #3385ff;
  171. }
  172. // .abstract {
  173. // display: inline-block;
  174. // }
  175. }
  176. .nodata-tip {
  177. color: #999;
  178. font-size: 30rpx;
  179. }
  180. }
  181. .noauth-cont {
  182. padding-top: 150rpx;
  183. text-align: center;
  184. font-size: 28rpx;
  185. .noauth-ico {
  186. width: 365rpx;
  187. height: 229rpx;
  188. margin-bottom: 70rpx;
  189. }
  190. .tip {
  191. width: 532rpx;
  192. margin: 0 auto 100rpx;
  193. .contract {
  194. padding: 40rpx 90rpx 0;
  195. line-height: 44rpx;
  196. text {
  197. display: inline-block;
  198. }
  199. }
  200. }
  201. .btn-cont {
  202. width: 368rpx;
  203. height: 80rpx;
  204. // position: relative;
  205. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  206. color: #fff;
  207. font-size: 34rpx;
  208. margin: 0 auto;
  209. text-align: center;
  210. line-height: 80rpx;
  211. &.back-btn {
  212. background: #fff !important;
  213. color: #2c83ff;
  214. border: 1px solid #2c83ff;
  215. margin-top: 30rpx;
  216. }
  217. .btn_bg {
  218. width: 100%;
  219. height: 80rpx;
  220. position: absolute;
  221. left: 0;
  222. top: 0;
  223. }
  224. .btn-txt {
  225. width: 100%;
  226. position: absolute;
  227. z-index: 1;
  228. }
  229. }
  230. }
  231. </style>