info.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="container">
  3. <view class="notice-item">
  4. <jyf-parser :html="description" ref="article"></jyf-parser>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import { details , deconstructArticle } from '@/api/info.js';
  10. import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
  11. export default{
  12. components: {
  13. jyfParser
  14. },
  15. data(){
  16. return{
  17. id:'',
  18. list:"",
  19. description:'',
  20. type:0,
  21. }
  22. },
  23. onLoad(option) {
  24. this.id = option.id;
  25. this.loadData();
  26. },
  27. methods:{
  28. loadData(){
  29. let obj = this;
  30. details({id: obj.id}).then(function(e) {
  31. obj.list = e.data;
  32. if(obj.list.content != null){
  33. obj.description = obj.list.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
  34. }//小程序商品详情图超出屏幕问题
  35. });
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. page {
  42. min-height: 100%;
  43. background:#FFFFFF;
  44. }
  45. .notice_name {
  46. font-size: 35rpx !important;
  47. color: #303133;
  48. padding: 25rpx 25rpx 0rpx 25rpx;
  49. margin-bottom: 25rpx;
  50. }
  51. .course-video{
  52. width: 100%;
  53. height: 500rpx;
  54. }
  55. .notice-item {
  56. width: 100%;
  57. height: 100%;
  58. color: #666666;
  59. padding: 35rpx 35rpx;
  60. font-size: 23rpx;
  61. padding-bottom: 30rpx;
  62. }
  63. </style>