Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

operation-tips.vue 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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,getItem } 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.id = option.id;
  62. orderInfo.orderId = option.orderId;
  63. transfer = option.transfer;
  64. isAfter = option.isAfter;
  65. setItem("orderInfo", orderInfo)
  66. console.log(orderInfo,"mpOpenId",getItem('mpOpenId'));
  67. if(!getItem('mpOpenId')){
  68. navTo(`/subpackage/after-sale/wxWebView`)
  69. }
  70. })
  71. const gotoNextStep = () => {
  72. uni.openBluetoothAdapter({
  73. success(res) {
  74. noticeUser(() => {
  75. console.log("11111")
  76. /* 判断是否打开蓝牙 */
  77. uni.getBluetoothAdapterState({
  78. success(res) {
  79. console.log("2222", res)
  80. //如果res.avaliable==false 说明没打开蓝牙 反之则打开
  81. if (res.available == false) {
  82. uni.showToast({
  83. title: '请打开手机蓝牙',
  84. icon: "error",
  85. duration: 2000
  86. })
  87. return
  88. } else {
  89. navTo(`/subpackage/after-sale/activation/operation-upload?transfer=${transfer}&&isAfter=${isAfter}`)
  90. }
  91. }
  92. })
  93. });
  94. },
  95. fail(err) {
  96. uni.showModal({
  97. title: '提示',
  98. content: '请打开小程序蓝牙权限和微信蓝牙权限',
  99. success: function (res) {
  100. if (res.confirm) {
  101. uni.openSetting({
  102. success(res) {
  103. console.log("2222")
  104. console.log(res.authSetting)
  105. }
  106. });
  107. } else if (res.cancel) {
  108. console.log('用户点击取消');
  109. }
  110. }
  111. });
  112. }
  113. })
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .main {
  118. padding-bottom: 200rpx;
  119. background: #E9EDF0;
  120. position: relative;
  121. min-height: 100vh;
  122. box-sizing: border-box;
  123. .action {
  124. position: absolute;
  125. bottom: 0rpx;
  126. left: 0;
  127. height: 128rpx;
  128. background-color: #fff;
  129. border-radius: 30rpx 30rpx 0 0;
  130. width: 100vw;
  131. display: flex;
  132. align-items: center;
  133. justify-content: center;
  134. flex-direction: column;
  135. }
  136. .title {
  137. font-size: 36rpx;
  138. color: #333333;
  139. font-weight: 600;
  140. text-align: center;
  141. padding: 48rpx 0px;
  142. }
  143. .t-card {
  144. padding-top: 70rpx;
  145. background-color: #fff;
  146. }
  147. .center {
  148. width: 100%;
  149. height: auto;
  150. position: relative;
  151. .center-bg {
  152. width: 100%;
  153. }
  154. .dialog-content {
  155. position: absolute;
  156. image {
  157. width: 100%;
  158. }
  159. .dialog-text {
  160. position: absolute;
  161. font-size: 26rpx;
  162. line-height: 40rpx;
  163. color: #666;
  164. .orange {
  165. color: #FF8000;
  166. }
  167. .green {
  168. color: #00B38B;
  169. }
  170. }
  171. }
  172. .first {
  173. width: 419rpx;
  174. height: 144rpx;
  175. top: -40rpx;
  176. left: 250rpx;
  177. .dialog-text {
  178. width: calc(100% - 108rpx);
  179. left: 90rpx;
  180. top: 15rpx;
  181. }
  182. }
  183. .second {
  184. width: 403rpx;
  185. height: 217rpx;
  186. bottom: 200rpx;
  187. right: 115rpx;
  188. .dialog-text {
  189. width: calc(100% - 50rpx);
  190. left: 30rpx;
  191. top: 80rpx;
  192. }
  193. }
  194. }
  195. .hint {
  196. margin: 40rpx 30rpx 0px;
  197. .txt {
  198. font-family: MicrosoftYaHei;
  199. font-size: 32rpx;
  200. color: #111111;
  201. line-height: 35rpx;
  202. }
  203. .grey-txt {
  204. font-family: MicrosoftYaHei;
  205. font-size: 28rpx;
  206. color: #999999;
  207. line-height: 48rpx;
  208. display: flex;
  209. margin-top: 20rpx;
  210. .point{
  211. margin-top: 19rpx;
  212. flex-shrink: 0;
  213. width: 10rpx;
  214. height: 10rpx;
  215. background: #A0A0A0;
  216. margin-right: 16rpx;
  217. border-radius: 50%;
  218. }
  219. }
  220. }
  221. .btn {
  222. margin: 70rpx 40rpx;
  223. }
  224. }
  225. .red {
  226. display: inline-block;
  227. color: red;
  228. background-color: red;
  229. width: 26rpx;
  230. height: 26rpx;
  231. border-radius: 100%;
  232. }
  233. </style>