internalDetials.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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.PublishTime }}</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 }}</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. titleTxT: "",
  60. };
  61. },
  62. components: { statement },
  63. methods: {
  64. async reportSelectionDetail() {
  65. const res = await Reports.getProductInteriorDetail({
  66. ProductInteriorId: this.reportId,
  67. });
  68. if (res.Ret === 200) {
  69. this.hasPermission = res.Data.HasPermission;
  70. this.reportDetail = res.Data.Detail;
  71. this.haveData = this.reportDetail ? true : false;
  72. this.titleTxT = this.reportDetail.Title;
  73. uni.setNavigationBarTitle({
  74. title: this.titleTxT,
  75. });
  76. } else {
  77. this.haveData = false;
  78. }
  79. },
  80. /* 无权限申请开通权限 */
  81. applyAuth() {
  82. this.hasPermission === 4
  83. ? uni.navigateTo({
  84. url: "/pageMy/applyTrial/applyTrial?tryType=ProductInterior&detailId=" + this.id,
  85. })
  86. : uni.showModal({
  87. title: "",
  88. content: "您已经提交过申请了,请耐心等待",
  89. showCancel: false,
  90. confirmColor: "#365595",
  91. success: function (res) {
  92. uni.navigateBack({
  93. fail() {
  94. uni.switchTab({
  95. url: "/pages/index/index",
  96. });
  97. },
  98. });
  99. },
  100. });
  101. },
  102. // 去往不同的详情页
  103. goIsTypeDetails(item) {
  104. if (item.Type == 1) return;
  105. switch (item.Type) {
  106. case 2:
  107. uni.navigateTo({
  108. url: "/pageMy/reportDetail/reportDetail?id=" + item.SourceId,
  109. });
  110. break;
  111. case 3:
  112. uni.navigateTo({
  113. url: "/activityPages/activityDetail/activityDetail?id=" + item.SourceId,
  114. });
  115. break;
  116. case 4:
  117. uni.navigateTo({
  118. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.SourceId,
  119. });
  120. break;
  121. default:
  122. "";
  123. }
  124. },
  125. // 返回首頁
  126. backIndex() {
  127. uni.switchTab({
  128. url: "/pages/index/index",
  129. });
  130. },
  131. },
  132. onLoad(options) {
  133. this.reportId = Number(options.id) || "";
  134. this.reportId > 0 && this.reportSelectionDetail();
  135. },
  136. async onShow() {
  137. await this.$store.dispatch("checkHandle");
  138. // this.$store.commit("setRouterReport", "重点公司");
  139. },
  140. onShareAppMessage() {
  141. return {
  142. title: this.titleTxT,
  143. path: "/reportPages/internalDetials/internalDetials?id=" + this.reportId,
  144. };
  145. },
  146. };
  147. </script>
  148. <style lang="scss" scoped>
  149. .internal-detials {
  150. padding: 30rpx 34rpx;
  151. color: #333;
  152. font-size: 28rpx;
  153. .author-time {
  154. display: flex;
  155. justify-content: space-between;
  156. line-height: 39rpx;
  157. margin: 25rpx 0 35rpx;
  158. }
  159. .content-statement {
  160. display: flex;
  161. color: #707070;
  162. .statement {
  163. margin-left: 10rpx;
  164. color: #3385ff;
  165. }
  166. }
  167. .content-abstract {
  168. position: relative;
  169. margin: 30rpx 0 20rpx;
  170. text-indent: 0.5em;
  171. line-height: 50rpx;
  172. padding-bottom: 30rpx;
  173. border-bottom: 1rpx dashed #ececec;
  174. &::before {
  175. content: "";
  176. width: 4rpx;
  177. height: 28rpx;
  178. position: absolute;
  179. top: 11rpx;
  180. left: 0;
  181. background-color: #3385ff;
  182. }
  183. // .abstract {
  184. // display: inline-block;
  185. // }
  186. }
  187. .nodata-tip {
  188. color: #999;
  189. font-size: 30rpx;
  190. }
  191. }
  192. .noauth-cont {
  193. padding-top: 150rpx;
  194. text-align: center;
  195. font-size: 28rpx;
  196. .noauth-ico {
  197. width: 365rpx;
  198. height: 229rpx;
  199. margin-bottom: 70rpx;
  200. }
  201. .tip {
  202. width: 532rpx;
  203. margin: 0 auto 100rpx;
  204. .contract {
  205. padding: 40rpx 90rpx 0;
  206. line-height: 44rpx;
  207. text {
  208. display: inline-block;
  209. }
  210. }
  211. }
  212. .btn-cont {
  213. width: 368rpx;
  214. height: 80rpx;
  215. // position: relative;
  216. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  217. color: #fff;
  218. font-size: 34rpx;
  219. margin: 0 auto;
  220. text-align: center;
  221. line-height: 80rpx;
  222. &.back-btn {
  223. background: #fff !important;
  224. color: #2c83ff;
  225. border: 1px solid #2c83ff;
  226. margin-top: 30rpx;
  227. }
  228. .btn_bg {
  229. width: 100%;
  230. height: 80rpx;
  231. position: absolute;
  232. left: 0;
  233. top: 0;
  234. }
  235. .btn-txt {
  236. width: 100%;
  237. position: absolute;
  238. z-index: 1;
  239. }
  240. }
  241. }
  242. </style>