privacyagree.vue 969 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. 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 = 'afterSale';
  21. this.initData();
  22. },
  23. methods:{
  24. initData(){
  25. let self = this;
  26. self.$api.get(self.serverUrl,{organizeID:self.userOrganizeID}, response => {
  27. if (response.code == "1") {
  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. } else {
  35. uni.showToast({icon:'none', title: response.msg, duration: 2000});
  36. }
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. </style>