index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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="name" :range="options1">
  8. <view class="uni-input" v-if="options1.length">{{options1[index].name}}
  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="200" :list="list" @click="clickSwiper"></u-swiper>
  23. </view>
  24. <view class="remind" v-if="remindInfo">
  25. <h3>{{remindInfo.currentStationName}} - {{remindInfo.ticketDownStationName}}</h3>
  26. <p>线路:{{remindInfo.routeName}} 当前:{{remindInfo.currentStationName}}</p>
  27. <view class="remind-radio">
  28. <span>到站提醒:</span>
  29. <u-radio-group v-model="remindInfo.isRemind" @change="radioGroupChange" active-color="#fff">
  30. <u-radio
  31. @change="radioChange"
  32. v-for="(dio, index) in radiolist" :key="index"
  33. :name="dio.isRemind"
  34. >
  35. {{dio.name}}
  36. </u-radio>
  37. </u-radio-group>
  38. </view>
  39. </view>
  40. <view v-if="!getPointBl" style="text-align:center;margin-top: 40px;" >
  41. <img src="static/img/getPointError.png" style="width: 50%;" alt="" >
  42. <view>打开手机定位功能,为您查询附近的站点</view>
  43. <u-button :custom-style="btn" size="medium" shape="circle" plain @click="getPoint(true)" >刷新</u-button>
  44. </view>
  45. <view v-if="isLoading&&getPointBl&&siteList.length==0" style="text-align:center;margin-top: 40px;" >
  46. <img src="static/img/null.png" style="width: 50%;" alt="" >
  47. <view>附近暂无站点信息</view>
  48. <u-button :custom-style="btn" size="medium" shape="circle" plain @click="getPoint(true)" >刷新</u-button>
  49. </view>
  50. <view class="index-floor" v-for="item,index in siteList" :key="index">
  51. <view class="title" @click="gotoLineList(item.stationId)" >
  52. <view class="title-site">
  53. <u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
  54. <span>{{item.stationName}}</span>
  55. </view>
  56. <u-icon name="arrow-right" color="#999" size="28"></u-icon>
  57. </view>
  58. <view class="content">
  59. <view class="route">
  60. <view class="route-item" v-for="li,i in item.nearbyShiftDTOList" :key="i" @click="gotoLine(li,item.stationId)">
  61. <view class="route-text">
  62. <h4>{{li.routeName}}</h4>
  63. <p>开往:{{li.endStationName}} {{li.currentStationName&&li.des!='等待发车'?'当前:'+li.currentStationName:''}}</p>
  64. </view>
  65. <view class="route-gap" >
  66. <view class="route-gap stop">
  67. <span>{{li.des?li.des:"等待发车"}}</span>
  68. <u-icon name="arrow-right" color="#999" size="28"></u-icon>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import api from './index.js'
  79. export default api
  80. </script>
  81. <style>
  82. page{background-color: #f7f7f7;}
  83. </style>
  84. <style scoped lang="scss">
  85. .btn{
  86. border-color: #1677FF ;
  87. }
  88. .slot-wrap {
  89. display: flex;
  90. align-items: center;
  91. flex: 1;
  92. }
  93. .navbar-right {
  94. display: flex;
  95. margin-right: 20rpx;
  96. }
  97. .navbar-left{
  98. display: flex;
  99. align-items: center;
  100. margin-left: 20rpx;
  101. span{
  102. margin-right: 6rpx;
  103. font-size: 14px;
  104. }
  105. }
  106. .search-wrap {
  107. margin: 0 20rpx;
  108. flex: 1;
  109. }
  110. .banner{
  111. padding: 20rpx;
  112. background-color: #fff;
  113. }
  114. .slot-content{
  115. background-color: #fff;
  116. }
  117. .index-floor{
  118. margin: 20rpx;
  119. background-color: #fff;
  120. border-radius: 20rpx;
  121. .title{
  122. padding: 20rpx;
  123. border-bottom: 1px solid #f7f7f7;
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. .title-site{
  128. display: flex;
  129. align-items: center;
  130. }
  131. span{
  132. margin-left: 10rpx;
  133. font-size: 16px;
  134. font-weight: bold;
  135. }
  136. }
  137. .text{
  138. padding: 20rpx;
  139. border-bottom: 1px solid #f7f7f7;
  140. display: flex;
  141. align-items: center;
  142. span{
  143. margin-left: 10rpx;
  144. font-size: 12px;
  145. }
  146. }
  147. }
  148. .route{
  149. margin:0 20rpx;
  150. }
  151. .route-item{
  152. padding: 20rpx 0;
  153. border-bottom: 1px solid #f7f7f7;
  154. display: flex;
  155. justify-content: space-between;
  156. align-items: center;
  157. &:last-child{
  158. border: none;
  159. }
  160. h4{
  161. font-size: 32rpx;
  162. }
  163. p{
  164. margin-top: 6rpx;
  165. color:#999;
  166. }
  167. }
  168. .route-gap{
  169. span{
  170. font-size: 32rpx;
  171. font-weight: bold;
  172. margin-right: 10rpx;
  173. color:#1677ff;
  174. }
  175. &.stop{
  176. span{color:#ff731d}
  177. }
  178. }
  179. .remind{
  180. background-color: #1677ff;
  181. margin: 10px;
  182. padding: 10px;
  183. border-radius: 10px;
  184. h3{color:#fff}
  185. p{color:#fff;margin-top: 10px;margin-bottom: 5px;}
  186. }
  187. .remind-radio{
  188. color:#fff;
  189. /deep/.u-radio__label{
  190. color:#fff;
  191. }
  192. /deep/.u-icon__icon{
  193. color:#1677ff!important
  194. }
  195. }
  196. </style>