index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="body">
  3. <view class="search">
  4. <p>
  5. <image style="width: 5vw; height: 5vw; margin-top: 1vw; " src="../../static/search.png"></image>
  6. </p>
  7. <p style="margin-left: 2vw;"> <input style="font-size: 0.75rem; width: 60vw; height: 10vw;" v-model="StoreName"
  8. type="text" name="" id="" @input="getStore" placeholder="搜索门店"> </p>
  9. </view>
  10. <view class="content_up">
  11. <view
  12. style=" width: 100vw; height: 7vw; font-size: 0.9rem; font-weight: 550; padding-left: 8vw; padding-top: 2vw;">
  13. 门店
  14. </view>
  15. <!-- <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refresherTriggered"
  16. @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolowerEvent(event)"
  17. lower-threshold="100">
  18. </scroll-view> -->
  19. <view class="content_con">
  20. <view class="model" v-for="(item,index) in StoreList " :key="index" @click="goDetial(item)">
  21. <view style="display: flex;">
  22. <view> <image style="width: 25vw; height: 25vw;" :src="item.img.url" mode=""></image> </view>
  23. <view style="width: 63vw; box-sizing: border-box; padding-left:3vw;">
  24. <p style="font-size: 0.9rem; font-weight: 550;">{{item.name}}</p>
  25. <view style=" font-size: 0.8rem; margin-top: 2vw;"> <span style="color: #696969;" >主营品牌:</span> <span style="color: #696969;">大众</span> </view>
  26. <view style="display: flex; margin-left: -2vw; margin-top: 2vw;">
  27. <p> <image style="width: 3vw; height: 3vw;" src="../../static/dingwei.png" mode=""></image> </p>
  28. <p style=" width: 60vw; display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical; font-size: 0.75rem; color: #696969;">{{item.addr}}</p>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default{
  39. data(){
  40. return{
  41. StoreList:[],
  42. StoreName:''
  43. }
  44. },
  45. onTabItemTap(e){
  46. this.getStore()
  47. },
  48. methods:{
  49. goDetial(item){
  50. uni.navigateTo({
  51. url:'/pages/serve/detial?detialInfo='+encodeURIComponent(JSON.stringify(item))
  52. })
  53. },
  54. getStore(){
  55. this.$api.getStoreList(this.StoreName,res=>{
  56. this.StoreList=res.data
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .body{
  64. width: 100vw;
  65. height: 100vh;
  66. background-color: #f8f8f8;
  67. box-sizing: border-box;
  68. padding: 0 4vw;
  69. overflow: hidden;
  70. .search {
  71. box-sizing: border-box;
  72. padding: 0 4vw;
  73. width: 90vw;
  74. height: 12vw;
  75. border-radius: 7vw;
  76. background-color: white;
  77. display: flex;
  78. margin-top: 1vw;
  79. align-items: center;
  80. }
  81. .content_up {
  82. width: 92vw;
  83. height: 93vh;
  84. .content_con {
  85. width: 92vw;
  86. height: 92vh;
  87. overflow-y: auto;
  88. .model{
  89. width: 92vw;
  90. height: 29vw;
  91. background-color: white;
  92. box-sizing: border-box;
  93. padding: 2vw;
  94. border-radius: 5px;
  95. margin-top: 1vw;
  96. }
  97. }
  98. }
  99. }
  100. </style>