aftersale.vue 795 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/cm-module/listTemplate/richTextTemplate'
  8. export default{
  9. components: {
  10. richTextTemplate
  11. },
  12. data() {
  13. return{
  14. serverUrl: '',
  15. type: 'afterSale'
  16. }
  17. },
  18. onLoad(){
  19. this.initData();
  20. },
  21. methods:{
  22. initData(){
  23. this.CommonService.QueryAfterSale().then(response =>{
  24. let _data =response.data,
  25. type = this.type;
  26. if(type) {
  27. let html = this.$api.adaptRichTextImg(_data[type]);
  28. this.$refs.childTemplate.html = html;
  29. }
  30. }).catch(error =>{
  31. this.$util.msg(error.msg,2000);
  32. })
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. </style>