1 Star 0 Fork 11

ww/WeChat Ble To ESP32 Ble

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
app.js 566 Bytes
一键复制 编辑 原始数据 按行查看 历史
吕合金 提交于 2020-06-24 14:21 . 上传
//app.js
App({
buf2hex: function (buffer) {
return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('')
},
buf2string: function (buffer) {
var arr = Array.prototype.map.call(new Uint8Array(buffer), x => x)
var str = ''
for (var i = 0; i < arr.length; i++) {
str += String.fromCharCode(arr[i])
}
return str
},
onLaunch: function () {
this.globalData.SystemInfo = wx.getSystemInfoSync()
//console.log(this.globalData.SystemInfo)
},
globalData: {
SystemInfo: {}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/qazwsxedcaa/WeChat-Ble-To-ESP32-Ble.git
git@gitee.com:qazwsxedcaa/WeChat-Ble-To-ESP32-Ble.git
qazwsxedcaa
WeChat-Ble-To-ESP32-Ble
WeChat Ble To ESP32 Ble
master

搜索帮助