Sfoglia il codice sorgente

2023年5月18日16:31:24

yxb
wq 2 anni fa
parent
commit
908d941f9d

+ 4
- 9
pages/recharge/recharge.vue Vedi File

state.cardId = option.cardId; state.cardId = option.cardId;
state.connectSuccess = option.connectSuccess; state.connectSuccess = option.connectSuccess;
state.orderNum = getItem("orderNum"); state.orderNum = getItem("orderNum");
//跳转过来走圈存流程
if (state.connectSuccess === "1") { if (state.connectSuccess === "1") {
/*读卡*/ /*读卡*/
getCardId(); getCardId();
state.orderNum = checkResult.orders[0].orderNum; state.orderNum = checkResult.orders[0].orderNum;
setItem("orderNum", state.orderNum); setItem("orderNum", state.orderNum);
//链接蓝牙 //链接蓝牙
uni.navigateTo({
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
});
go()
} else { } else {
console.log(`进行充值申请`);
cardCzApplyAction().then((applyResult: any) => { cardCzApplyAction().then((applyResult: any) => {
//拿到订单 存起来 //拿到订单 存起来
state.orderNum = applyResult.orderNum; state.orderNum = applyResult.orderNum;
setItem("orderNum", state.orderNum); setItem("orderNum", state.orderNum);
//如果订单没有支付 走支付 //如果订单没有支付 走支付
if (applyResult.orderStatus ===
"ORDER_NOT_PAY") {
if (applyResult.orderStatus === "ORDER_NOT_PAY") {
//走支付 //走支付
console.log("走支付"); console.log("走支付");
wxPayment(); wxPayment();
}); });
} else { } else {
//走蓝牙进行修复 //走蓝牙进行修复
uni.navigateTo({
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
});
go()
} }
}); });
} }

+ 33
- 31
subpackage/after-sale/pin-code-deblocking/pin-code-confirm.vue Vedi File

<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;

Loading…
Annulla
Salva