onedetail.vue 655 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view style="padding: 20upx 32upx;">
  3. <rich-text :nodes="nodes"></rich-text>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. article_id: '',
  11. nodes:''
  12. }
  13. },
  14. onLoad(a) {
  15. this.article_id = a.id;
  16. let name = a.name;
  17. uni.setNavigationBarTitle({
  18. title: name
  19. });
  20. this.getactrile();
  21. },
  22. methods: {
  23. getactrile() {
  24. this.request({
  25. url: '/v1/entry/news_desc',
  26. method: 'post',
  27. data: {
  28. article_id: this.article_id
  29. },
  30. success: (res) => {
  31. this.nodes = res.data.data.article_content;
  32. }
  33. })
  34. }
  35. },
  36. }
  37. </script>
  38. <style>
  39. </style>