compound_history.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="container index">
  3. <nav-header>合成记录</nav-header>
  4. <!-- //数据列表 -->
  5. <view class="content">
  6. <view class="item" v-for="(item,index) in list" :key="index">
  7. <view class="">
  8. <view class="">
  9. <image :src="item.img" mode="" style="width: 140rpx;height: 140rpx;border-radius: 24rpx;">
  10. </image>
  11. </view>
  12. <view class="">
  13. <view class="">
  14. 合成-{{item.name}}
  15. </view>
  16. <view class="">
  17. 合成时间:{{item.time}}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="nothing" v-if="list.length <= 0" style="width: 304rpx;margin: 156rpx auto 0;">
  24. <view class="">
  25. <image src="/static/shoping/8.png" mode="widthFix" style="width: 304rpx;"></image>
  26. </view>
  27. <view class="" style="text-align: center;
  28. color: #999999;
  29. font-size: 28rpx;">
  30. 暂无数据
  31. </view>
  32. </view>
  33. <!-- //数据列表 结束-->
  34. </view>
  35. </template>
  36. <script>
  37. import navHeader from "@/components/my/nav_header.vue"
  38. export default {
  39. components: {
  40. navHeader
  41. },
  42. data() {
  43. return {
  44. list: [],
  45. page: 0
  46. }
  47. },
  48. onLoad() {
  49. this.get_compound_history()
  50. },
  51. methods: {
  52. get_compound_history() {
  53. this.api.compound_history(30, ++this.page).then(res => {
  54. res.data.data.forEach(ele => {
  55. this.list.push({
  56. img: ele.cover,
  57. name: ele.name,
  58. time: ele.create_at
  59. })
  60. })
  61. console.log(res)
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style scoped lang="less">
  68. .index {
  69. box-sizing: border-box;
  70. padding-top: 100rpx;
  71. }
  72. .content {
  73. margin: 0 auto;
  74. width: 710rpx;
  75. }
  76. .item {
  77. width: 710rpx;
  78. height: 148rpx;
  79. background: fff;
  80. border-radius: 24rpx;
  81. display: flex;
  82. justify-content: flex-end;
  83. margin-top: 30rpx;
  84. }
  85. .item>view {
  86. align-self: center;
  87. width: 702rpx;
  88. height: 140rpx;
  89. background:#1D1F1E;
  90. border-radius: 24rpx;
  91. display: flex;
  92. }
  93. .item>view>view:last-child {
  94. box-sizing: border-box;
  95. padding-top: 18rpx;
  96. padding-bottom: 16rpx;
  97. padding-left: 30rpx;
  98. display: flex;
  99. flex-direction: column;
  100. justify-content: space-between;
  101. }
  102. .item>view>view:last-child>view:last-child {
  103. font-size: 24rpx;
  104. letter-spacing: 2rpx;
  105. }
  106. .item>view>view:last-child>view:first-child {
  107. font-size: 32rpx;
  108. font-weight: bold;
  109. }
  110. .nothing {
  111. width: 304rpx;
  112. margin: 156rpx auto 0;
  113. >view:last-child {
  114. text-align: center;
  115. color: #999999;
  116. font-size: 28rpx;
  117. }
  118. }
  119. </style>