|
|
|
|
|
|
|
|
<view> 用户名称: </view> |
|
|
<view> 用户名称: </view> |
|
|
<text>{{ orderInfos.ownerName }}</text> |
|
|
<text>{{ orderInfos.ownerName }}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="details-item"> |
|
|
|
|
|
|
|
|
<view class="details-item">去 |
|
|
<view> 用户证件类型: </view> |
|
|
<view> 用户证件类型: </view> |
|
|
<text>{{ getCodeName('CERTIFICATE_TYPE',orderInfos.ownerIdtype) }}</text> |
|
|
<text>{{ getCodeName('CERTIFICATE_TYPE',orderInfos.ownerIdtype) }}</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
request(pinCodeUnlock, options).then((res) => { |
|
|
request(pinCodeUnlock, options).then((res) => { |
|
|
tools.hideLoadingAlert(); |
|
|
tools.hideLoadingAlert(); |
|
|
|
|
|
//第一次调用 |
|
|
let result = stringToJson(res.bizContent); |
|
|
let result = stringToJson(res.bizContent); |
|
|
console.log("&&&&&&&&&&&&", result); |
|
|
|
|
|
|
|
|
|
|
|
let cmdArray = result.command ? result.command.split(",") : ""; |
|
|
let cmdArray = result.command ? result.command.split(",") : ""; |
|
|
|
|
|
|
|
|
if (cmdArray.length > 0) { |
|
|
if (cmdArray.length > 0) { |
|
|
tools.showLoadingAlert("正在执行指令"); |
|
|
tools.showLoadingAlert("正在执行指令"); |
|
|
bluetoothUtil.transCmd(cmdArray, "10", function(res) { |
|
|
bluetoothUtil.transCmd(cmdArray, "10", function(res) { |
|
|
tools.hideLoadingAlert(); |
|
|
|
|
|
let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length - |
|
|
|
|
|
4, res[cmdArray.length - 1].length); |
|
|
|
|
|
if (status == "9000") { |
|
|
|
|
|
getCommandBack(result.command, res.toString(), result.pinType); |
|
|
|
|
|
|
|
|
let cosResponse = res.join(","); |
|
|
|
|
|
if (cosResponse == "6985") { |
|
|
|
|
|
tools.showModalAlert("此卡未锁定", function successFunc() {}); |
|
|
|
|
|
} else if (cosResponse == "9303") { |
|
|
|
|
|
tools.showModalAlert("此卡pin已永久锁定!请联系客服进行换卡处理!", function successFunc() {}); |
|
|
|
|
|
} else { |
|
|
|
|
|
getCommandBack(result.command, res.cosResponse, result.pinType); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
request(pinCodeUnlock, options).then((res) => { |
|
|
request(pinCodeUnlock, options).then((res) => { |
|
|
tools.hideLoadingAlert(); |
|
|
tools.hideLoadingAlert(); |
|
|
let result = stringToJson(res.bizContent); |
|
|
let result = stringToJson(res.bizContent); |
|
|
console.log("**************", result); |
|
|
|
|
|
|
|
|
|
|
|
let cmdArray = result.command ? result.command.split(",") : ""; |
|
|
|
|
|
console.log(cmdArray); |
|
|
|
|
|
console.log(cmdArray.length); |
|
|
|
|
|
if (cmdArray.length > 0) { |
|
|
|
|
|
tools.showLoadingAlert("正在执行指令"); |
|
|
|
|
|
bluetoothUtil.transCmd(cmdArray, "10", function(res) { |
|
|
|
|
|
console.log("执行指令~~~~~~~~~~~~~~~~", res); |
|
|
|
|
|
tools.hideLoadingAlert(); |
|
|
|
|
|
let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length - |
|
|
|
|
|
4, res[cmdArray.length - 1].length); |
|
|
|
|
|
if (status == "9000") { |
|
|
|
|
|
|
|
|
|
|
|
console.log("执行指令成功结束~~~~~~~~~~~~~~~~"); |
|
|
|
|
|
state.showPopup = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
state.showPopup = true; |
|
|
|
|
|
state.status = false; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (result.cardUnblockStatus == "1") { |
|
|
|
|
|
tools.showModalAlert("解锁成功", function successFunc() {}); |
|
|
|
|
|
} else if (result.cardUnblockStatus == "2") { |
|
|
|
|
|
tools.showModalAlert("解锁失败", function successFunc() {}); |
|
|
|
|
|
} else if (result.cardUnblockStatus == "3") { |
|
|
|
|
|
let cmdArray = result.command ? result.command.split(",") : ""; |
|
|
|
|
|
if (cmdArray.length > 0) { |
|
|
|
|
|
tools.showLoadingAlert("正在执行指令"); |
|
|
|
|
|
bluetoothUtil.transCmd(cmdArray, "10", function(res) { |
|
|
|
|
|
tools.hideLoadingAlert(); |
|
|
|
|
|
let cosResponse = res.join(","); |
|
|
|
|
|
if (cosResponse == "6985") { |
|
|
|
|
|
tools.alertF("此卡未锁定"); |
|
|
|
|
|
} else if (cosResponse == "9303") { |
|
|
|
|
|
tools.alertF("此卡pin已永久锁定!请联系客服进行换卡处理!"); |
|
|
|
|
|
} else { |
|
|
|
|
|
getCommandBack(result.command, res.cosResponse, result.pinType); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//去连接蓝牙 |
|
|
//去连接蓝牙 |
|
|
const toPage = () => { |
|
|
const toPage = () => { |
|
|
// getPinCodeUnlock() |
|
|
// getPinCodeUnlock() |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//关闭弹窗 |
|
|
//关闭弹窗 |
|
|
const cancel = () => { |
|
|
const cancel = () => { |
|
|
state.flag = true; |
|
|
state.flag = true; |