MyForwarddetail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div class="indexbox">
  3. <p class="imgStyle">
  4. <img src="../../../assets/jiantou.png"
  5. style="width: 6vw;height: 6vw;"
  6. alt=""
  7. @click="GoUp">
  8. </p>
  9. <div>
  10. <div class="card">
  11. <div class="titile">
  12. <h2 @click="gowenzhang">{{ titile }}</h2>
  13. <p> {{ count }} 人阅读</p>
  14. </div>
  15. <img :src=acover
  16. alt="">
  17. </div>
  18. <div class="nameres">
  19. <div v-for="(item,index) in brows" :key="index">
  20. <img :src=item.avatar
  21. alt="">
  22. <p>{{ item.name }}</p>
  23. <p>{{ item.create_time }}</p>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. import { shareDetails } from "../../../../serves/prove"
  31. export default {
  32. data () {
  33. return {
  34. active: 0,
  35. brows:'',
  36. titile:'',
  37. acover:'',
  38. count:'',
  39. Tid:''
  40. }
  41. },
  42. mounted () {
  43. this.titile=this.$route.query.title
  44. this.count=this.$route.query.count
  45. this.acover=this.$route.query.cover
  46. this.Tid=this.$route.query.Tid
  47. this.getshareDetails(this.$route.query.Tid)
  48. },
  49. methods: {
  50. gowenzhang () {
  51. this.$router.push({name:'textpage',query:{id:this.$route.query.id}})
  52. },
  53. async getshareDetails (id) {
  54. const res = await shareDetails(id)
  55. this.brows=res.data.brows
  56. },
  57. //返回上级
  58. GoUp () {
  59. this.$router.go(-1)
  60. }
  61. }
  62. }
  63. </script>
  64. <style>
  65. .van-tabs__wrap {
  66. height: 3rem !important;
  67. }
  68. .van-tab {
  69. line-height: 5rem;
  70. }
  71. .van-tab__text--ellipsis {
  72. font-size: 1rem !important;
  73. }
  74. </style>
  75. <style lang="scss" scoped>
  76. .indexbox {
  77. width: 90vw;
  78. height: 100vh;
  79. margin: 0 auto;
  80. padding-top: 2rem;
  81. box-sizing: border-box;
  82. display: flex;
  83. flex-direction: column;
  84. .imgStyle {
  85. width: 90vw;
  86. height: 5vh;
  87. }
  88. hr {
  89. margin-top: 20px;
  90. border-color: rgb(255, 255, 255, 0.5);
  91. }
  92. .card {
  93. width: 100%;
  94. height: 17vw;
  95. margin-top: 1vh;
  96. margin-bottom: 5vh;
  97. box-sizing: border-box;
  98. display: flex;
  99. justify-content: space-between;
  100. border-bottom: 1px solid rgb(185, 185, 185);
  101. img {
  102. width: 30%;
  103. height: 15vw;
  104. }
  105. .titile {
  106. display: flex;
  107. justify-content: space-around;
  108. flex-direction: column;
  109. p {
  110. font-size: 0.6rem;
  111. }
  112. h2 {
  113. font-size: 1.2rem;
  114. }
  115. }
  116. }
  117. .nameres {
  118. div {
  119. width: 100%;
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. // background-color: aqua;
  124. p:nth-child(2) {
  125. flex: 1;
  126. margin-left: 5vw;
  127. line-height: 5vh;
  128. }
  129. p:nth-child(3) {
  130. line-height: 5vh;
  131. }
  132. img {
  133. width: 5vw;
  134. height: 5vw;
  135. border-radius: 50%;
  136. }
  137. }
  138. }
  139. }
  140. </style>