storyDetail.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="" mode=""></image>
  5. </view>
  6. <view class="detail">
  7. <view class="detail-top">
  8. <view class="tit">
  9. 正一健康竹胎酵素饮正一健康竹胎酵素饮正
  10. </view>
  11. <view class="time">
  12. 更新时间:2019-12-06
  13. </view>
  14. </view>
  15. <view class="jg">
  16. </view>
  17. <view class="detail-content" v-html="content">
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import {article,details} from '@/api/index.js'
  24. export default {
  25. data() {
  26. return {
  27. content: '正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正',
  28. detail: {},
  29. }
  30. },
  31. onLoad(opt) {
  32. if(opt.id) {
  33. this.getDetail(opt.id)
  34. }
  35. },
  36. methods: {
  37. getDetail(id) {
  38. let obj = this
  39. details({},id).then( res => {
  40. obj.content = res.data.content
  41. obj.detail = res.data
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. page {
  49. height: 100%;
  50. }
  51. .content {
  52. background-color: #fff;
  53. height: 100%;
  54. .top {
  55. width: 750rpx;
  56. height: 668rpx;
  57. image {
  58. width: 100%;
  59. height: 100%;
  60. background-color: #999;
  61. }
  62. }
  63. .detail {
  64. position: relative;
  65. top: -57rpx;
  66. .jg {
  67. width: 670rpx;
  68. height: 2rpx;
  69. background: #F5F5F5;
  70. margin: auto;
  71. }
  72. .detail-top {
  73. min-height: 190rpx;
  74. padding: 57rpx 40rpx 40rpx;
  75. background-color: #fff;
  76. border-radius: 30rpx 30rpx 0 0;
  77. .tit {
  78. font-size: 48rpx;
  79. font-family: PingFang SC;
  80. font-weight: 500;
  81. color: #333333;
  82. line-height: 51rpx;
  83. }
  84. .time {
  85. padding-top: 10rpx;
  86. font-size: 26rpx;
  87. font-family: PingFang SC;
  88. font-weight: 500;
  89. color: #999;
  90. line-height: 51rpx;
  91. }
  92. }
  93. .detail-content {
  94. font-size: 28rpx;
  95. font-family: PingFang SC;
  96. font-weight: 500;
  97. color: #333333;
  98. line-height: 48rpx;
  99. padding: 37rpx 40rpx;
  100. * {
  101. max-width: 100%;
  102. }
  103. }
  104. }
  105. }
  106. </style>