news-detailes.vue 886 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. var self
  9. export default{
  10. components: {
  11. richTextTemplate
  12. },
  13. data() {
  14. return{
  15. serverUrl: '',
  16. type: 'introduction'
  17. }
  18. },
  19. onLoad(option){
  20. this.GetNewsCapacity(option.id)
  21. },
  22. methods:{
  23. GetNewsCapacity(id){
  24. this.CommonService.GetNewsCapacity({id:id}).then(response =>{
  25. let data =response.data
  26. let html = this.$api.adaptRichTextImg(data.capacity)
  27. this.$refs.childTemplate.html = html
  28. uni.setNavigationBarTitle({title:data.title})
  29. }).catch(error =>{
  30. this.$util.msg(error.msg,2000)
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. page{
  38. background-color: #FFFFFF;
  39. }
  40. </style>