fulilist.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="center">
  3. <view class="box" v-for="(item,index) in list" :key="index" @click="nav(item.id)">
  4. <view class="shopBox-top">
  5. <view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
  6. <view class="between">
  7. <text class="one">{{ item.name }}</text>
  8. </view>
  9. <view>
  10. <text class="three">查看详情</text>
  11. </view>
  12. </view>
  13. <view class="shopBox-between">
  14. <view class="number">
  15. <text class="number-left">{{ 1 * item.cost }}</text>
  16. <text class="number-right">{{ item.cost_money_type }}/份</text>
  17. </view>
  18. <view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
  19. </view>
  20. <image :src="item.background_image" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;" mode=""></image>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import { lala } from '@/api/product.js';
  26. export default {
  27. data() {
  28. return{
  29. list:[],
  30. }
  31. },
  32. onLoad() {
  33. this.loadData()
  34. },
  35. methods: {
  36. async loadData(){
  37. lala({}).then(({data}) =>{
  38. this.list = data.list.data
  39. })
  40. },
  41. nav(id) {
  42. uni.navigateTo({
  43. url: '/pages/user/fuli?id=' + id
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss">
  50. .center , page {
  51. background: #f5f5f5;
  52. }
  53. .box {
  54. margin: 20rpx auto 0;
  55. width: 690rpx;
  56. padding: 20rpx;
  57. background: #FFFFFF;
  58. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  59. border-radius: 20rpx;
  60. .shopBox-top {
  61. margin-top: 26rpx;
  62. display: flex;
  63. justify-content: flex-start;
  64. align-items: center;
  65. image {
  66. height: 46rpx;
  67. width: 48rpx;
  68. }
  69. .one {
  70. margin-left: 10rpx;
  71. font-size: 34rpx;
  72. font-family: PingFang SC;
  73. font-weight: bold;
  74. color: #0f253a;
  75. }
  76. .three {
  77. margin-left: 350rpx;
  78. color: #6D7C88;
  79. }
  80. }
  81. .shopBox-between {
  82. margin-top: 20rpx;
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. .number {
  87. .number-left {
  88. font-size: 40rpx;
  89. font-family: PingFang SC;
  90. font-weight: bold;
  91. color: #44969d;
  92. }
  93. .number-right {
  94. font-size: 24rpx;
  95. font-family: PingFang SC;
  96. font-weight: bold;
  97. color: #44969d;
  98. }
  99. }
  100. .quotient {
  101. .quotient-children {
  102. font-size: 24rpx;
  103. font-family: PingFang SC;
  104. font-weight: 500;
  105. color: #6d7c88;
  106. }
  107. }
  108. }
  109. }
  110. </style>