鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
3.4 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="详情" leftClick @leftClick="$utils.navigateBack" bgColor="#FFFFFF" />
  4. <view class="main">
  5. <view class="card">
  6. <view class="card-header">
  7. <view class="title">{{ detail.title }}</view>
  8. <view class="desc">{{ detail.noticeDate }}</view>
  9. </view>
  10. <view class="card-content">
  11. <uv-parse :content="detail.content"></uv-parse>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="flex bottom">
  16. <button plain class="flex flex-column btn btn-simple" open-type="contact">
  17. <image class="icon" src="@/pages_order/static/product/icon-service.png" mode="widthFix"></image>
  18. <view>联系客服</view>
  19. </button>
  20. <button class="col btn" @click="onContactMentor">联系导师</button>
  21. </view>
  22. <contactMentorPopup ref="contactMentorPopup" ></contactMentorPopup>
  23. </view>
  24. </template>
  25. <script>
  26. import contactMentorPopup from '@/pages_order/order/components/contactMentorPopup.vue'
  27. export default {
  28. components: {
  29. contactMentorPopup,
  30. },
  31. data() {
  32. return {
  33. id: null,
  34. detail: {},
  35. }
  36. },
  37. onLoad(arg) {
  38. const { id } = arg
  39. this.id = id
  40. this.getData()
  41. },
  42. methods: {
  43. async getData() {
  44. // todo: mark read
  45. try {
  46. this.detail = await this.$fetch('queryNoticeById', { noticeId: this.id })
  47. } catch (err) {
  48. }
  49. },
  50. onContactMentor() {
  51. this.$refs.contactMentorPopup.open(this.detail.teacherPhone)
  52. },
  53. },
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .page__view {
  58. width: 100vw;
  59. min-height: 100vh;
  60. background: $uni-bg-color;
  61. position: relative;
  62. /deep/ .nav-bar__view {
  63. position: fixed;
  64. top: 0;
  65. left: 0;
  66. }
  67. }
  68. .main {
  69. padding: calc(var(--status-bar-height) + 160rpx) 40rpx 326rpx 40rpx;
  70. }
  71. .card {
  72. padding: 32rpx;
  73. font-family: PingFang SC;
  74. font-weight: 400;
  75. line-height: 1.4;
  76. background: #FFFFFF;
  77. border-radius: 32rpx;
  78. &-header {
  79. font-family: PingFang SC;
  80. line-height: 1.4;
  81. color: #252545;
  82. .title {
  83. font-size: 40rpx;
  84. font-weight: 500;
  85. color: #262626;
  86. }
  87. .desc {
  88. margin-top: 4rpx;
  89. font-size: 24rpx;
  90. color: #999999;
  91. }
  92. }
  93. &-content {
  94. margin-top: 24rpx;
  95. font-size: 28rpx;
  96. line-height: 1.7;
  97. color: #3B3D3D;
  98. }
  99. }
  100. .bottom {
  101. position: fixed;
  102. left: 0;
  103. bottom: 0;
  104. width: 100vw;
  105. // height: 270rpx;
  106. background: #FFFFFF;
  107. box-sizing: border-box;
  108. padding: 24rpx 40rpx;
  109. padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
  110. box-sizing: border-box;
  111. column-gap: 32rpx;
  112. .col {
  113. flex: 1;
  114. }
  115. .btn {
  116. width: 100%;
  117. // padding: 14rpx 74rpx;
  118. padding: 14rpx 0;
  119. font-family: PingFang SC;
  120. font-weight: 500;
  121. font-size: 36rpx;
  122. line-height: 1.4;
  123. color: #252545;
  124. border: 2rpx solid #252545;
  125. border-radius: 41rpx;
  126. }
  127. .btn-simple {
  128. flex: none;
  129. width: auto;
  130. font-family: PingFang SC;
  131. font-weight: 400;
  132. font-size: 22rpx;
  133. line-height: 1.1;
  134. color: #999999;
  135. border: none;
  136. border-radius: unset;
  137. .icon {
  138. width: 52rpx;
  139. height: auto;
  140. margin-bottom: 4rpx;
  141. }
  142. }
  143. }
  144. </style>