info.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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({},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. uni.setNavigationBarTitle({
  36. title:obj.list.title
  37. })
  38. });
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. page {
  45. min-height: 100%;
  46. background:#FFFFFF;
  47. }
  48. .notice_name {
  49. font-size: 35rpx !important;
  50. color: #303133;
  51. padding: 25rpx 25rpx 0rpx 25rpx;
  52. margin-bottom: 25rpx;
  53. }
  54. .course-video{
  55. width: 100%;
  56. height: 500rpx;
  57. }
  58. .notice-item {
  59. width: 100%;
  60. height: 100%;
  61. color: #666666;
  62. padding: 35rpx 35rpx;
  63. font-size: 23rpx;
  64. padding-bottom: 30rpx;
  65. }
  66. </style>