about.vue 844 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="container clearfix rich-text-temp">
  3. <rich-text-template ref="childTemplate"></rich-text-template>
  4. </view>
  5. </template>
  6. <script>
  7. import richTextTemplate from '@/components/module/listTemplate/richTextTemplate'
  8. import { queryAfterSale } from "@/api/other.js"
  9. var self;
  10. export default{
  11. components: {
  12. richTextTemplate
  13. },
  14. data() {
  15. return{
  16. serverUrl: '',
  17. type: 'introduction'
  18. }
  19. },
  20. onLoad(){
  21. this.initData()
  22. },
  23. methods:{
  24. initData(){
  25. queryAfterSale().then(response =>{
  26. let _data =response.data,
  27. type = this.type;
  28. if(type) {
  29. let html = this.$api.adaptRichTextImg(_data[type]);
  30. this.$refs.childTemplate.html = html;
  31. }
  32. }).catch(response =>{
  33. this.$util.msg(response.msg,2000);
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. </style>