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

69 lines
1.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
12 months 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. let obj = {a: 1}
  29. },
  30. methods: {
  31. async getarticleFn() {
  32. const {data: res} = await getarticle({id: this.id})
  33. this.detailInfo = res
  34. console.log(res)
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .pageBgImg {
  41. min-height: 100vh;
  42. .card {
  43. padding: 28rpx 24rpx;
  44. .tit {
  45. font-size: 28rpx;
  46. font-weight: 550;
  47. }
  48. .h2 {
  49. margin: 8rpx 0 42rpx 0;
  50. color: #686B73;
  51. font-size: 24rpx;
  52. }
  53. .content {
  54. padding: 28rpx 0;
  55. }
  56. .date {
  57. padding: 72rpx 0 40rpx 0;
  58. font-size: 20rpx;
  59. color: #686B73;
  60. }
  61. }
  62. }
  63. </style>