金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
1.8 KiB

4 years ago
  1. <template>
  2. <view class="content">
  3. <view class="title" @click="$url('/pages/index/category/category')">大牌不停推</view>
  4. <view class="flex-box">
  5. <view class="item" v-for="(item, index) in 16" :key="index" @click="$url('/pages/shop/shopdetail')">
  6. <image class="bg-img" src="https://picsum.photos/200/300"></image>
  7. <view class="shop">
  8. <image src="../../static/images/empty.png"></image>
  9. <view class="lf-line-1">DIOR迪奥</view>
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data(){
  18. return {
  19. }
  20. },
  21. created(){
  22. },
  23. methods: {
  24. }
  25. }
  26. </script>
  27. <style lang="scss" scoped="scoped">
  28. .content{
  29. width: 750rpx;
  30. height: max-content;
  31. box-sizing: border-box;
  32. padding: 60rpx 32rpx 0;
  33. .title{
  34. font-size: 36rpx;
  35. font-weight: bold;
  36. text-align: center;
  37. color: #222222;
  38. margin-bottom: 30rpx;
  39. }
  40. .flex-box{
  41. display: flex;
  42. flex-wrap: wrap;
  43. .item{
  44. width: 165rpx;
  45. height: 165rpx;
  46. border: 1rpx solid #979797;
  47. margin-right: 9rpx;
  48. position: relative;
  49. &:nth-child(4n){
  50. margin-right: 0rpx;
  51. }
  52. &:nth-child(n+5){
  53. margin-top: 8rpx;
  54. }
  55. .bg-img{
  56. position: absolute;
  57. top: 0;
  58. left: 0;
  59. width: 100%;
  60. height: 100%;
  61. }
  62. .shop{
  63. width: 100%;
  64. height: 100%;
  65. background-color: rgba(0,0,0,0.1);
  66. display: flex;
  67. flex-direction: column;
  68. justify-content: center;
  69. align-items: center;
  70. position: relative;
  71. z-index: 2;
  72. &>image{
  73. width: 70rpx;
  74. height: 70rpx;
  75. border-radius: 50%;
  76. background-color: #FFFFFF;
  77. }
  78. &>view{
  79. font-size: 24rpx;
  80. color: #FFFFFF;
  81. margin-top: 4rpx;
  82. width: 100%;
  83. text-align: center;
  84. }
  85. }
  86. }
  87. }
  88. }
  89. </style>