internalDetials.vue 6.2 KB

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