1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <template>
- <view class="container clearfix rich-text-temp">
- <rich-text-template ref="childTemplate"></rich-text-template>
- </view>
- </template>
- <script>
- import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
- export default{
- components: {
- richTextTemplate
- },
- data() {
- return{
- serverUrl: '',
- type: ''
- }
- },
- onLoad(){
- this.serverUrl = '/home/afterSale';
- this.type = 'shoppingNotes';
- this.initData();
- },
- methods:{
- initData(){
- let self = this;
- this.CommonService.QueryAfterSale().then(response =>{
- let _data =response.data,
- type = self.type;
- if(type) {
- let html = self.$api.adaptRichTextImg(_data[type]);
- self.$refs.childTemplate.html = html;
- }
- }).catch(error =>{
- this.$util.msg(error.msg,2000);
- })
- }
- }
- }
- </script>
- <style lang="scss">
- </style>
|