index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="content">
  3. <car-common ref="common" ></car-common>
  4. <u-navbar :is-back="false" title="">
  5. <view class="slot-wrap">
  6. <view class="navbar-left">
  7. <picker :value="index" @change="bindPickerChange" range-key="label" :range="options1">
  8. <view class="uni-input">{{options1[index].label}}
  9. <u-icon name="arrow-down" color="#999" size="28"></u-icon>
  10. </view>
  11. </picker>
  12. </view>
  13. <view class="search-wrap" >
  14. <u-search placeholder="搜索线路" @click="gotoQuery" :disabled="true" :show-action="false"></u-search>
  15. </view>
  16. <view class="navbar-right" @click="getScan">
  17. <u-icon name="saoma" custom-prefix="custom-icon" size="40" color="#333"></u-icon>
  18. </view>
  19. </view>
  20. </u-navbar>
  21. <view class="banner" v-show="list.length">
  22. <u-swiper height="180" :list="list" @click="clickSwiper"></u-swiper>
  23. </view>
  24. <view v-if="!getPointBl" style="text-align:center;margin-top: 40px;" >
  25. <img src="static/img/getPointError.png" style="width: 50%;" alt="" >
  26. <view>打开手机定位功能,为您查询附近的站点</view>
  27. <u-button :custom-style="btn" size="medium" shape="circle" plain @click="getPoint(true)" >刷新</u-button>
  28. </view>
  29. <view v-if="isLoading&&getPointBl&&siteList.length==0" style="text-align:center;margin-top: 40px;" >
  30. <img src="static/img/null.png" style="width: 50%;" alt="" >
  31. <view>附近暂无站点信息</view>
  32. <u-button :custom-style="btn" size="medium" shape="circle" plain @click="getPoint(true)" >刷新</u-button>
  33. </view>
  34. <view class="index-floor" v-for="item,index in siteList" :key="index">
  35. <view class="title">
  36. <u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
  37. <span>{{item.stationName}}</span>
  38. </view>
  39. <view class="content">
  40. <view class="route">
  41. <view class="route-item" v-for="li,i in item.nearbyShiftDTOList" :key="i" @click="gotoLine(li)">
  42. <view class="route-text">
  43. <h4>{{li.routeName}}</h4>
  44. <p>开往 {{li.endStationName}}</p>
  45. </view>
  46. <view class="route-gap" >
  47. <view class="route-gap stop">
  48. <span>{{li.des}}</span>
  49. <u-icon name="arrow-right" color="#999" size="28"></u-icon>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import api from './index.js'
  60. export default api
  61. </script>
  62. <style>
  63. page{background-color: #f7f7f7;}
  64. </style>
  65. <style scoped lang="scss">
  66. .btn{
  67. border-color: #1677FF ;
  68. }
  69. .slot-wrap {
  70. display: flex;
  71. align-items: center;
  72. flex: 1;
  73. }
  74. .navbar-right {
  75. display: flex;
  76. margin-right: 20rpx;
  77. }
  78. .navbar-left{
  79. display: flex;
  80. align-items: center;
  81. margin-left: 20rpx;
  82. span{
  83. margin-right: 6rpx;
  84. font-size: 14px;
  85. }
  86. }
  87. .search-wrap {
  88. margin: 0 20rpx;
  89. flex: 1;
  90. }
  91. .banner{
  92. padding: 20rpx;
  93. background-color: #fff;
  94. }
  95. .slot-content{
  96. background-color: #fff;
  97. }
  98. .index-floor{
  99. margin: 20rpx;
  100. background-color: #fff;
  101. border-radius: 20rpx;
  102. .title{
  103. padding: 20rpx;
  104. border-bottom: 1px solid #f7f7f7;
  105. display: flex;
  106. align-items: center;
  107. span{
  108. margin-left: 10rpx;
  109. font-size: 16px;
  110. font-weight: bold;
  111. }
  112. }
  113. .text{
  114. padding: 20rpx;
  115. border-bottom: 1px solid #f7f7f7;
  116. display: flex;
  117. align-items: center;
  118. span{
  119. margin-left: 10rpx;
  120. font-size: 12px;
  121. }
  122. }
  123. }
  124. .route{
  125. margin:0 20rpx;
  126. }
  127. .route-item{
  128. padding: 20rpx 0;
  129. border-bottom: 1px solid #f7f7f7;
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. &:last-child{
  134. border: none;
  135. }
  136. h4{
  137. font-size: 32rpx;
  138. }
  139. p{
  140. margin-top: 6rpx;
  141. color:#999;
  142. }
  143. }
  144. .route-gap{
  145. span{
  146. font-size: 32rpx;
  147. font-weight: bold;
  148. margin-right: 10rpx;
  149. color:#1677ff;
  150. }
  151. &.stop{
  152. span{color:#ff731d}
  153. }
  154. }
  155. </style>