Prechádzať zdrojové kódy

1、封装了扫描连接蓝牙模块
2、修复了邀请卡库存显示模块

yerong 4 rokov pred
rodič
commit
bfc91b24ba

+ 12 - 1
src/components/device/device.vue

@@ -178,6 +178,10 @@ export default {
       // 打开蓝牙扫描 重置游戏状态
       game_store.setters.setGameStatus(0)
       //
+      $this.scan_to_bluetooth()
+    },
+    //扫描连接蓝牙
+    scan_to_bluetooth() {
       wx.scanCode({
         onlyFromCamera: true,
         success: (res) => {
@@ -199,7 +203,7 @@ export default {
               fail(err) {
                 if (err["errCode"] == 10001) {
                   Toast.fail({
-                    message: "请打开手机蓝牙,并启动脑环!"
+                    message: "请打开手机蓝牙!"
                   })
                 } else {
                   Toast.fail({
@@ -211,6 +215,7 @@ export default {
           }
         }
       });
+
     },
     //关闭窗口的方法
     on_close() {
@@ -377,6 +382,12 @@ export default {
   },
   mounted() {
     $this.get_toy_list();
+    wx.getSystemInfo({
+      success(res) {
+        console.log(res)
+        console.log(res.brand)
+      }
+    })
   },
   created() {
     $this = this;

+ 1 - 1
src/pages/agent/invite_card_inventory/index.vue

@@ -111,7 +111,7 @@ export default {
         let $data = res.data.data;
         $this.total_count = $data.total
         $this.stock_count = $data.stock
-        $this.use_count = $data.use
+        $this.use_count = $data.unuse
         $this.invite_list = $data.list
         $this.invite_list.forEach(($val,$index)=>{
           $this.invite_list[$index]['bind_time'] = util.formatTime($val['bind_time'])