sellconten.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. type: '',
  15. id:''
  16. }
  17. },
  18. onLoad(option){
  19. this.type = 'afterSale';
  20. this.id= option.clauseId
  21. this.initData();
  22. },
  23. methods:{
  24. initData(){
  25. let self = this;
  26. this.OtherService.QuerySaveClause({clauseId:this.id}).then(response =>{
  27. let data =response.data.content
  28. self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
  29. }).catch(error =>{
  30. this.$util.msg(error.msg,2000)
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. .container{
  38. background: #fff;
  39. }
  40. .rich-text-temp rich-text.h4, .rich-text-temp rich-text.p {
  41. color: #666666;
  42. }
  43. .rich-text-temp rich-text.h4, .rich-text-temp rich-text.p:nth-child(1) {
  44. color: #333333;
  45. text-align: center;
  46. font-weight: bold;
  47. }
  48. </style>