Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

device-active-step1.vue 3.5KB

il y a 2 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!-- 设备激活1-操作提示 -->
  2. <template>
  3. <view class="main">
  4. <view class="center">
  5. <image class="center-bg" :src="`${$imgUrl}bluetooth/device-active-bg.png`" mode="widthFix"
  6. style="width: 100%;"></image>
  7. <view class="dialog-content first">
  8. <image :src="`${$imgUrl}bluetooth/device-active-left.png`" mode="widthFix"></image>
  9. <view class="dialog-text">
  10. <text class="orange" space="emsp"> &nbsp;&nbsp;&nbsp;&nbsp;撕掉双面胶背面贴纸</text>
  11. 贴在汽车前挡风玻璃并用力按紧。
  12. </view>
  13. </view>
  14. <view class="dialog-content second">
  15. <image :src="`${$imgUrl}bluetooth/device-active-top.png`" mode="widthFix"></image>
  16. <view class="dialog-text">
  17. &nbsp;&nbsp;&nbsp;&nbsp;请你在<text class="orange">激活前</text>将<text
  18. class="green">OBU</text>贴在申办车辆挡风玻璃<text class="orange">后视镜附近阴影区域</text>。
  19. </view>
  20. </view>
  21. </view>
  22. <view class="hint">
  23. <image :src="`${$imgUrl}common/icon-hint.png`" class="icon"></image>
  24. <view>激活时,需要录入您的车牌号和手机号,并确保OBU蓝牙和手机蓝牙处于打开状态。</view>
  25. </view>
  26. <view class="btn">
  27. <submit-button @submit="gotoNextStep" title="已知悉,下一步"></submit-button>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup lang="ts">
  32. import {
  33. msg,
  34. navTo
  35. } from '@/utils/utils';
  36. import { setItem } from "../../utils/storage";
  37. import { onLoad } from "@dcloudio/uni-app";
  38. onLoad((option)=>{
  39. console.log(option);
  40. const orderInfo = {
  41. orderId:"",
  42. id:"",
  43. cardStatus:"",
  44. obuStatus:""
  45. }
  46. orderInfo.orderId = option.orderId;
  47. orderInfo.id = option.id;
  48. orderInfo.cardStatus = option.cardStatus;
  49. orderInfo.obuStatus = option.obuStatus;
  50. // setItem("orderId",option.orderId)
  51. setItem("orderInfo",orderInfo)
  52. console.log(orderInfo);
  53. })
  54. const gotoNextStep = () => {
  55. uni.openBluetoothAdapter()
  56. /* 判断是否打开蓝牙 */
  57. uni.getBluetoothAdapterState({
  58. success(res) {
  59. //如果res.avaliable==false 说明没打开蓝牙 反之则打开
  60. if (res.available == false) {
  61. uni.showToast({
  62. title: '请打开手机蓝牙',
  63. icon:"error",
  64. duration: 2000
  65. })
  66. return
  67. } else {
  68. navTo('/pages/bluetooth/device-active-step2')
  69. }
  70. }
  71. })
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .main {
  76. padding-bottom: 40rpx;
  77. .title {
  78. font-size: 36rpx;
  79. color: #333333;
  80. font-weight: 600;
  81. text-align: center;
  82. padding: 48rpx 0px;
  83. }
  84. .center {
  85. width: 100%;
  86. height: auto;
  87. margin-top: 70rpx;
  88. position: relative;
  89. .center-bg {
  90. width: 100%;
  91. }
  92. .dialog-content {
  93. position: absolute;
  94. image {
  95. width: 100%;
  96. }
  97. .dialog-text {
  98. position: absolute;
  99. font-size: 26rpx;
  100. line-height: 40rpx;
  101. color: #666;
  102. .orange {
  103. color: #FF8000;
  104. }
  105. .green {
  106. color: #00B38B;
  107. }
  108. }
  109. }
  110. .first {
  111. width: 419rpx;
  112. height: 144rpx;
  113. top: -40rpx;
  114. left: 250rpx;
  115. .dialog-text {
  116. width: calc(100% - 108rpx);
  117. left: 90rpx;
  118. top: 15rpx;
  119. }
  120. }
  121. .second {
  122. width: 403rpx;
  123. height: 217rpx;
  124. bottom: 200rpx;
  125. right: 115rpx;
  126. .dialog-text {
  127. width: calc(100% - 50rpx);
  128. left: 30rpx;
  129. top: 80rpx;
  130. }
  131. }
  132. }
  133. .hint {
  134. display: flex;
  135. flex-direction: row;
  136. justify-content: center;
  137. font-size: 26rpx;
  138. color: #666666;
  139. padding: 0px 30rpx;
  140. .icon {
  141. width: 36rpx;
  142. height: 36rpx;
  143. margin-right: 10rpx;
  144. }
  145. view {
  146. width: calc(100% - 36rpx);
  147. }
  148. }
  149. .btn {
  150. margin: 150rpx 40rpx 60px;
  151. }
  152. }
  153. </style>