SelectCarTwo.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class="box">
  3. <!-- 自定义导航 -->
  4. <view class="zdyNavBox">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="zdyNav">
  7. <view class="zdyNavLeft">
  8. <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
  9. </image>
  10. </view>
  11. <view class="zdyNavTitle">{{title}}</view>
  12. <view class="zdyNavRight" @click="goOemSearch">OEM搜索</view>
  13. <!-- <view style="width: 10rpx;"></view> -->
  14. </view>
  15. </view>
  16. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  17. <view style="height: 44px;"></view>
  18. <!-- 搜索 -->
  19. <view class="searchBoxBg">
  20. <searchBox placeholder="搜索车型" @search='search($event)'></searchBox>
  21. </view>
  22. <view class="cangBox" v-for="(item,index) in cangList" :key="index">
  23. <view class="cangTitle">一汽大众</view>
  24. <view @click="goSelectCarThree()" class="xingBox" v-for="(item,index) in xingList" :key="index">
  25. <view class="xing">迈腾</view>
  26. <image src="../../static/img/rightArrow.png" mode="" style="width: 12rpx; height: 20rpx"></image>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import searchBox from '@/components/searchBox/searchBox.vue'
  33. export default {
  34. components: {
  35. searchBox
  36. },
  37. data() {
  38. return {
  39. title: '大众',
  40. iStatusBarHeight: '',
  41. searchValue: '',
  42. cangList: [1, 2],
  43. xingList: [1, 2, 3, 4, 5],
  44. }
  45. },
  46. onLoad() {
  47. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  48. },
  49. methods: {
  50. search(val) {
  51. // console.log(val);
  52. this.searchValue = val
  53. },
  54. goSelectCarThree(){
  55. uni.navigateTo({
  56. url: 'SelectCarThree'
  57. })
  58. },
  59. goOemSearch() {
  60. uni.navigateTo({
  61. url: 'OemSearch'
  62. })
  63. },
  64. goback() {
  65. console.log('返回');
  66. uni.navigateBack({})
  67. },
  68. }
  69. }
  70. </script>
  71. <style>
  72. .box {
  73. min-height: 100vh;
  74. background: #ffffff;
  75. padding-bottom: constant(safe-area-inset-bottom);
  76. padding-bottom: env(safe-area-inset-bottom);
  77. }
  78. .zdyNavBox {
  79. width: 100vw;
  80. background: #FFFFFF;
  81. position: fixed;
  82. top: 0;
  83. left: 0;
  84. z-index: 9999999;
  85. }
  86. .zdyNav {
  87. height: 44px;
  88. display: flex;
  89. justify-content: space-between;
  90. align-items: center;
  91. }
  92. .backImg {
  93. width: 44rpx;
  94. height: 44rpx;
  95. margin-left: 10rpx;
  96. margin-right: 20rpx;
  97. }
  98. .homeImg {
  99. width: 44rpx;
  100. height: 44rpx;
  101. }
  102. .zdyNavLeft {
  103. display: flex;
  104. align-items: center;
  105. }
  106. .zdyNavTitle {
  107. height: 44px;
  108. background: #FFFFFF;
  109. text-align: center;
  110. font-size: 34rpx;
  111. line-height: 44px;
  112. }
  113. .zdyNavRight {
  114. height: 44px;
  115. background: #FFFFFF;
  116. text-align: center;
  117. font-size: 28rpx;
  118. line-height: 44px;
  119. color: #3F90F7;
  120. margin-right: 24rpx;
  121. }
  122. .top {
  123. color: #FFFFFF;
  124. font-size: 28rpx;
  125. padding: 24rpx;
  126. background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);
  127. }
  128. .cangBox{
  129. background: #FFFFFF;
  130. }
  131. .cangTitle{
  132. padding: 10rpx 24rpx;
  133. background: #F4F5F7;
  134. color: #333333;
  135. font-size: 28rpx;
  136. }
  137. .xingBox{
  138. font-size: 28rpx;
  139. display: flex;
  140. justify-content: space-between;
  141. align-items: center;
  142. padding: 24rpx;
  143. border-bottom: 1rpx solid #eeeeee;
  144. }
  145. </style>