Browse Source

2023年9月24日17:32:44

yxb
wq 1 year ago
parent
commit
73c5b4e568
2 changed files with 21 additions and 1 deletions
  1. 6
    1
      pages/bluetooth/bluetooth.vue
  2. 15
    0
      static/etcUtil/index.js

+ 6
- 1
pages/bluetooth/bluetooth.vue View File

@@ -360,8 +360,13 @@
// #ifdef MP-ALIPAY
wjApi.connectDevice(
function (res) {
console.log('链接结果',res)
console.log('链接结果', res)
connectSuccess(res);
if (res.code == 0) {
connectSuccess(res);
} else {
listenStatus(res);
}
}
);
// #endif

+ 15
- 0
static/etcUtil/index.js View File

@@ -123,6 +123,20 @@ function transCmd(cmdArr, type, func, callBack = null) {
var connectPrefixName = datas.getData("connectPrefixName");
switch (connectPrefixName) {
case "WJ":
// #ifdef MP-ALIPAY
wjApi.transCmd(cmdArr, type, '00',function(res) {
if (res.code == 0) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
} else {
alertF(res.msg);
}
}
});
// #endif
// #ifdef MP-WEIXIN
wjApi.transCmd(cmdArr, type, function(res) {
if (res.code == 0) {
func(res.data);
@@ -134,6 +148,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
}
}
});
// #endif
break;
case "JL":
jlApi.transCmd(cmdArr, type, function(res) {

Loading…
Cancel
Save