onedetail.vue 674 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. console.log(a);
  16. this.article_id = a.id;
  17. let name = a.name;
  18. uni.setNavigationBarTitle({
  19. title: name
  20. });
  21. this.getactrile();
  22. },
  23. methods: {
  24. getactrile() {
  25. this.request({
  26. url: '/v1/entry/news_desc',
  27. method: 'post',
  28. data: {
  29. article_id: this.article_id
  30. },
  31. success: (res) => {
  32. this.nodes = res.data.data.article_content;
  33. }
  34. })
  35. }
  36. },
  37. }
  38. </script>
  39. <style>
  40. </style>