index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view>
  3. <car-common :mytitle="title" ref="common" ></car-common>
  4. <carmap ref="amap"></carmap>
  5. <view class="map-info">
  6. <view class="map-text" v-if="stationList.length">
  7. <h4>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h4>
  8. <p>首班:{{routeInfo.startTime}} 末班:{{routeInfo.endTime}}</p>
  9. </view>
  10. <view class="map-btn" @click="reverse">
  11. <u-icon name="swap" custom-prefix="custom-icon" color="#2979ff"></u-icon>
  12. <span>换向</span>
  13. </view>
  14. </view>
  15. <view class="map-route">
  16. <view class="map-route-head" v-if="false">
  17. 2站3公里
  18. </view>
  19. <view class="map-route-main">
  20. <template v-for="item,i in stationList">
  21. <view class="scroll-view-item"
  22. :class="{'map-route-origin':i==0,'map-route-item':i!=0}"
  23. @click="downBtn(item)">
  24. <view class="map-route-circle"></view>
  25. <view class="map-route-line"></view>
  26. <view class="map-route-name">
  27. {{item.name}}
  28. </view>
  29. </view>
  30. </template>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import api from './index.js'
  37. export default api
  38. </script>
  39. <style scoped lang="scss">
  40. .map-route{
  41. border-top: 10px solid #f7f7f7;
  42. background-color: #fff;
  43. .map-route-head{
  44. font-size: 18px;
  45. color:#007AFF;
  46. text-align: center;
  47. line-height: 40px;
  48. border-bottom: 1px solid #eee;
  49. }
  50. .map-route-main{
  51. padding: 10px;
  52. position: relative;
  53. overflow-x: scroll!important;
  54. display: -webkit-box;
  55. }
  56. }
  57. .map-info{
  58. display: flex;
  59. justify-content: space-between;
  60. align-items: center;
  61. background-color: #fff;
  62. padding: 20rpx;
  63. }
  64. .map-text{
  65. h4{
  66. font-size: 16px;
  67. }
  68. p{
  69. margin-top: 10rpx;
  70. color:#999;
  71. }
  72. }
  73. .map-btn{
  74. border: 1px solid #007AFF;
  75. color:#007AFF;
  76. padding: 5px 15px;
  77. border-radius:30px ;
  78. span{
  79. margin-left: 6rpx;
  80. }
  81. }
  82. .map-route-origin{
  83. position: relative;
  84. height: 200px;
  85. width:15px;
  86. .map-route-circle{
  87. position: absolute;
  88. left: 0;
  89. top:30px;
  90. height: 15px;
  91. width: 15px;
  92. border-radius: 50%;
  93. background-color: #999;
  94. border: 3px solid #fff;
  95. box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
  96. z-index: 99;
  97. }
  98. .map-route-name{
  99. position: absolute;
  100. top: 50px;
  101. width: 16px;
  102. line-height: 16px;
  103. z-index: 999;
  104. left: 3px;
  105. }
  106. }
  107. .map-route-item{
  108. position: relative;
  109. height: 200px;
  110. width: 60px;
  111. .map-route-circle{
  112. position: absolute;
  113. right: -2px;
  114. top:30px;
  115. height: 15px;
  116. width: 15px;
  117. border-radius: 50%;
  118. background-color: #fff;
  119. border: 3px solid #1677ff;
  120. z-index: 99;
  121. }
  122. .map-route-line{
  123. height:6px;
  124. background-color: #1677ff;
  125. width:55px;
  126. position: absolute;
  127. left: 0px;
  128. top:35px;
  129. z-index: 9;
  130. }
  131. .map-route-name{
  132. position: absolute;
  133. top: 50px;
  134. width: 16px;
  135. line-height: 16px;
  136. z-index: 999;
  137. right: -3px;
  138. text-align: center;
  139. }
  140. }
  141. .map-route-item.map-now{
  142. .map-route-car{
  143. height:30px;
  144. width: 30px;
  145. position: absolute;
  146. left: 10px;
  147. top: 5px;
  148. img{
  149. height: 100%;
  150. width: 100%;
  151. }
  152. }
  153. .map-route-circle{
  154. border: 3px solid #ff6200;
  155. }
  156. .map-route-line{
  157. background-color: #ff6200;
  158. }
  159. }
  160. .map-route-item.map-after{
  161. .map-route-circle{
  162. border: 3px solid #999;
  163. }
  164. .map-route-line{
  165. background-color: #999;
  166. }
  167. }
  168. .map-route-item.map-geton{
  169. .map-geton-mark{
  170. width: 20px;
  171. height: 20px;
  172. right: 0;
  173. position: absolute;
  174. right: -4px;
  175. top: 5px;
  176. img{
  177. height: 100%;
  178. width: 100%;
  179. }
  180. }
  181. .map-route-circle{
  182. border: 3px solid #25ad3b;
  183. }
  184. .map-route-name{
  185. color:#25ad3b
  186. }
  187. }
  188. </style>