Browse Source

feature: 记录数据

Damon 7 months atrás
parent
commit
fe3c4f0c6b
3 changed files with 6 additions and 14 deletions
  1. 5 1
      app.js
  2. 0 2
      pages/index/index.js
  3. 1 11
      utils/lexin/jump.js

+ 5 - 1
app.js

@@ -21,7 +21,7 @@ App({
     ssid: "",
     pwdData: "",
     userData: null,
-    is_debug: 2, // 1 测试环境 // 2正式环境
+    is_debug: 1, // 1 测试环境 // 2正式环境
     client: null,
     oneInitBluetooth: true,
 
@@ -261,12 +261,16 @@ App({
       var publish = `/${DstDeviceName}/user/sub_control`;
       // {"type":"get_dev_info","DstDeviceName":"AIrSMArT_7cdfa1fd3af0","SrcDeviceName":"ALY_933625"}
       var dataString = `${JSON.stringify(data)}`;
+      console.log("gadsfqreqwrqwerqer==00==" + publish);
+      console.log("gadsfqreqwrqwerqer==11==" + dataString);
       that.globalData.client.publish(publish, dataString, (err) => {
+        console.log("gadsfqreqwrqwerqer==22==" + JSON.stringify(err));
         if (err) {
           console.log("发布消息失败");
         }
       });
     } else {
+      console.log("gadsfqreqwrqwerqer==33==");
       console.log("服务器已断开");
     }
   },

+ 0 - 2
pages/index/index.js

@@ -230,9 +230,7 @@ Page({
   ///选择对应的频道
   onTapChannelIndex(e) {
     var that = this;
-    console.log("gadsfqreqwrqwerqer==aa==");
     var index = e.currentTarget.dataset.index;
-    console.log("gadsfqreqwrqwerqer==00==" + index);
     lexin_jump.toChannelIndex(index, function (i) {
       that.setData({
         actionIndex: i,

+ 1 - 11
utils/lexin/jump.js

@@ -9,29 +9,23 @@ function toChannelIndex(index, callback) {
   const route_util = require('../route_util');
   const route_constant = require('../route_constant');
   var isLogin = pages[0].getIsLogin();
-  console.log("gadsfqreqwrqwerqer==111==" + isLogin);
   if (!isLogin) {
     route_util.jump(route_constant.login);
     return;
   }
 
-  console.log("gadsfqreqwrqwerqer==222==" + index);
   var actionIndex = pages[0].getActionIndex();
-  console.log("gadsfqreqwrqwerqer==33==" + actionIndex);
   if (actionIndex == null) {
     return;
   }
 
-  console.log("gadsfqreqwrqwerqer==444==" + index + "==" + actionIndex);
   if (index == actionIndex) {
     return;
   };
 
   var deviceList = pages[0].getDeviceList();
   var deviceListSelect = pages[0].getDeviceListSelect();
-  console.log("gadsfqreqwrqwerqer==555==");
   if (deviceListSelect === null || deviceList.length <= deviceListSelect) {
-    console.log("gadsfqreqwrqwerqer==666==");
     wx.showToast({
       title: '请选择设备',
       icon: "none"
@@ -66,12 +60,8 @@ function toChannelIndex(index, callback) {
   };
 
   //other: {"url":"","media_data":"","user_id":1,"timestamp":1734423952,"channel_id":4,"order":"","resource_from":"","songAlbumID":"","version":3,"is_debug":2}
-
-  //deviceMacId: AIrSMArT_423060242830
-
+  //deviceMacId: AIrSMArT_7cdfa1fd3af0
   var deviceMacId = lexin_util.getDeviceMacId(deviceId);
-  console.log("gasdfqwerqwerqr==00=" + JSON.stringify(other));
-  console.log("gasdfqwerqwerqr==11=" + deviceMacId);
   app.PubMsg({
     type: "play",
     DstDeviceName: deviceMacId,