index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="inputBox">
  5. <img src="../../static/img/icon_search.png" alt="" class="searchImg">
  6. <input v-model="vin" type="text" placeholder="请输入17位车架号查询" class="topInput" @confirm="inputconfirm">
  7. <image src="../../static/img/icon_close.png" class="searchClose" v-if="vin!=''"
  8. @click="clear"></image>
  9. <!-- <image src="../../static/img/icon_camera.png" mode="" class="cameraImg"></image> -->
  10. </view>
  11. </view>
  12. <view class="history">
  13. <view class="historyTop">
  14. <view class="historyTopTxt">示例数据</view>
  15. <!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
  16. </view>
  17. <view v-for="(item,index) in 1" class="historyLIneBox">
  18. <view class="historyLIne" @click="gogroup2('LVHRE4877A5013603')">LVHRE4877A5013603</view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. vin: ''
  28. }
  29. },
  30. onLoad() {
  31. },
  32. methods: {
  33. clear(){
  34. this.vin = ''
  35. this.$emit('search','');
  36. },
  37. inputconfirm(){
  38. console.log(this.vin)
  39. if (this.vin.length != 17) {
  40. uni.showToast({
  41. title: '请输入正确VIN',
  42. icon: 'none',
  43. duration: 3000
  44. });
  45. return;
  46. }
  47. this.gogroup()
  48. },
  49. gogroup(){
  50. uni.navigateTo({
  51. url:'group?vin='+this.vin
  52. })
  53. },
  54. gogroup2(vin){
  55. uni.navigateTo({
  56. url:'group?vin='+vin
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style scoped>
  63. .comment{
  64. padding-bottom: constant(safe-area-inset-bottom);
  65. padding-bottom: env(safe-area-inset-bottom);
  66. }
  67. .top{
  68. height: 96rpx;
  69. border-bottom: 1px solid #EEEEEE;
  70. padding-top: 24rpx;
  71. }
  72. .searchImg{
  73. width: 40rpx;
  74. height: 40rpx;
  75. margin-top: 16rpx;
  76. margin-left: 20rpx;
  77. }
  78. .inputBox{
  79. width: 702rpx;
  80. height: 72rpx;
  81. background: #F4F5F7;
  82. border-radius: 36rpx;
  83. margin-left: 24rpx;
  84. display:flex;
  85. position: relative;
  86. }
  87. .topInput{
  88. font-size: 28rpx;
  89. height: 72rpx;
  90. line-height: 72rpx;
  91. padding-left: 16rpx;
  92. width: 500rpx;
  93. }
  94. .searchClose {
  95. position: absolute;
  96. width: 36rpx;
  97. height: 36rpx;
  98. right: 36rpx;
  99. top: 20rpx;
  100. }
  101. .cameraImg{
  102. position: absolute;
  103. width: 40rpx;
  104. height: 40rpx;
  105. top: 16rpx;
  106. right: 20rpx;
  107. }
  108. .history{
  109. padding: 24rpx;
  110. }
  111. .historyTop{
  112. display: flex;
  113. justify-content: space-between;
  114. }
  115. .historyDelImg{
  116. width: 34rpx;height: 34rpx;
  117. }
  118. .historyTopTxt{
  119. font-size: 28rpx;
  120. font-weight: 400;
  121. color: #666666;
  122. line-height: 34rpx;
  123. }
  124. .historyLIne{
  125. color: #333333;font-size: 24rpx;
  126. height: 64rpx;
  127. background: #F4F5F7;
  128. border-radius: 32rpx;
  129. line-height: 64rpx;
  130. padding: 0 24rpx;
  131. margin-top: 20rpx;
  132. }
  133. .historyLIneBox{
  134. display: flex;
  135. }
  136. </style>