newbook.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="">
  3. <view class="nav">
  4. <u-icon class="back" name="arrow-left" color="#fff" size="48" @click="backHome()"></u-icon>
  5. <view class="text">
  6. <text>最新佛经</text>
  7. </view>
  8. </view>
  9. <view class="book" v-for="(item,index) in book" :key="index">
  10. <navigator url="./xiangqing">
  11. <image src="../../../static/index/jingshu/bood.png" mode=""></image>
  12. <view class="bookC">
  13. <text>{{item.name}}</text>
  14. <text class="t1">{{item.autho}}</text>
  15. <text class="t2">{{item.num+'人阅读'}}</text>
  16. </view>
  17. </navigator>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default{
  23. data(){
  24. return{
  25. book:[
  26. {name:'大方广佛华严经合论纂要卷上',autho:'明 方泽纂',num:600},
  27. {name:'大方广佛华严经合论纂要卷上',autho:'明 方泽纂',num:600},
  28. {name:'大方广佛华严经合论纂要卷上',autho:'明 方泽纂',num:600},
  29. {name:'大方广佛华严经合论纂要卷上',autho:'明 方泽纂',num:600},
  30. {name:'大方广佛华严经合论纂要卷上',autho:'明 方泽纂',num:600}
  31. ]
  32. }
  33. },
  34. methods:{
  35. backHome() {
  36. uni.navigateBack({
  37. delta: 1
  38. });
  39. },
  40. },
  41. }
  42. </script>
  43. <style>
  44. .nav {
  45. position: sticky;
  46. top: 0;
  47. z-index: 9;
  48. width: 100%;
  49. height: 100rpx;
  50. background-color: #ff8359;
  51. color: #fff;
  52. font-size: 45rpx;
  53. font-weight: 600;
  54. }
  55. .nav .back {
  56. height: 100rpx;
  57. width: 15%;
  58. position: absolute;
  59. text-align: center;
  60. }
  61. .nav .back text {
  62. line-height: 100rpx;
  63. }
  64. .nav .text {
  65. position: absolute;
  66. height: 100rpx;
  67. width: 70%;
  68. left: 15%;
  69. }
  70. .nav .text text {
  71. line-height: 100rpx;
  72. }
  73. .nav .menu {
  74. position: absolute;
  75. width: 15%;
  76. height: 100rpx;
  77. left: 85%;
  78. }
  79. .nav .menu image {
  80. height: 100rpx;
  81. width: 100%;
  82. }
  83. .book {
  84. margin-top: 30rpx;
  85. margin-bottom: 30rpx;
  86. position: relative;
  87. width: 94%;
  88. margin-left: 3%;
  89. }
  90. .book image {
  91. background-color: #000000;
  92. width: 150rpx;
  93. height: 200rpx;
  94. }
  95. .book .bookC {
  96. position: absolute;
  97. top: 0;
  98. left: 200rpx;
  99. display: flex;
  100. font-size: 35rpx;
  101. line-height: 2;
  102. flex-direction: column;
  103. }
  104. .book .bookC .t1,
  105. .book .bookC .t2 {
  106. color: #ccc;
  107. }
  108. </style>