info.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 {
  10. weixindata
  11. } from '@/utils/wxAuthorized.js';
  12. import {
  13. details,
  14. deconstructArticle
  15. } from '@/api/info.js';
  16. import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
  17. export default {
  18. components: {
  19. jyfParser
  20. },
  21. data() {
  22. return {
  23. id: '',
  24. list: "",
  25. description: '',
  26. type: 0,
  27. }
  28. },
  29. onLoad(option) {
  30. this.id = option.id;
  31. this.loadData();
  32. },
  33. methods: {
  34. IndexShare() {
  35. },
  36. loadData() {
  37. let obj = this;
  38. details({
  39. id: obj.id
  40. }).then(function(e) {
  41. obj.list = e.data;
  42. if (obj.list.content != null) {
  43. obj.description = obj.list.content.replace(/<img/g,
  44. "<img style='max-width:100%;height:auto;'");
  45. } //小程序商品详情图超出屏幕问题、
  46. uni.setNavigationBarTitle({
  47. title: obj.list.title
  48. })
  49. let item = {
  50. link: obj.$store.state.baseURL + '/index/#/pages/applic/info?id=' + obj.id, // 分享链接
  51. imgUrl: obj.$store.state.baseURL + '/index/static/img/002.png',
  52. desc: obj.list.title,
  53. title: '荆州市红十字会',
  54. success: console.log('分享加载成功')
  55. };
  56. console.log('分享加', item);
  57. weixindata(item);
  58. });
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. page {
  65. min-height: 100%;
  66. background: #FFFFFF;
  67. }
  68. .notice_name {
  69. font-size: 35rpx !important;
  70. color: #303133;
  71. padding: 25rpx 25rpx 0rpx 25rpx;
  72. margin-bottom: 25rpx;
  73. }
  74. .course-video {
  75. width: 100%;
  76. height: 500rpx;
  77. }
  78. .notice-item {
  79. width: 100%;
  80. height: 100%;
  81. color: #666666;
  82. padding: 35rpx 35rpx;
  83. font-size: 23rpx;
  84. padding-bottom: 30rpx;
  85. }
  86. </style>