珠宝小程序前端代码
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.

101 lines
2.1 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <!-- 更多商品 -->
  2. <template>
  3. <view class="more-commodity">
  4. <!-- 导航栏 -->
  5. <navbar title="商品" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
  6. <view class="more-commodity-header">
  7. <!-- 搜索栏 -->
  8. <view class="search">
  9. <uv-search placeholder="搜你喜欢的产品" bgColor="#fff" @search="getData" @custom="getData"
  10. v-model="queryParams.title"></uv-search>
  11. </view>
  12. <!-- 筛选过滤 -->
  13. <view class="filtration">
  14. <view v-for="(item,index) in filtrationList" :key="index"
  15. :class="{ 'filtration-acitve-item' : activeFiltration == index }" @click="changeFiltration(index)"
  16. class="filtration-item">
  17. {{ item }}
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 商品列表 -->
  22. <view class="product-list">
  23. <productList :list="list" />
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import mixinList from '@/mixins/list.js'
  29. import productList from '@/components/user/productList.vue'
  30. export default {
  31. name: "MoreCommodity",
  32. mixins: [mixinList],
  33. components: {
  34. productList
  35. },
  36. data() {
  37. return {
  38. filtrationList: ['综合', '销量', '价格', '上新'],
  39. activeFiltration: 0,
  40. mixinsListApi : "getClassShopPageList"
  41. }
  42. },
  43. methods: {
  44. //修改过滤条件
  45. changeFiltration(index) {
  46. this.activeFiltration = index;
  47. //重新获取数据逻辑
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .more-commodity {
  54. .more-commodity-header {
  55. background: white;
  56. padding: 20rpx;
  57. // 搜索栏
  58. .search {
  59. border: 1px solid #F0F0F0;
  60. border-radius: 41rpx;
  61. padding: 10rpx 20rpx;
  62. display: flex;
  63. align-items: center;
  64. /deep/ .uv-search__action {
  65. background-color: $uni-color;
  66. color: #FFFFFF;
  67. padding: 10rpx 20rpx;
  68. border-radius: 30rpx;
  69. }
  70. }
  71. // 筛选过滤
  72. .filtration {
  73. display: flex;
  74. justify-content: space-between;
  75. padding: 20rpx;
  76. .filtration-item {
  77. font-size: 28rpx;
  78. }
  79. .filtration-acitve-item {
  80. color: $uni-color;
  81. }
  82. }
  83. }
  84. // 商品列表
  85. .product-list {
  86. padding-top: 20rpx;
  87. }
  88. }
  89. </style>