Преглед на файлове

修改蓝牙或位置未打开时的提示

Luhan1997 преди 4 години
родител
ревизия
33fa583713
променени са 1 файла, в които са добавени 17 реда и са изтрити 14 реда
  1. 17 14
      src/components/device/device.vue

+ 17 - 14
src/components/device/device.vue

@@ -120,8 +120,8 @@
         </button>
       </div>
     </van-popup>
-    <van-toast id="van-toast"/>
-    <van-dialog id="van-dialog"/>
+    <van-toast id="van-toast" />
+    <van-dialog id="van-dialog" />
 
     <van-popup
       :show="start_show"
@@ -130,7 +130,10 @@
       custom-style="height: 100%"
       @close="onStartGameShowClose"
     >
-      <gameIng v-if="game_status" @closePop="onStartGameShowClose"></gameIng>
+      <gameIng
+        v-if="game_status"
+        @closePop="onStartGameShowClose"
+      ></gameIng>
     </van-popup>
 
   </div>
@@ -146,10 +149,10 @@ import device_connected from "@/components/device/connected";
 //连接玩具
 import toy_connecting from "@/components/device/toy/connecting";
 //开始游戏的界面
-import gameIng from '@/pages/start/index'
+import gameIng from "@/pages/start/index";
 //获取个人信息
 import Toast from "../../../static/vant/toast/toast";
-import {game_devices} from "../../requests/game";
+import { game_devices } from "../../requests/game";
 import game_store from "@/store/game";
 import bluetooth from "@/utils/bluetooth";
 import ble_store from "../../store/bluetooth";
@@ -214,8 +217,8 @@ export default {
         onlyFromCamera: true,
         success: (res) => {
           wx.vibrateShort({
-            type: "heavy"
-          })
+            type: "heavy",
+          });
 
           let $data = res;
           if ($data.result) {
@@ -237,7 +240,7 @@ export default {
               fail(err) {
                 if (err["errCode"] == 10001) {
                   Toast.fail({
-                    message: "请打开手机蓝牙!",
+                    message: "请打开手机蓝牙及位置信息!",
                   });
                 } else {
                   Toast.fail({
@@ -419,14 +422,14 @@ export default {
       });
     },
     onStartGameShowClose() {
-      $this.start_show = false
-      $this.game_status = 0
+      $this.start_show = false;
+      $this.game_status = 0;
     },
     gameStart() {
-      $this.start_show = true
-      $this.game_status = 1
-      $this.connect_toy = 4
-    }
+      $this.start_show = true;
+      $this.game_status = 1;
+      $this.connect_toy = 4;
+    },
   },
   mounted() {
     $this.get_toy_list();