detail.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="contents">
  3. <view class="title">
  4. <text>{{ item.title }}</text>
  5. </view>
  6. <view class="ly">
  7. <text>{{ item.author }}</text>
  8. <text class="day">4天前</text>
  9. </view>
  10. <view>
  11. <view class="fwb"><u-parse :html="item.content"></u-parse></view>
  12. <view class="mt10">
  13. <view class="">来源:作者名称</view>
  14. <view class="">编辑丨编辑名称</view>
  15. <view class="">责编丨初审名称</view>
  16. <view class="">审核丨终审名称</view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. ip: this.$http.urls.ip,
  26. item: {}
  27. };
  28. },
  29. onLoad(e) {
  30. this.$http.request({
  31. url: this.$http.urls.getContentInfo + e.id,
  32. success: res => {
  33. console.log('asd:' + JSON.stringify(res));
  34. this.item = res.data.data.info;
  35. //this.item.contents = res.data.data.contents.replace(/\<img/gi, '<img style=width:100%;height:auto');
  36. }
  37. });
  38. },
  39. methods: {}
  40. };
  41. </script>
  42. <style lang="scss">
  43. .contents {
  44. padding: 20px;
  45. .ly {
  46. font-size: 14px;
  47. margin-bottom: 15px;
  48. color: #2196f3;
  49. .day {
  50. color: #818184;
  51. padding-left: 10px;
  52. }
  53. }
  54. .title {
  55. padding-top: 20px;
  56. font-size: 23px;
  57. font-weight: 400;
  58. margin-bottom: 20px;
  59. }
  60. .pic {
  61. width: 100%;
  62. border-radius: 3px;
  63. margin-top: 3px;
  64. }
  65. .fwb {
  66. margin-top: 15px;
  67. color: #909090;
  68. }
  69. }
  70. </style>