You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

operation-tips.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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="hint">
  27. <view class="orange-txt ">
  28. <text class="red"></text>
  29. <view style="margin: 0 24rpx;">重要提示</view>
  30. <text class="red"></text>
  31. </view>
  32. <view class="grey-txt">1.激活前必须将ETC设备安装到相应车辆上,确保安装车辆信息与激活后OBU内信息一致后才能正常使用。</view>
  33. <view class="grey-txt">2.如因激活的ETC设备未安装到对应车辆上产生的异常扣费,我司不承担任何赔偿责任。</view>
  34. <view class="grey-txt">3.激活时,需要录入您的车牌号和手机号并确保OBU蓝牙和手机蓝牙处于打开状态。</view>
  35. </view>
  36. <view class="btn">
  37. <submit-button @submit="gotoNextStep" title="已知悉,下一步"></submit-button>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup lang="ts">
  42. import {
  43. msg,
  44. navTo,
  45. noticeUser
  46. } from '@/utils/utils';
  47. import { setItem } from "@/utils/storage";
  48. import { onLoad } from "@dcloudio/uni-app";
  49. let transfer = 0;
  50. onLoad((option) => {
  51. console.log(option);
  52. const orderInfo = {
  53. orderId: "",
  54. id: "",
  55. cardStatus: "",
  56. obuStatus: "",
  57. }
  58. orderInfo.orderId = option.orderId;
  59. orderInfo.id = option.id;
  60. orderInfo.cardStatus = option.cardStatus;
  61. orderInfo.obuStatus = option.obuStatus;
  62. transfer = option.transfer;
  63. setItem("orderInfo", orderInfo)
  64. console.log(orderInfo);
  65. })
  66. const gotoNextStep = () => {
  67. uni.openBluetoothAdapter({
  68. success(res) {
  69. noticeUser(() => {
  70. console.log("11111")
  71. /* 判断是否打开蓝牙 */
  72. uni.getBluetoothAdapterState({
  73. success(res) {
  74. console.log("2222", res)
  75. //如果res.avaliable==false 说明没打开蓝牙 反之则打开
  76. if (res.available == false) {
  77. uni.showToast({
  78. title: '请打开手机蓝牙',
  79. icon: "error",
  80. duration: 2000
  81. })
  82. return
  83. } else {
  84. navTo(`/subpackage/after-sale/activation/operation-upload?transfer=${transfer}`)
  85. }
  86. }
  87. })
  88. });
  89. },
  90. fail(err){
  91. uni.showModal({
  92. title: '提示',
  93. content: '请打开小程序蓝牙权限和微信蓝牙权限',
  94. success: function (res) {
  95. if (res.confirm) {
  96. uni.openSetting({
  97. success(res) {
  98. console.log("2222")
  99. console.log(res.authSetting)
  100. }
  101. });
  102. } else if (res.cancel) {
  103. console.log('用户点击取消');
  104. }
  105. }
  106. });
  107. }
  108. })
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .main {
  113. padding-bottom: 40rpx;
  114. .title {
  115. font-size: 36rpx;
  116. color: #333333;
  117. font-weight: 600;
  118. text-align: center;
  119. padding: 48rpx 0px;
  120. }
  121. .center {
  122. width: 100%;
  123. height: auto;
  124. margin-top: 70rpx;
  125. position: relative;
  126. .center-bg {
  127. width: 100%;
  128. }
  129. .dialog-content {
  130. position: absolute;
  131. image {
  132. width: 100%;
  133. }
  134. .dialog-text {
  135. position: absolute;
  136. font-size: 26rpx;
  137. line-height: 40rpx;
  138. color: #666;
  139. .orange {
  140. color: #FF8000;
  141. }
  142. .green {
  143. color: #00B38B;
  144. }
  145. }
  146. }
  147. .first {
  148. width: 419rpx;
  149. height: 144rpx;
  150. top: -40rpx;
  151. left: 250rpx;
  152. .dialog-text {
  153. width: calc(100% - 108rpx);
  154. left: 90rpx;
  155. top: 15rpx;
  156. }
  157. }
  158. .second {
  159. width: 403rpx;
  160. height: 217rpx;
  161. bottom: 200rpx;
  162. right: 115rpx;
  163. .dialog-text {
  164. width: calc(100% - 50rpx);
  165. left: 30rpx;
  166. top: 80rpx;
  167. }
  168. }
  169. }
  170. .hint {
  171. margin: 0rpx 30rpx 0px;
  172. .orange-txt {
  173. font-size: 30rpx;
  174. color: #ff8000;
  175. text-align: center;
  176. display: flex;
  177. align-items: center;
  178. justify-content: center;
  179. margin-bottom: 50rpx;
  180. image {
  181. width: 30rpx;
  182. height: 30rpx;
  183. margin-right: 10rpx;
  184. }
  185. }
  186. .grey-txt {
  187. font-size: 26rpx;
  188. color: #666666;
  189. line-height: 40rpx;
  190. margin-top: 16rpx;
  191. }
  192. }
  193. .btn {
  194. margin: 70rpx 40rpx;
  195. }
  196. }
  197. .grey-txt {
  198. font-size: 26rpx;
  199. color: #666666;
  200. line-height: 40rpx;
  201. margin-top: 16rpx;
  202. }
  203. .red {
  204. display: inline-block;
  205. color: red;
  206. background-color: red;
  207. width: 26rpx;
  208. height: 26rpx;
  209. border-radius: 100%;
  210. }
  211. </style>