temCarNumber.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view>
  3. <u-navbar title="临时车辆" :is-back="false"></u-navbar>
  4. <view class="main">
  5. <!-- <view class="park-name" v-if="detail.parkName">
  6. <img src="@/assets/static/img/if-location-pin@2x.png" alt="">
  7. <text>{{detail.parkName}}</text>
  8. </view> -->
  9. <view class="unlabeled">
  10. 临时车
  11. </view>
  12. <view class="bus-number">
  13. {{detail.carNum}}
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import * as API from '@/apis/parking.js'
  20. export default {
  21. data() {
  22. return {
  23. companyId: '',
  24. detail: {},
  25. message: '',
  26. }
  27. },
  28. onLoad(op) {
  29. if (op.id) {
  30. this.companyId = op.id
  31. this.getInfo()
  32. } else {
  33. uni.showModal({
  34. content: "参数错误"
  35. })
  36. }
  37. },
  38. methods: {
  39. getInfo() {
  40. uni.showLoading({
  41. title: "加载中",
  42. mask: true,
  43. })
  44. API.getTemporaryCarNum({
  45. openId: this.carhelp.getOpenId(),
  46. companyId: this.companyId
  47. }).then((res) => {
  48. uni.hideLoading();
  49. this.detail = res.data;
  50. }).catch(error => {
  51. uni.hideLoading()
  52. this.message = error
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .main {
  60. padding: 20px 0px 28px 23px;
  61. background: linear-gradient(#1F55FF, #27ABFF);
  62. .park-name {
  63. line-height: 20px;
  64. color: rgba(255, 255, 255, 100);
  65. font-size: 20px;
  66. position: relative;
  67. text {
  68. margin-left: 25px;
  69. }
  70. img {
  71. width: 20px;
  72. height: 20px;
  73. margin-right: 8px;
  74. position: absolute;
  75. }
  76. }
  77. .unlabeled {
  78. line-height: 36px;
  79. color: rgba(255, 255, 255, 100);
  80. font-size: 36px;
  81. margin-top: 28px;
  82. }
  83. .bus-number {
  84. line-height: 48px;
  85. color: rgba(255, 255, 255, 100);
  86. font-size: 48px;
  87. margin-top: 20px;
  88. }
  89. }
  90. .u-btn {
  91. width: 89.3%;
  92. background-color: #005AD9;
  93. color: #ffffff;
  94. border-radius: 12px;
  95. margin-top: 20px;
  96. }
  97. .notice {
  98. padding: 20px 23px;
  99. .title {
  100. font-size: 16px;
  101. color: #101010;
  102. }
  103. p {
  104. color: #666666;
  105. margin-top: 8px;
  106. }
  107. }
  108. </style>