parkingInformation.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="parking-information">
  3. <view class="parking-information-slider">
  4. <image src="../../static/img/parking-info-bg.png" mode=""></image>
  5. </view>
  6. <view class="parking-information-content">
  7. <view class="parking-information-content-title">
  8. <view class="pict-left">
  9. <view class="title">{{roadInfo.areaName}}</view>
  10. <view class="subtitle">{{roadInfo.roadName}}</view>
  11. </view>
  12. <view class="pict-right" @click="navigation(roadInfo.latitude, roadInfo.longitude)">
  13. <image src="../../static/img/distance-icon.png" mode=""></image>
  14. <view class="m">{{roadInfo.distance|kmUnit}}</view>
  15. </view>
  16. </view>
  17. <view class="parking-information-content-time">
  18. <view>服务时间:<text>{{roadInfo.workBeginTime}}-{{roadInfo.workEndTime}}</text></view>
  19. <view>包月费用:<text>{{roadInfo.monthAmount}}</text>元</view>
  20. </view>
  21. <view class="parking-information-content-cars">
  22. <view class="picc-tag">
  23. <view>{{roadInfo.spaceTotal}}</view>
  24. <view>共有车位</view>
  25. </view>
  26. <view class="picc-tag">
  27. <view>{{roadInfo.spaceIdle}}</view>
  28. <view>空闲车位</view>
  29. </view>
  30. </view>
  31. <view class="parking-information-content-price" @click="lookParkingRule(roadInfo)">
  32. <text>点击查看停车规则</text>
  33. <u-icon name="arrow-right"></u-icon>
  34. </view>
  35. <u-button class="parking-information-content-button" @click="createMonth(roadInfo)">办理包月</u-button>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. roadInfo:[],
  44. }
  45. },
  46. onLoad(page) {
  47. this.roadInfo = JSON.parse(page.roadInfo);
  48. console.log('this.roadInfo',this.roadInfo);
  49. },
  50. methods: {
  51. /**
  52. * 跳转停车标准页面
  53. * {roadNo} 路段编码
  54. * */
  55. lookParkingRule (item) {
  56. this.$u.route({
  57. url: 'pages/chargeStandard/chargeStandard',
  58. params: {
  59. roadNo: item.roadNo
  60. }
  61. })
  62. },
  63. createMonth(item){
  64. this.$u.route({
  65. url: 'pages/handleMonthly/handleMonthly',
  66. params: {
  67. roadNo:item.roadNo
  68. }
  69. });
  70. },
  71. /**
  72. * 导航
  73. * */
  74. navigation (lat, lon) {
  75. // uni.openLocation({
  76. // latitude: parseFloat(lat),
  77. // longitude: parseFloat(lon),
  78. // scale: 18
  79. // })
  80. uni.navigateTo({
  81. url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:'+lat+','+lon+'&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
  82. })
  83. },
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. @import './parkingInformation';
  89. </style>