morningDetails.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view class="container morning-details-content">
  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="morning-meeting-content">
  13. <view class="title-morning" @click="morningReportHandler(item)">
  14. {{ item.Title }}
  15. </view>
  16. <view class="subject-name-morning" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId"> #{{ key.SubjectName }} </view>
  17. </view>
  18. <view class="li-text">
  19. <mp-html :content="strFontSize(item.Content)" />
  20. </view>
  21. <view class="li-look" @click="goDustrialHandler(item.IndustryId)">查看资源包</view>
  22. </view>
  23. </block>
  24. <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
  25. <block v-if="!isShowAlert">
  26. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  27. <block>
  28. <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
  29. <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
  30. </block>
  31. <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
  32. </block>
  33. <block v-else>
  34. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  35. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  36. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  37. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  38. </block>
  39. </view>
  40. <Loading />
  41. </view>
  42. <!-- <not-have-login v-else /> -->
  43. </template>
  44. <script>
  45. import { Reports } from "@/config/api.js";
  46. import notHaveLogin from "@/components/notHaveLogin.vue";
  47. export default {
  48. components: { notHaveLogin },
  49. data() {
  50. return {
  51. reportDetails: {},
  52. reportId: "",
  53. hasPermission: "", //权限判断
  54. };
  55. },
  56. methods: {
  57. // 跳转产业标签
  58. goDustrialHandler(id) {
  59. uni.navigateTo({
  60. url: "/reportPages/IndustryReport/IndustryReport?id=" + id,
  61. });
  62. },
  63. // 获取文章详情
  64. async getDetalis() {
  65. const res = await Reports.getMorningMeetingDetail({
  66. Id: this.reportId,
  67. });
  68. if (res.Ret === 200) {
  69. this.hasPermission = res.Data.HasPermission;
  70. this.reportDetails = res.Data.Detail || {};
  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. backIndex() {
  97. uni.switchTab({
  98. url: "/pages/index/index",
  99. });
  100. },
  101. morningReportHandler(item) {
  102. uni.navigateTo({
  103. url: "/pageMy/reportDetail/reportDetail?id=" + item.LinkArticleId,
  104. });
  105. },
  106. },
  107. onLoad(options) {
  108. this.reportId = Number(options.id) || 8;
  109. this.getDetalis();
  110. },
  111. onShareAppMessage() {
  112. return {
  113. title: "今日晨会精华",
  114. path: "/reportPages/morningDetails/morningDetails?id=" + this.reportId,
  115. };
  116. },
  117. };
  118. </script>
  119. <style scoped lang="scss">
  120. .morning-details-content {
  121. padding: 30rpx;
  122. color: #333333;
  123. font-size: 32rpx;
  124. .content-time {
  125. font-size: 28rpx;
  126. padding: 20rpx 0 30rpx 0;
  127. display: flex;
  128. justify-content: space-between;
  129. border-bottom: 2rpx dashed #ececec;
  130. .time {
  131. color: #707070;
  132. }
  133. }
  134. .report-ul {
  135. .li-title {
  136. margin: 30rpx 0 10rpx;
  137. font-weight: 500;
  138. }
  139. .li-text {
  140. margin-bottom: 30rpx;
  141. }
  142. .li-look {
  143. display: flex;
  144. justify-content: flex-end;
  145. font-size: 28rpx;
  146. color: #376cbb;
  147. margin-bottom: 70rpx;
  148. }
  149. }
  150. .noauth-cont {
  151. padding-top: 150rpx;
  152. text-align: center;
  153. font-size: 28rpx;
  154. .noauth-ico {
  155. width: 365rpx;
  156. height: 229rpx;
  157. margin-bottom: 70rpx;
  158. }
  159. .tip {
  160. width: 532rpx;
  161. margin: 0 auto 100rpx;
  162. .contract {
  163. padding: 40rpx 90rpx 0;
  164. line-height: 44rpx;
  165. text {
  166. display: inline-block;
  167. }
  168. }
  169. }
  170. .btn-cont {
  171. width: 500rpx;
  172. height: 52rpx;
  173. background: $uni-color-new;
  174. color: #fff;
  175. font-size: 24rpx;
  176. font-weight: 600;
  177. border-radius: 8rpx;
  178. margin: 0 auto;
  179. text-align: center;
  180. line-height: 52rpx;
  181. &.back-btn {
  182. background: #e5efff !important;
  183. color: $uni-color-new;
  184. margin-top: 30rpx;
  185. }
  186. .btn_bg {
  187. width: 100%;
  188. height: 80rpx;
  189. position: absolute;
  190. left: 0;
  191. top: 0;
  192. }
  193. .btn-txt {
  194. width: 100%;
  195. position: absolute;
  196. z-index: 1;
  197. }
  198. }
  199. .month_card {
  200. width: 100%;
  201. height: 565rpx;
  202. padding-left: -20rpx;
  203. }
  204. .btn-dl {
  205. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  206. color: #333 !important;
  207. margin: 30rpx auto !important;
  208. }
  209. .month-back {
  210. background: #f6f6f6 !important;
  211. color: #999 !important;
  212. }
  213. .moneh-text {
  214. text-align: center;
  215. width: 632rpx;
  216. margin: 0 auto 20rpx;
  217. color: #999999;
  218. }
  219. }
  220. .morning-meeting-content {
  221. display: flex;
  222. flex-wrap: wrap;
  223. color: $uni-color-new;
  224. font-size: 28rpx;
  225. margin: 15rpx 0;
  226. .title-morning {
  227. font-weight: 600;
  228. text-decoration: underline;
  229. }
  230. .subject-name-morning {
  231. margin-left: 10rpx;
  232. }
  233. }
  234. }
  235. </style>