internalDetials.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <block v-if="isUserBindingPhoneNumber">
  3. <block v-if="hasPermission === 1">
  4. <view class="container internal-detials" v-if="haveData">
  5. <web-view :src="linkurl + '?id=' + reportId + '&token=' + access_token"></web-view>
  6. </view>
  7. <view class="nodata" v-else>
  8. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
  9. <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
  10. </view>
  11. </block>
  12. <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
  13. <block v-if="!isShowAlert">
  14. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  15. <block>
  16. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  17. <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
  18. </block>
  19. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  20. </block>
  21. <block v-else>
  22. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  23. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  24. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  25. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  26. </block>
  27. </view>
  28. <Loading />
  29. </block>
  30. <not-have-login v-else />
  31. </template>
  32. <script>
  33. import { Reports } from "@/config/api.js";
  34. import statement from "@/reportPages/components/statement.vue";
  35. import NotHaveLogin from "@/components/notHaveLogin.vue";
  36. import { intemalLinkUrl } from "@/config/config.js";
  37. export default {
  38. data() {
  39. return {
  40. reportDetail: {},
  41. isShowStatement: false,
  42. haveData: true,
  43. hasPermission: "",
  44. reportId: 0,
  45. titleTxT: "",
  46. access_token: "",
  47. };
  48. },
  49. computed: {
  50. linkurl() {
  51. return intemalLinkUrl;
  52. },
  53. },
  54. components: { statement, NotHaveLogin },
  55. methods: {
  56. async reportSelectionDetail() {
  57. const res = await Reports.getProductInteriorDetail({
  58. ProductInteriorId: this.reportId,
  59. });
  60. if (res.Ret === 200) {
  61. this.hasPermission = res.Data.HasPermission;
  62. this.reportDetail = res.Data.Detail;
  63. this.haveData = this.reportDetail ? true : false;
  64. this.titleTxT = this.reportDetail.ColumnName;
  65. uni.setNavigationBarTitle({
  66. title: this.titleTxT,
  67. });
  68. this.access_token = this.access_token || this.$db.get("access_token");
  69. } else {
  70. this.haveData = false;
  71. }
  72. },
  73. /* 无权限申请开通权限 */
  74. applyAuth() {
  75. this.hasPermission === 4
  76. ? uni.navigateTo({
  77. url: "/pageMy/applyTrial/applyTrial?tryType=ProductInterior&detailId=" + this.id,
  78. })
  79. : uni.showModal({
  80. title: "",
  81. content: "您已经提交过申请了,请耐心等待",
  82. showCancel: false,
  83. confirmColor: "#365595",
  84. success: function (res) {
  85. uni.navigateBack({
  86. fail() {
  87. uni.switchTab({
  88. url: "/pages/index/index",
  89. });
  90. },
  91. });
  92. },
  93. });
  94. },
  95. // 去往不同的详情页
  96. goIsTypeDetails(item) {
  97. if (item.Type == 1) return;
  98. switch (item.Type) {
  99. case 2:
  100. uni.navigateTo({
  101. url: "/pageMy/reportDetail/reportDetail?id=" + item.SourceId,
  102. });
  103. break;
  104. case 3:
  105. uni.navigateTo({
  106. url: "/activityPages/activityDetail/activityDetail?id=" + item.SourceId,
  107. });
  108. break;
  109. case 4:
  110. uni.navigateTo({
  111. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.SourceId,
  112. });
  113. break;
  114. default:
  115. "";
  116. }
  117. },
  118. // 返回首頁
  119. backIndex() {
  120. uni.switchTab({
  121. url: "/pages/index/index",
  122. });
  123. },
  124. },
  125. onLoad(options) {
  126. this.reportId = Number(options.id) || "";
  127. this.reportId > 0 && this.reportSelectionDetail();
  128. },
  129. onShareAppMessage() {
  130. return {
  131. title: this.titleTxT,
  132. path: "/reportPages/internalDetials/internalDetials?id=" + this.reportId,
  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: 30rpx 0 20rpx;
  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>