shoppingnotice.vue 911 B

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