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