index.vue 491 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <view class="box"><rich-text :nodes="data"></rich-text></view>
  3. </template>
  4. <script>
  5. import { ptDetail, ptJoin } from '@/api/tp.js';
  6. export default {
  7. data() {
  8. return {
  9. data: ''
  10. };
  11. },
  12. onLoad(res) {
  13. this.ptDetail();
  14. },
  15. methods: {
  16. // 请求返回项目数据
  17. ptDetail() {
  18. ptDetail()
  19. .then(e => {
  20. this.data = e.data.detail;
  21. })
  22. .catch(e => {
  23. console.log();
  24. });
  25. }
  26. }
  27. };
  28. </script>
  29. <style lang="scss">
  30. .box {
  31. padding: 0 30rpx;
  32. }
  33. </style>