敢为人鲜小程序前端代码仓库
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.

104 lines
2.1 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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. onLoad(args) {
  37. },
  38. data() {
  39. return {
  40. filtrationList: ['综合', '销量', '价格', '上新'],
  41. activeFiltration: 0,
  42. mixinsListApi: "getClassShopPageList"
  43. }
  44. },
  45. methods: {
  46. //修改过滤条件
  47. changeFiltration(index) {
  48. this.activeFiltration = index;
  49. //重新获取数据逻辑
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .more-commodity {
  56. .more-commodity-header {
  57. background: white;
  58. padding: 20rpx;
  59. // 搜索栏
  60. .search {
  61. border: 1px solid #F0F0F0;
  62. border-radius: 41rpx;
  63. padding: 10rpx 20rpx;
  64. display: flex;
  65. align-items: center;
  66. /deep/ .uv-search__action {
  67. background-color: $uni-color;
  68. color: #FFFFFF;
  69. padding: 10rpx 20rpx;
  70. border-radius: 30rpx;
  71. }
  72. }
  73. // 筛选过滤
  74. .filtration {
  75. display: flex;
  76. justify-content: space-between;
  77. padding: 20rpx;
  78. .filtration-item {
  79. font-size: 28rpx;
  80. }
  81. .filtration-acitve-item {
  82. color: $uni-color;
  83. }
  84. }
  85. }
  86. // 商品列表
  87. .product-list {
  88. padding-top: 20rpx;
  89. }
  90. }
  91. </style>