morningDetails.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view class="container morning-details-content" v-if="isUserBindingPhoneNumber">
  3. <block v-if="hasPermission == 1">
  4. <view class="report-content-title">{{ reportDetails.Title }} </view>
  5. <view class="content-time">
  6. <text>{{ reportDetails.Department }} </text>
  7. <text class="time">{{ reportDetails.PublishTime }} </text>
  8. </view>
  9. <!-- 这里是循环的盒子 -->
  10. <view class="report-ul" v-for="item in reportDetails.List" :key="item.Id">
  11. <view class="li-title">{{ item.IndustryName }}</view>
  12. <view class="li-text">
  13. <mp-html :content="strFontSize(item.Content)" />
  14. </view>
  15. <view class="li-look" @click="goDustrialHandler(item.IndustryId)">查看资源包</view>
  16. </view>
  17. </block>
  18. <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
  19. <block v-if="!isShowAlert">
  20. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  21. <block>
  22. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  23. <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
  24. </block>
  25. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  26. </block>
  27. <block v-else>
  28. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  29. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  30. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  31. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  32. </block>
  33. </view>
  34. <Loading />
  35. </view>
  36. <not-have-login v-else />
  37. </template>
  38. <script>
  39. import { Reports } from "@/config/api.js";
  40. import notHaveLogin from "@/components/notHaveLogin.vue";
  41. export default {
  42. components: { notHaveLogin },
  43. data() {
  44. return {
  45. reportDetails: {},
  46. reportId: "",
  47. hasPermission: "", //权限判断
  48. };
  49. },
  50. methods: {
  51. // 跳转产业标签
  52. goDustrialHandler(id) {
  53. uni.navigateTo({
  54. url: "/reportPages/IndustryReport/IndustryReport?id=" + id,
  55. });
  56. },
  57. // 获取文章详情
  58. async getDetalis() {
  59. const res = await Reports.getMorningMeetingDetail({
  60. Id: this.reportId,
  61. });
  62. if (res.Ret === 200) {
  63. this.hasPermission = res.Data.HasPermission;
  64. this.reportDetails = res.Data.Detail || {};
  65. }
  66. },
  67. /* 无权限申请开通权限 */
  68. applyAuth() {
  69. this.hasPermission === 4
  70. ? uni.navigateTo({
  71. url: "/pageMy/applyTrial/applyTrial?tryType=ProductInterior&detailId=" + this.id,
  72. })
  73. : uni.showModal({
  74. title: "",
  75. content: "您已经提交过申请了,请耐心等待",
  76. showCancel: false,
  77. confirmColor: "#365595",
  78. success: function (res) {
  79. uni.navigateBack({
  80. fail() {
  81. uni.switchTab({
  82. url: "/pages/index/index",
  83. });
  84. },
  85. });
  86. },
  87. });
  88. },
  89. // 返回首頁
  90. backIndex() {
  91. uni.switchTab({
  92. url: "/pages/index/index",
  93. });
  94. },
  95. },
  96. onLoad(options) {
  97. this.reportId = Number(options.id) || 8;
  98. this.getDetalis();
  99. },
  100. onShareAppMessage() {
  101. return {
  102. title: "今日晨会精华",
  103. path: "/reportPages/morningDetails/morningDetails?id=" + this.reportId,
  104. };
  105. },
  106. };
  107. </script>
  108. <style scoped lang="scss">
  109. .morning-details-content {
  110. padding: 30rpx;
  111. color: #333333;
  112. font-size: 32rpx;
  113. .content-time {
  114. font-size: 28rpx;
  115. padding: 20rpx 0 30rpx 0;
  116. display: flex;
  117. justify-content: space-between;
  118. border-bottom: 2rpx dashed #ececec;
  119. .time {
  120. color: #707070;
  121. }
  122. }
  123. .report-ul {
  124. .li-title {
  125. margin: 30rpx 0 10rpx;
  126. font-weight: 500;
  127. }
  128. .li-text {
  129. margin-bottom: 30rpx;
  130. }
  131. .li-look {
  132. display: flex;
  133. justify-content: flex-end;
  134. font-size: 28rpx;
  135. color: #3385ff;
  136. margin-bottom: 70rpx;
  137. }
  138. }
  139. .noauth-cont {
  140. padding-top: 150rpx;
  141. text-align: center;
  142. font-size: 28rpx;
  143. .noauth-ico {
  144. width: 365rpx;
  145. height: 229rpx;
  146. margin-bottom: 70rpx;
  147. }
  148. .tip {
  149. width: 532rpx;
  150. margin: 0 auto 100rpx;
  151. .contract {
  152. padding: 40rpx 90rpx 0;
  153. line-height: 44rpx;
  154. text {
  155. display: inline-block;
  156. }
  157. }
  158. }
  159. .btn-cont {
  160. width: 368rpx;
  161. height: 80rpx;
  162. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  163. color: #fff;
  164. font-size: 34rpx;
  165. margin: 0 auto;
  166. text-align: center;
  167. line-height: 80rpx;
  168. &.back-btn {
  169. background: #fff !important;
  170. color: #2c83ff;
  171. border: 1px solid #2c83ff;
  172. margin-top: 30rpx;
  173. }
  174. .btn_bg {
  175. width: 100%;
  176. height: 80rpx;
  177. position: absolute;
  178. left: 0;
  179. top: 0;
  180. }
  181. .btn-txt {
  182. width: 100%;
  183. position: absolute;
  184. z-index: 1;
  185. }
  186. }
  187. .month_card {
  188. width: 100%;
  189. height: 565rpx;
  190. padding-left: -20rpx;
  191. }
  192. .btn-dl {
  193. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  194. color: #333 !important;
  195. margin: 30rpx auto !important;
  196. }
  197. .month-back {
  198. background: #f6f6f6 !important;
  199. color: #999 !important;
  200. }
  201. .moneh-text {
  202. text-align: center;
  203. width: 632rpx;
  204. margin: 0 auto 20rpx;
  205. color: #999999;
  206. }
  207. }
  208. }
  209. </style>