耀实惠小程序
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.

100 lines
1.9 KiB

  1. <template>
  2. <view>
  3. <view class="search_box">
  4. <u-search height="80" placeholder="日照香炉生紫烟" @click="search_info" @custom="search_info" v-model="search_text"></u-search>
  5. </view>
  6. <view class="hot_search">
  7. <view class="title_box">
  8. <text class="title">热门搜索</text>
  9. <!-- <image class="hot" src="../../../static/hot.png" mode=""></image> -->
  10. </view>
  11. <view class="item_box">
  12. <view class="item" v-for="(item,index) in hot_list" :key="index">
  13. <text>{{item}}</text>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. search_text: '',
  24. hot_list: [
  25. "儿童感冒药",
  26. "退烧药",
  27. "儿童消毒液",
  28. "消炎药",
  29. "儿童感冒药",
  30. "退烧药",
  31. "儿童消毒液",
  32. "消炎药",
  33. "儿童感冒药",
  34. "退烧药",
  35. "儿童消毒液",
  36. "消炎药",
  37. ]
  38. }
  39. },
  40. methods: {
  41. search_info() {
  42. // 搜索信息
  43. },
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .search_box{
  49. margin-top: 25rpx;
  50. margin-left: 15rpx;
  51. margin-right: 24rpx;
  52. /deep/ .u-content{
  53. box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16);
  54. }
  55. }
  56. .hot_search{
  57. margin-top: 32rpx;
  58. margin-left: 32rpx;
  59. margin-right: 30rpx;
  60. .title_box{
  61. display: flex;
  62. .title{
  63. padding-top: 12rpx;
  64. padding-right: 15rpx;
  65. font-size: 30rpx;
  66. font-weight: bold;
  67. }
  68. .hot{
  69. width: 31rpx;
  70. height: 42rpx;
  71. }
  72. }
  73. .item_box{
  74. margin-top: 24rpx;
  75. display: flex;
  76. flex-wrap: wrap;
  77. .item{
  78. padding-top: 18rpx;
  79. padding-bottom: 18rpx;
  80. padding-left: 30rpx;
  81. padding-right: 30rpx;
  82. margin-bottom: 39rpx;
  83. border-radius: 31rpx;
  84. background-color: #F5F5F5;
  85. box-sizing: border-box;
  86. font-size: 20rpx;
  87. margin-right: 36rpx;
  88. text{
  89. color: #707070;
  90. }
  91. &:nth-child(4n) {
  92. margin-right: 0;
  93. }
  94. }
  95. }
  96. }
  97. </style>