const gotoActiveOrder = (orderInfo : any) => { | const gotoActiveOrder = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | if (orderInfo.agencyId == agencyId) { | ||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("3", params) | |||||
jump("14", params) | |||||
} else { | } else { | ||||
navTo(`/subpackage/after-sale/activation/operation-tips?id=${orderInfo.id}&orderId=${orderInfo.orderId}&cardStatus=${orderInfo.cardStatus}&obuStatus=${orderInfo.obuStatus}&transfer=${orderInfo.transfer}`); | navTo(`/subpackage/after-sale/activation/operation-tips?id=${orderInfo.id}&orderId=${orderInfo.orderId}&cardStatus=${orderInfo.cardStatus}&obuStatus=${orderInfo.obuStatus}&transfer=${orderInfo.transfer}`); | ||||
} | } |
getItem | getItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
export function jump(type,item){ | export function jump(type,item){ | ||||
// type 1 obu重新激活 2 卡签注销 3 首次激活 4客车个人用户办理etc 5更换设备 6卡签续期 7申请换货 8申请退货 9申请补货 | |||||
// type 1 obu重新激活 2 卡签注销 3更换设备 4卡签续期 5挂失解挂 6增补设备 售后业务 | |||||
// 14 首次激活 15客车个人用户办理etc | |||||
// 7申请换货 8申请退货 9申请补货 没激活之前 | |||||
// 10 上传身份信息 11待支付 12待签约 13异地-邮寄地址填写 | // 10 上传身份信息 11待支付 12待签约 13异地-邮寄地址填写 | ||||
console.log("type",type,item) | |||||
let data=""//传递过来的数据 | let data=""//传递过来的数据 | ||||
if(item){ | if(item){ | ||||
data = JSON.parse(decodeURIComponent(item)) | data = JSON.parse(decodeURIComponent(item)) | ||||
} | } | ||||
console.log("type",type,data) | |||||
let redirectUrl="" | let redirectUrl="" | ||||
let handleType="" | let handleType="" | ||||
if(type==4 ){ | |||||
let orderType="" | |||||
let afterType="" | |||||
if(type=="15" ){ | |||||
redirectUrl="/pages/order/order" | redirectUrl="/pages/order/order" | ||||
} | } | ||||
if(type==3 || type==10 || type==12 || type==11 || type==13){ | |||||
if(type=="14" || type=="10" || type=="11" || type=="12"|| type=="13"){ | |||||
redirectUrl="/pages/order/order" | redirectUrl="/pages/order/order" | ||||
handleType="continuation" | handleType="continuation" | ||||
} | } | ||||
if(type=="7" || type=="8" || type=="9"){ | |||||
redirectUrl="/pages/order/order" | |||||
handleType="aftersale" | |||||
if(data['after']){ | |||||
orderType=2 | |||||
// plateNum 车牌号码和颜色编号 例:浙A0P73H_0 | |||||
// orderNo 订单编号 | |||||
// afterType 售后办理类型 1.挂失 2.解挂 3.更换 4.续期 5.补办 6.注销 7.换货 8.退货 9.补货 | |||||
// orderType 订单类型 1.新办 2.售后 | |||||
if(type=="7"){ | |||||
afterType=7 | |||||
}else if(type=="8"){ | |||||
afterType=8 | |||||
}else if(type=="9"){ | |||||
afterType=9 | |||||
} | |||||
}else{ | |||||
orderType=1 | |||||
} | |||||
} | |||||
// 售后业务 | |||||
if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){ | |||||
redirectUrl="/pages/service/service" | |||||
handleType="aftersale" | |||||
if(data['after']){ | |||||
orderType=2 | |||||
}else{ | |||||
orderType=1 | |||||
} | |||||
} | |||||
// 售后办理类型 | |||||
if(type=="2"){ | |||||
afterType=6 | |||||
}else if(type=="3"){ | |||||
afterType=3 | |||||
}else if(type=="4"){ | |||||
afterType=4 | |||||
}else if(type=="5"){ | |||||
afterType=1 | |||||
}else if(type=="6"){ | |||||
afterType=5 | |||||
} | |||||
// 重新激活 | |||||
if(type=="1"){ | |||||
handleType="reactivate" | |||||
redirectUrl="/pages/service/service" | |||||
} | |||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId}&handleType=${handleType}` | |||||
url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId}&handleType=${handleType}&orderNo=${data.orderId}&orderType=${orderType}&afterType=${afterType}` | |||||
}) | }) | ||||
kcApi.transCmd(cmdArr, type, function(res) { | kcApi.transCmd(cmdArr, type, function(res) { | ||||
console.log('kc执行内容====11111', res) | console.log('kc执行内容====11111', res) | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
func(res.data); | func(res.data); | ||||
} else { | } else { | ||||
if (callBack != null) { | if (callBack != null) { |
console.log(item.cardId); | console.log(item.cardId); | ||||
flag.value = i | flag.value = i | ||||
// 判断9901 | // 判断9901 | ||||
if (item.agencyId == "agencyId") { | |||||
if (item.agencyId == agencyId) { | |||||
// OBU重新激活跳转 | // OBU重新激活跳转 | ||||
const params = encodeURIComponent(JSON.stringify(item)) | const params = encodeURIComponent(JSON.stringify(item)) | ||||
if(state.type=="5"){ | |||||
} | |||||
jump(state.type, params) | jump(state.type, params) | ||||
} else { | } else { | ||||
if (state.type == "1") { | if (state.type == "1") { |
// } | // } | ||||
// }) | // }) | ||||
} else { | } else { | ||||
let cmdArr = [cmd.HOME_DIRECTORY, cmd.APPLICATION_DIRECTORY, cmd.CARD_KC]; | |||||
let cmdArr = [cmd.HOME_DIRECTORY, cmd.APPLICATION_DIRECTORY, "00B095002B"]; | |||||
console.log(cmdArr); | console.log(cmdArr); | ||||
console.log(bluetoothUtil); | console.log(bluetoothUtil); | ||||
bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU | bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU | ||||
return; | return; | ||||
} | } | ||||
obu.num = obuStr.substring(20, 36) | obu.num = obuStr.substring(20, 36) | ||||
let arr = [cmd.OBU_DF01, cmd.OBU_00B400000A + rand + cmd.OBU_4F00]; | |||||
bluetoothUtil.transCmd(arr, '20', function(res) { | |||||
console.log("解密信息",res); | |||||
}) | |||||
return; | return; | ||||
let str = res[1].substring(res[1].length - 4, res[1].length); | let str = res[1].substring(res[1].length - 4, res[1].length); | ||||
if (str == "9000") { | if (str == "9000") { |
}) | }) | ||||
const addInterestsList = () => { | const addInterestsList = () => { | ||||
if(state.signAgencyId=="52010102041"){ | if(state.signAgencyId=="52010102041"){ | ||||
// jump("4","") | |||||
uni.navigateTo({ | |||||
url:`plugin://issuer-plugin/login?wxOpenId=${getItem("QYorder").openid}&type=1` | |||||
}) | |||||
jump("15","") | |||||
// uni.navigateTo({ | |||||
// url:`plugin://issuer-plugin/login?wxOpenId=${getItem("QYorder").openid}&type=1` | |||||
// }) | |||||
}else{ | }else{ | ||||
if (state.changeCardType == "1") { | if (state.changeCardType == "1") { | ||||
navTo( | navTo( |