detail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <view class="container">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <view class="content" style="margin-top: 10px;">
  10. <view class="title">
  11. {{noticeInfo.title}}
  12. </view>
  13. <view class="static">
  14. <view class="left">
  15. <view class="block">
  16. {{noticeInfo.releaseTime}}
  17. </view>
  18. </view>
  19. </view>
  20. <view class="detail">
  21. <u-parse :html="noticeInfo.content"></u-parse>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import http from '@/http/api.js';
  28. export default {
  29. data() {
  30. return {
  31. title: '公告详情页',
  32. noticeInfo: {
  33. 'title': '',
  34. 'releaseTime': '',
  35. 'content': '',
  36. }
  37. };
  38. },
  39. onLoad(options) {
  40. console.log(options.id)
  41. this.getNotice(options.id);
  42. },
  43. methods: {
  44. toBack() {
  45. uni.navigateBack({
  46. delta: 1
  47. })
  48. },
  49. getNotice(id) {
  50. const that = this;
  51. http.request({
  52. url: '/galaxy-business/notice/detail',
  53. method: 'GET',
  54. params: {
  55. 'id': id,
  56. },
  57. }).then(res => {
  58. console.log(res.data)
  59. if (res.data != null) {
  60. that.noticeInfo = res.data;
  61. }
  62. }).catch(err => {
  63. console.log(err)
  64. })
  65. },
  66. }
  67. };
  68. </script>
  69. <style lang="scss">
  70. .container {
  71. padding: 0 0 150rpx;
  72. }
  73. .right-nav {
  74. display: flex;
  75. align-items: center;
  76. margin-right: 40rpx;
  77. .icon {
  78. height: auto;
  79. &-search {
  80. width: 40rpx;
  81. margin-right: 40rpx;
  82. }
  83. &-menu {
  84. width: 40rpx;
  85. }
  86. }
  87. }
  88. .header {
  89. display: flex;
  90. align-items: center;
  91. padding: 44rpx;
  92. .avatar {
  93. flex-shrink: 0;
  94. width: 69rpx;
  95. height: 69rpx;
  96. background: #ffffff;
  97. border: 1px solid #14b9c8;
  98. border-radius: 50%;
  99. }
  100. .info {
  101. flex: 1;
  102. margin-left: 14rpx;
  103. .name {
  104. display: flex;
  105. align-items: center;
  106. font-size: 28rpx;
  107. font-family: PingFang SC;
  108. font-weight: bold;
  109. color: #000000;
  110. line-height: 36rpx;
  111. .tag {
  112. margin-left: 10rpx;
  113. display: inline-block;
  114. padding: 8rpx 10rpx;
  115. font-size: 14rpx;
  116. font-family: PingFang SC;
  117. font-weight: 500;
  118. color: #4cbeca;
  119. line-height: 21rpx;
  120. border: 1px solid #0bb9c8;
  121. border-radius: 6px;
  122. }
  123. }
  124. .date {
  125. font-size: 24rpx;
  126. font-family: PingFang SC;
  127. font-weight: 500;
  128. color: #a3a3a3;
  129. line-height: 36rpx;
  130. }
  131. }
  132. .btn {
  133. padding: 8rpx 19rpx;
  134. background: #e6e6e6;
  135. border-radius: 6rpx;
  136. font-size: 20rpx;
  137. font-family: PingFang SC;
  138. font-weight: bold;
  139. color: #4cbeca;
  140. line-height: 1;
  141. }
  142. }
  143. .content {
  144. padding: 0 44rpx;
  145. .title {
  146. font-size: 40rpx;
  147. font-family: PingFang SC;
  148. font-weight: bold;
  149. color: #000000;
  150. line-height: 47rpx;
  151. }
  152. .static {
  153. margin-top: 34rpx;
  154. display: flex;
  155. justify-content: space-between;
  156. align-items: center;
  157. .left,
  158. .right {
  159. display: flex;
  160. align-items: center;
  161. .block {
  162. display: flex;
  163. align-items: center;
  164. margin-right: 10rpx;
  165. }
  166. }
  167. .left {
  168. font-size: 20rpx;
  169. font-family: PingFang SC;
  170. font-weight: bold;
  171. color: #787878;
  172. line-height: 1;
  173. .gf {
  174. width: 24rpx;
  175. height: 24rpx;
  176. margin-right: 8rpx;
  177. }
  178. }
  179. .right {
  180. font-size: 20rpx;
  181. font-family: PingFang SC;
  182. font-weight: bold;
  183. color: #787878;
  184. line-height: 1;
  185. .l {
  186. width: 25rpx;
  187. height: auto;
  188. margin-right: 6rpx;
  189. }
  190. }
  191. }
  192. .detail {
  193. font-size: 24rpx;
  194. font-family: PingFang SC;
  195. font-weight: 500;
  196. color: #000000;
  197. line-height: 47rpx;
  198. margin-top: 50rpx;
  199. }
  200. }
  201. .footer {
  202. position: fixed;
  203. bottom: 0;
  204. left: 0;
  205. right: 0;
  206. z-index: 999;
  207. height: 100rpx;
  208. padding: 20rpx;
  209. box-sizing: border-box;
  210. display: flex;
  211. align-items: center;
  212. justify-content: center;
  213. background-color: #ffffff;
  214. .ipt {
  215. width: 380rpx;
  216. height: 77rpx;
  217. background: #f7f7f7;
  218. border-radius: 38px;
  219. padding: 0 37rpx;
  220. box-sizing: border-box;
  221. margin-right: 20rpx;
  222. }
  223. .control {
  224. flex: 1;
  225. display: flex;
  226. align-items: center;
  227. justify-content: space-around;
  228. .block {
  229. display: flex;
  230. align-items: center;
  231. justify-content: center;
  232. flex: 1;
  233. }
  234. .icon {
  235. height: auto;
  236. }
  237. .c {
  238. width: 41rpx;
  239. margin-right: 10rpx;
  240. }
  241. .s {
  242. width: 36rpx;
  243. }
  244. .t {
  245. width: 31rpx;
  246. }
  247. }
  248. }
  249. </style>