rescue.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view class="box">
  3. <map :style="{height:mapHeight + 'rpx'}" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
  4. <view class="contBox">
  5. <view class="tab">
  6. <view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">现在</view>
  7. <view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">预约</view>
  8. </view>
  9. <view class="timeBox">
  10. <view class="time">预约救援时间</view>
  11. <image src="../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
  12. </view>
  13. <view class="typeBox">
  14. <view class="box2">
  15. <image src="../../static/img/icon_dadian_N.png" mode="" class="typeImg"></image>
  16. <view class="title">搭电</view>
  17. </view>
  18. <view class="box2">
  19. <image src="../../static/img/icon_tuoche_N.png" mode="" class="typeImg"></image>
  20. <view class="title">拖车</view>
  21. </view>
  22. <view class="box2">
  23. <image src="../../static/img/icon_luntai_N.png" mode="" class="typeImg"></image>
  24. <view class="title">换胎</view>
  25. </view>
  26. </view>
  27. <view class="price">服务费用 199元/次</view>
  28. <view class="shopBox">
  29. <view class="left">
  30. <view class="graypoint"></view>
  31. <view class="leftTitle">门店</view>
  32. <view class="content">服务门店可修改</view>
  33. </view>
  34. <image src="../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
  35. </view>
  36. <view class="shopBox">
  37. <view class="left">
  38. <view class="graypoint"></view>
  39. <view class="leftTitle">位置</view>
  40. <view class="content">当前位置</view>
  41. </view>
  42. <image src="../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
  43. </view>
  44. <view class="shopBox">
  45. <view class="left">
  46. <view class="graypoint"></view>
  47. <view class="leftTitle">终点</view>
  48. <view class="content">目的地</view>
  49. </view>
  50. <image src="../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
  51. </view>
  52. </view>
  53. <view class="bottomView">
  54. <view class="sure" @click="sure">确定</view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. latitude: 39.909,
  63. longitude: 116.39742,
  64. covers: [{
  65. latitude: 39.909,
  66. longitude: 116.39742,
  67. iconPath: '../../static/img/icon_qidian.png'
  68. }, {
  69. latitude: 39.90,
  70. longitude: 116.39,
  71. iconPath: '../../static/img/icon_zhongdian.png'
  72. }],
  73. tabIndex: 0,
  74. mapHeight:200,
  75. }
  76. },
  77. onLoad() {
  78. uni.getSystemInfo({
  79. success: (res) => {
  80. this.mapHeight = res.windowHeight*2 - 664 - 120
  81. }
  82. })
  83. },
  84. methods: {
  85. tabClick(num) {
  86. this.tabIndex = num;
  87. },
  88. }
  89. }
  90. </script>
  91. <style>
  92. .box {
  93. width: 100vw;
  94. min-height: 100vh;
  95. background-color: #FFFFFF;
  96. }
  97. map {
  98. width: 750rpx;
  99. }
  100. .contBox {
  101. width: 100%;
  102. height: 664rpx;
  103. }
  104. .tab {
  105. background: #FFFFFF;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. padding-left: 230rpx;
  110. padding-right: 230rpx;
  111. height: 92rpx;
  112. line-height: 60rpx;
  113. }
  114. .tabLine {
  115. font-size: 30rpx;
  116. color: #333333;
  117. text-align: center;
  118. }
  119. .tabActive {
  120. color: #FF0000;
  121. font-weight: bold;
  122. border-bottom: 4rpx solid #FF0000;
  123. }
  124. .timeBox {
  125. padding-top: 20rpx;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. }
  130. .time {
  131. color: #959595;
  132. font-size: 24rpx;
  133. }
  134. .typeBox {
  135. padding: 30rpx 115rpx;
  136. display: flex;
  137. justify-content: space-between;
  138. }
  139. .box2 {
  140. display: flex;
  141. align-items: center;
  142. padding: 20rpx;
  143. background: #FFFFFF;
  144. height: 32rpx;
  145. border-radius: 10rpx;
  146. border: 2rpx solid #CCCCCC;
  147. }
  148. .typeImg {
  149. width: 34rpx;
  150. height: 34rpx;
  151. margin-right: 10rpx;
  152. }
  153. .title {
  154. height: 40rpx;
  155. font-size: 28rpx;
  156. font-weight: 400;
  157. color: #666666;
  158. line-height: 40rpx;
  159. }
  160. .price {
  161. padding-bottom: 30rpx;
  162. font-size: 24rpx;
  163. font-weight: 400;
  164. color: #D53533;
  165. text-align: center;
  166. }
  167. .shopBox {
  168. padding: 30rpx 24rpx;
  169. border-top: 1rpx solid #EEEEEE;
  170. display: flex;
  171. justify-content: space-between;
  172. align-items: center;
  173. }
  174. .left {
  175. display: flex;
  176. align-items: center;
  177. }
  178. .leftTitle{
  179. width: 56rpx;
  180. font-size: 28rpx;
  181. font-weight: 400;
  182. color: #666666;
  183. line-height: 40rpx;
  184. margin-left: 16rpx;
  185. margin-right: 30rpx;
  186. }
  187. .graypoint {
  188. width: 14rpx;
  189. height: 14rpx;
  190. background: #DDDDDD;
  191. border-radius: 7rpx;
  192. }
  193. .bluepoint {
  194. width: 14rpx;
  195. height: 14rpx;
  196. background: #3F90F7;
  197. border-radius: 7rpx;
  198. }
  199. .redpoint {
  200. width: 14rpx;
  201. height: 14rpx;
  202. background: #FF0000;
  203. border-radius: 7rpx;
  204. }
  205. .bottomView {
  206. border-top: 1rpx solid #EEEEEE;
  207. background-color: #FFFFFF;
  208. width: 100%;
  209. height: 120rpx;
  210. position: fixed;
  211. bottom: 0rpx;
  212. padding-bottom: constant(safe-area-inset-bottom);
  213. padding-bottom: env(safe-area-inset-bottom);
  214. }
  215. .sure {
  216. background-color: #D53533;
  217. margin: 23rpx 30rpx;
  218. height: 74rpx;
  219. border-radius: 37rpx;
  220. color: #FFFFFF;
  221. font-size: 30rpx;
  222. font-weight: bold;
  223. text-align: center;
  224. line-height: 74rpx;
  225. }
  226. </style>