dyjj.vue 779 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="content">
  3. <view class="" v-html="info.introduce" v-if="info.introduce" style="text-align: justify;padding: 20rpx;">
  4. </view>
  5. </view>
  6. </template>
  7. <script>
  8. import {
  9. enDetails
  10. } from '@/api/user.js';
  11. export default {
  12. data() {
  13. return {
  14. id: 0,
  15. info: {}
  16. }
  17. },
  18. onLoad(opt) {
  19. if(opt.id) {
  20. this.id = opt.id
  21. }
  22. this.getJJ()
  23. },
  24. methods: {
  25. getJJ() {
  26. enDetails({
  27. id: this.id,
  28. page: 1,
  29. rows: 1
  30. }).then(({
  31. data
  32. }) => {
  33. this.info = data.content.list[0];
  34. if (this.info.introduce) {
  35. this.info.introduce = this.info.introduce.replace(/<img/g,
  36. "<img style='max-width:100%;height:auto;'")
  37. }
  38. });
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. </style>