pumpkin-zbh / amqp_comm_example

Avoid using console in code that runs on browser JS-0002
Bug risk
Major
6 occurrences in this check
Avoid using console in code that runs on the browser
 80        }
 81    }
 82    console.log("===Report Scan Data\n topic=" + topic)
 83    console.log(payloadJson) 84    return JSON.stringify(payloadJson);
 85}
 86
Avoid using console in code that runs on the browser
 29const subTopic = `/${deviceConfig.productKey}/${deviceConfig.deviceName}/user/get`;
 30client.subscribe(subTopic)
 31client.on('message', function(topic, message) {
 32    console.log("topic " + topic) 33    console.log("message " + message)
 34})
 35
Avoid using console in code that runs on the browser
 30client.subscribe(subTopic)
 31client.on('message', function(topic, message) {
 32    console.log("topic " + topic)
 33    console.log("message " + message) 34})
 35
 36//IoT平台mqtt连接参数初始化
Avoid using console in code that runs on the browser
 79            }
 80        }
 81    }
 82    console.log("===Report Scan Data\n topic=" + topic) 83    console.log(payloadJson)
 84    return JSON.stringify(payloadJson);
 85}
Avoid using console in code that runs on the browser
116        const sn = ALIYUN.DEVICE_NAME;
117        let rawdata = fs.readFileSync(jsonFile);
118        let person = JSON.parse(rawdata);
119        console.log(person.START_JUMP)120        let client = Client.createClient(ALIYUN.ACCESS_KEY, ALIYUN.ACCESS_KEY_SECRET);
121        await Client.BatchPubSample(client, ALIYUN.PRODUCT_KEY, ALIYUN.IOT_INSTANCE_ID, base64encode(JSON.stringify(person.START_JUMP)), topic, sn);
122    }
Avoid using console in code that runs on the browser
105        const sn = ALIYUN.DEVICE_NAME;
106        let rawdata = fs.readFileSync(jsonFile);
107        let person = JSON.parse(rawdata);
108        console.log(person.GROUPING)109        let client = Client.createClient(ALIYUN.ACCESS_KEY, ALIYUN.ACCESS_KEY_SECRET);
110        await Client.BatchPubSample(client, ALIYUN.PRODUCT_KEY, ALIYUN.IOT_INSTANCE_ID, base64encode(JSON.stringify(person.GROUPING)), topic, sn);
111    }