Selaa lähdekoodia

完成代理商接口对接,未完成代理商页面确认

yerong 4 vuotta sitten
vanhempi
commit
875d714af9
3 muutettua tiedostoa jossa 35 lisäystä ja 42 poistoa
  1. 1 1
      dist/wx
  2. 29 36
      src/components/device/device.vue
  3. 5 5
      src/components/index/personal.vue

+ 1 - 1
dist/wx

@@ -1 +1 @@
-Subproject commit 613432c68cdcca4685c8d2c0ba04b8080e31bb6a
+Subproject commit 24ba5d3543ea15720ead714a6fff20dbd87cdfbe

+ 29 - 36
src/components/device/device.vue

@@ -146,39 +146,39 @@ export default {
     //打开 扫描二维码
     open_scan() {
       //
-      // wx.scanCode({
-      //   onlyFromCamera: true,
-      //   success: (res) => {
-      //     let $data = res
-      //     if ($data.result) {
-      //       let url = decodeURIComponent($data.result)
-      //       let $code = url.match(/\?code=(.*)/)[1];
-      //       $this.code = $code
-      //打开蓝牙设备
-      wx.openBluetoothAdapter({
-        success(res) {
-          //判断已经打开连接了
-          if (res['errMsg'] == "openBluetoothAdapter:ok") {
-            console.log('openBluetoothAdapter success', res)
-            $this.startBluetoothDevicesDiscovery()
-          }
-        },
-        fail(err) {
-          if (err['errCode'] == 10001) {
-            Toast.fail({
-              message: "请连接蓝牙"
-            })
-          } else {
-            Toast.fail({
-              message: "蓝牙连接失败"
+      wx.scanCode({
+        onlyFromCamera: true,
+        success: (res) => {
+          let $data = res
+          if ($data.result) {
+            let url = decodeURIComponent($data.result)
+            let $code = url.match(/\?code=(.*)/)[1];
+            $this.code = $code
+            //打开蓝牙设备
+            wx.openBluetoothAdapter({
+              success(res) {
+                //判断已经打开连接了
+                if (res['errMsg'] == "openBluetoothAdapter:ok") {
+                  console.log('openBluetoothAdapter success', res)
+                  $this.startBluetoothDevicesDiscovery()
+                }
+              },
+              fail(err) {
+                if (err['errCode'] == 10001) {
+                  Toast.fail({
+                    message: "请连接蓝牙"
+                  })
+                } else {
+                  Toast.fail({
+                    message: "蓝牙连接失败"
+                  })
+                }
+              }
             })
+
           }
         }
       })
-      //
-      //     }
-      //   }
-      // })
     },
     //关闭窗口的方法
     on_close() {
@@ -334,13 +334,6 @@ export default {
   },
   onShow() {
     //判断是否游戏中
-    let $game_status = game_store.getters.getGameStatus
-    console.log('choose_ok_game_status', $game_status)
-    if ($game_status == 1) {
-      $this.connect_toy = 4
-    } else {
-      $this.connect_toy = 2
-    }
   },
   onLoad(options) {
     // 原有的code

+ 5 - 5
src/components/index/personal.vue

@@ -200,11 +200,11 @@ export default {
       let $data = res.data
       //判断如果是第一次登录就 弹出领取体验卡
       $this.userinfo = $data.data
-      if ($this.userinfo.login_time == 0) {
-        $this.first = true
-      } else if ($this.userinfo.play_time == 0) {
-        $this.pop_show = true
-      }
+      // if ($this.userinfo.login_time == 0) {
+      //   $this.first = true
+      // } else if ($this.userinfo.play_time == 0) {
+      //   $this.pop_show = true
+      // }
       $this.$store.commit('set_userinfo', $data.data);
     })