大佬把解锁的功能在代码里面屏蔽了。 你把这行代码改下就可以了
let userInfo = global.get("bydUserInfo");
const commandPwd = "你的控制密码" //控制密码的MD5大写值
let apiPayload = msg.payload
if (userInfo) {
msg.headers = {};
msg.headers['Content-Type'] = 'application/json';
msg.headers['cookie'] = userInfo.cookies
let basic_payload = { "caridentifier": userInfo.vin, "timeStamp": Math.floor(Date.now()) }
if (typeof (apiPayload) === "string") {
if (apiPayload != ""){ //此处原来是屏蔽的解锁车
basic_payload.commandPwd = commandPwd
basic_payload.commandType = apiPayload
flow.set("bydApiPayload", apiPayload);
msg.payload = JSON.stringify(basic_payload)
return [msg, null]
}
} else {
if (0 == apiPayload.rebackResult){
basic_payload.requestSerial = apiPayload.requestSerial
basic_payload.commandType = flow.get("bydApiPayload")
msg.payload = JSON.stringify(basic_payload)
return [null, msg]
}
}
}
|