|
|
@@ -90,14 +90,8 @@ |
|
|
|
uni.$on('bluetoothLink', function (status) { |
|
|
|
queryCardSignCancellation(1, 1, 1).then((item : any) => { |
|
|
|
instructAction(item).then(value => { |
|
|
|
if (value.orderStatus === 1) { |
|
|
|
instructAction(item) |
|
|
|
} else { |
|
|
|
queryConfirmSignCancellation(0).then((val : any) => { |
|
|
|
console.log(val) |
|
|
|
navTo("/subpackage/after-sale/ETC-log-off/log-off-result"); |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log('orderStatus=======', value.orderStatus) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
@@ -151,28 +145,40 @@ |
|
|
|
); |
|
|
|
console.log("打印指令状态"); |
|
|
|
console.log(status); |
|
|
|
if (status === "9000") { |
|
|
|
var form = { |
|
|
|
command: data.command, |
|
|
|
response: res.toString(), |
|
|
|
cosRecordId: data.cosRecordId, |
|
|
|
cardId: form.cardId, |
|
|
|
cosType: 9 //1- 开卡. 2- 修改卡内信息 4- 卡签绑定 9- 销卡 |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: form, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
const res = await request(writeCardBack, options); |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
var formes = { |
|
|
|
command: data.command, |
|
|
|
response: res.toString(), |
|
|
|
cosRecordId: data.cosRecordId, |
|
|
|
cardId: form.cardId, |
|
|
|
cosType: 9 //1- 开卡. 2- 修改卡内信息 4- 卡签绑定 9- 销卡 |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: formes, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
const res = await request(writeCardBack, options); |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
console.log('data--------------', data) |
|
|
|
if (status === "9000") { |
|
|
|
if (data.orderStatus === 1) { |
|
|
|
instructAction(data) |
|
|
|
} else { |
|
|
|
queryConfirmSignCancellation(0).then((val : any) => { |
|
|
|
console.log(val) |
|
|
|
navTo("/subpackage/after-sale/ETC-log-off/log-off-result"); |
|
|
|
}) |
|
|
|
} |
|
|
|
resolve(data); |
|
|
|
}).catch((error) => { |
|
|
|
reject(error); |
|
|
|
}); |
|
|
|
} |
|
|
|
} else { |
|
|
|
reject("指令执行失败!"); |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
console.log('指令执行失败', error) |
|
|
|
reject(error); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|