shoppingnotice.vue 860 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. this.CommonService.QueryAfterSale().then(response =>{
  26. let _data =response.data;
  27. let type = this.type;
  28. if(type) {
  29. let html = this.$api.adaptRichTextImg(_data[type]);
  30. this.$refs.childTemplate.html = html;
  31. }
  32. }).catch(error =>{
  33. this.$util.msg(error.msg,2000);
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. </style>