学员端小程序
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.

67 lines
1.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title=" "></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="tit">{{detailInfo.title}}</view>
  7. <!-- <view class="h2">二级标题二级标题二级标题二级标题二级标题二级标题</view> -->
  8. <view class="content">
  9. <rich-text :nodes="detailInfo.mainBody" ></rich-text>
  10. </view>
  11. <view class="date">发布时间{{ $u.timeFormat(detailInfo.createTime, 'yyyy/mm/dd') }}</view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import { getarticle } from '@/config/api.js'
  18. export default {
  19. data() {
  20. return {
  21. id: '',
  22. detailInfo: {}
  23. }
  24. },
  25. onLoad(options) {
  26. this.id = options.id
  27. this.getarticleFn()
  28. },
  29. methods: {
  30. async getarticleFn() {
  31. const {data: res} = await getarticle({id: this.id})
  32. this.detailInfo = res
  33. console.log(res)
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .pageBgImg {
  40. min-height: 100vh;
  41. .card {
  42. padding: 28rpx 24rpx;
  43. .tit {
  44. font-size: 28rpx;
  45. font-weight: 550;
  46. }
  47. .h2 {
  48. margin: 8rpx 0 42rpx 0;
  49. color: #686B73;
  50. font-size: 24rpx;
  51. }
  52. .content {
  53. padding: 28rpx 0;
  54. }
  55. .date {
  56. padding: 72rpx 0 40rpx 0;
  57. font-size: 20rpx;
  58. color: #686B73;
  59. }
  60. }
  61. }
  62. </style>