景徳镇旅游微信小程序
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.

97 lines
1.7 KiB

9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="文创好物" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="search">
  5. <uv-search placeholder="请输入搜索服务" :showAction="false" search-icon-size="40rpx" v-model="keyword"></uv-search>
  6. </view>
  7. <view class="dropDown">
  8. <uv-tabs :list="tabs" lineColor="#B12026" lineHeight="8rpx" lineWidth="50rpx" :scrollable="false"
  9. @click="clickTabs"></uv-tabs>
  10. </view>
  11. <view class="list">
  12. <productList :list="list" />
  13. </view>
  14. <cartAction />
  15. <tabber />
  16. </view>
  17. </template>
  18. <script>
  19. import cartAction from '../components/product/cartAction.vue'
  20. import productList from '../components/product/productList.vue'
  21. export default {
  22. components: {
  23. productList,
  24. cartAction,
  25. },
  26. data() {
  27. return {
  28. tabs: [{
  29. name: '综合'
  30. },
  31. {
  32. name: '销量'
  33. },
  34. {
  35. name: '价格'
  36. },
  37. {
  38. name: '上新'
  39. },
  40. ],
  41. queryParams: {
  42. pageNo: 1,
  43. pageSize: 10,
  44. },
  45. list: [],
  46. state: 0,
  47. }
  48. },
  49. onShow() {
  50. this.getProductList()
  51. },
  52. methods: {
  53. //点击tab栏
  54. clickTabs(index) {
  55. if (index == 0) {
  56. this.queryParams.state = -1;
  57. } else {
  58. this.queryParams.state = index - 1;
  59. }
  60. // this.getOrderList()
  61. },
  62. getProductList() {
  63. this.$api('queryWaresList', this.queryParams,
  64. res => {
  65. if (res.code == 200) {
  66. this.list = res.result
  67. console.log(this.list);
  68. }
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style scoped lang="scss">
  75. .page {
  76. .search {
  77. background-color: #fff;
  78. padding: 20rpx 30rpx;
  79. /deep/ .uv-search__content__icon {
  80. padding: 15rpx 0;
  81. }
  82. }
  83. .dropDown {
  84. background-color: #fff;
  85. }
  86. .list {
  87. padding: 0 20rpx;
  88. }
  89. }
  90. </style>