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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <!-- 设备激活1-操作提示 -->
  2. <template>
  3. <view class="main">
  4. <view class="t-card">
  5. <view class="center">
  6. <image class="center-bg" :src="`${$imgUrl}bluetooth/device-active-bg.png`" mode="widthFix" style="width: 100%;">
  7. </image>
  8. <view class="dialog-content first">
  9. <image :src="`${$imgUrl}bluetooth/device-active-left.png`" mode="widthFix"></image>
  10. <view class="dialog-text">
  11. <text class="orange" space="emsp"> &nbsp;&nbsp;&nbsp;&nbsp;撕掉双面胶背面贴纸</text>
  12. 贴在汽车前挡风玻璃并用力按紧。
  13. </view>
  14. </view>
  15. <view class="dialog-content second">
  16. <image :src="`${$imgUrl}bluetooth/device-active-top.png`" mode="widthFix"></image>
  17. <view class="dialog-text">
  18. &nbsp;&nbsp;&nbsp;&nbsp;请你在<text class="orange">激活前</text>将<text class="green">OBU</text>贴在申办车辆挡风玻璃<text
  19. class="orange">后视镜附近阴影区域</text>。
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- <view class="hint">
  25. <image :src="`${$imgUrl}common/icon-hint.png`" class="icon"></image>
  26. <view>激活时,确保OBU蓝牙和手机蓝牙处于打开状态。</view>
  27. </view> -->
  28. <view class="hint">
  29. <view class="txt">
  30. <view>重要提示</view>
  31. </view>
  32. <view class="grey-txt"><view class="point"></view>激活前必须将ETC设备安装到相应车辆上,确保安装车辆信息与激活后OBU内信息一致后才能正常使用。</view>
  33. <view class="grey-txt"><view class="point"></view>如因激活的ETC设备未安装到对应车辆上产生的异常扣费,我司不承担任何赔偿责任。</view>
  34. <view class="grey-txt"><view class="point"></view>激活时,需要录入您的车牌号和手机号并确保OBU蓝牙和手机蓝牙处于打开状态。</view>
  35. </view>
  36. <view class="action">
  37. <button type="default" class="ui-btn" @click="gotoNextStep">
  38. 已知悉,下一步
  39. </button>
  40. </view>
  41. </view>
  42. </template>
  43. <script setup lang="ts">
  44. import {
  45. msg,
  46. navTo,
  47. noticeUser
  48. } from '@/utils/utils';
  49. import { setItem } from "@/utils/storage";
  50. import { onLoad } from "@dcloudio/uni-app";
  51. let transfer = 0;
  52. let isAfter = '';
  53. onLoad((option) => {
  54. console.log(option);
  55. const orderInfo = {
  56. orderId: "",
  57. id: "",
  58. cardStatus: "",
  59. obuStatus: "",
  60. }
  61. orderInfo.orderId = option.orderId;
  62. orderInfo.id = option.id;
  63. orderInfo.cardStatus = option.cardStatus;
  64. orderInfo.obuStatus = option.obuStatus;
  65. transfer = option.transfer;
  66. isAfter = option.isAfter;
  67. setItem("orderInfo", orderInfo)
  68. console.log(orderInfo);
  69. })
  70. const gotoNextStep = () => {
  71. uni.openBluetoothAdapter({
  72. success(res) {
  73. noticeUser(() => {
  74. console.log("11111")
  75. /* 判断是否打开蓝牙 */
  76. uni.getBluetoothAdapterState({
  77. success(res) {
  78. console.log("2222", res)
  79. //如果res.avaliable==false 说明没打开蓝牙 反之则打开
  80. if (res.available == false) {
  81. uni.showToast({
  82. title: '请打开手机蓝牙',
  83. icon: "error",
  84. duration: 2000
  85. })
  86. return
  87. } else {
  88. navTo(`/subpackage/after-sale/activation/operation-upload?transfer=${transfer}&&isAfter=${isAfter}`)
  89. }
  90. }
  91. })
  92. });
  93. },
  94. fail(err) {
  95. uni.showModal({
  96. title: '提示',
  97. content: '请打开小程序蓝牙权限和微信蓝牙权限',
  98. success: function (res) {
  99. if (res.confirm) {
  100. uni.openSetting({
  101. success(res) {
  102. console.log("2222")
  103. console.log(res.authSetting)
  104. }
  105. });
  106. } else if (res.cancel) {
  107. console.log('用户点击取消');
  108. }
  109. }
  110. });
  111. }
  112. })
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. .main {
  117. padding-bottom: 200rpx;
  118. background: #E9EDF0;
  119. position: relative;
  120. min-height: 100vh;
  121. box-sizing: border-box;
  122. .action {
  123. position: absolute;
  124. bottom: 0rpx;
  125. left: 0;
  126. height: 128rpx;
  127. background-color: #fff;
  128. border-radius: 30rpx 30rpx 0 0;
  129. width: 100vw;
  130. display: flex;
  131. align-items: center;
  132. justify-content: center;
  133. flex-direction: column;
  134. }
  135. .title {
  136. font-size: 36rpx;
  137. color: #333333;
  138. font-weight: 600;
  139. text-align: center;
  140. padding: 48rpx 0px;
  141. }
  142. .t-card {
  143. padding-top: 70rpx;
  144. background-color: #fff;
  145. }
  146. .center {
  147. width: 100%;
  148. height: auto;
  149. position: relative;
  150. .center-bg {
  151. width: 100%;
  152. }
  153. .dialog-content {
  154. position: absolute;
  155. image {
  156. width: 100%;
  157. }
  158. .dialog-text {
  159. position: absolute;
  160. font-size: 26rpx;
  161. line-height: 40rpx;
  162. color: #666;
  163. .orange {
  164. color: #FF8000;
  165. }
  166. .green {
  167. color: #00B38B;
  168. }
  169. }
  170. }
  171. .first {
  172. width: 419rpx;
  173. height: 144rpx;
  174. top: -40rpx;
  175. left: 250rpx;
  176. .dialog-text {
  177. width: calc(100% - 108rpx);
  178. left: 90rpx;
  179. top: 15rpx;
  180. }
  181. }
  182. .second {
  183. width: 403rpx;
  184. height: 217rpx;
  185. bottom: 200rpx;
  186. right: 115rpx;
  187. .dialog-text {
  188. width: calc(100% - 50rpx);
  189. left: 30rpx;
  190. top: 80rpx;
  191. }
  192. }
  193. }
  194. .hint {
  195. margin: 40rpx 30rpx 0px;
  196. .txt {
  197. font-family: MicrosoftYaHei;
  198. font-size: 32rpx;
  199. color: #111111;
  200. line-height: 35rpx;
  201. }
  202. .grey-txt {
  203. font-family: MicrosoftYaHei;
  204. font-size: 28rpx;
  205. color: #999999;
  206. line-height: 48rpx;
  207. display: flex;
  208. margin-top: 20rpx;
  209. .point{
  210. margin-top: 19rpx;
  211. flex-shrink: 0;
  212. width: 10rpx;
  213. height: 10rpx;
  214. background: #A0A0A0;
  215. margin-right: 16rpx;
  216. border-radius: 50%;
  217. }
  218. }
  219. }
  220. .btn {
  221. margin: 70rpx 40rpx;
  222. }
  223. }
  224. .red {
  225. display: inline-block;
  226. color: red;
  227. background-color: red;
  228. width: 26rpx;
  229. height: 26rpx;
  230. border-radius: 100%;
  231. }
  232. </style>