import { getItem } from "@/utils/storage"; export function jump(type,item){ // type 1 obu重新激活 2 卡签注销 3更换设备 4卡签续期 5挂失解挂 6增补设备 售后业务 // 14 首次激活 15客车个人用户办理etc // 7申请换货 8申请退货 9申请补货 没激活之前 // 10 上传身份信息 11待支付 12待签约 13异地-邮寄地址填写 18去下单 // 16签约 17卡签信息读取(没登录去异地登录) // 19 恢复签约 // plateNum 车牌号码和颜色编号 例:浙A0P73H_0 // orderNo 订单编号 // afterType 售后办理类型 1.挂失/解挂 3.更换 4.续期 5.补办(增补设备) 6.注销 7.换货 8.退货 9.补货(申请补货) // orderType 订单类型 1.新办 2.售后 // 需要小程序跳转的: // 1.新办理的订单在设备在已发货未二发前可进行退货、换货、补货的业务。 // 2. 已激活设备可发起挂失、解挂、更换、补办、注销、续期售后业务。针对更换、补办产生的订单在已发货未二发前可以进行退货、换货、补货业务。 if(type=="17"){ uni.navigateTo({ url:`plugin://issuer-plugin/login?redirectUrl=/pages/index/index&type=1&mobile=${getItem("mobile")}` }) }else if(type=="16"){ uni.navigateTo({ url:`plugin://issuer-plugin/login?redirectUrl=/pages/index/index&wechatSignNo=${item}&mobile=${getItem("mobile")}` }) }else{ let data=""//传递过来的数据 if(item){ data = JSON.parse(decodeURIComponent(item)) } console.log("type",type,data) let redirectUrl="" let handleType="" let orderType="" let afterType="" let accountType="" let carType="" if(type=="15" ){ // 7. accountType 1 个人 2企业 // 8. carType 0 客车 1 货车 accountType=data.userType carType=data.type=='1'?0:1 console.log("accountType",accountType,carType,type,handleType) redirectUrl=`/pages/order/order` } if(type=="10" || type=="12"|| type=="13" || type=="18"){ redirectUrl="/pages/order/order" handleType="continuation" console.log("accountType",type) } if(type=="11"){ if(data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL'){ // 售后换卡换签换卡签 redirectUrl="/pages/order/order" handleType="aftersale" afterType=3 }else if(data['orderType']=='FILL_OBU'|| data['orderType']=='FILL_CARD'){ // 补卡 补签(没有补卡签) redirectUrl="/pages/order/order" handleType="aftersale" afterType=5 }else{ // 正常支付 redirectUrl="/pages/order/order" handleType="continuation" } } // 售后激活 更换卡签 if(type=="14"){ if(data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL'){ afterType=3 orderType=2 handleType="aftersale" redirectUrl="/pages/order/order" }else if(data['orderType']=='FILL_OBU'|| data['orderType']=='FILL_CARD'){ // 补卡 补签(没有补卡签) afterType=5 orderType=2 handleType="aftersale" redirectUrl="/pages/order/order" }else{ // 14 正常激活 redirectUrl="/pages/order/order" handleType="continuation" } } if(type=="7" || type=="8" || type=="9"){ redirectUrl="/pages/order/order" handleType="aftersale" if(type=="7"){ afterType=7 }else if(type=="8"){ afterType=8 }else if(type=="9"){ afterType=9 } if(data['after']){ orderType=2 // plateNum 车牌号码和颜色编号 例:浙A0P73H_0 // orderNo 订单编号 // afterType 售后办理类型 1.挂失 2.解挂 3.更换 4.续期 5.补办 6.注销 7.换货 8.退货 9.补货 // orderType 订单类型 1.新办 2.售后 }else{ orderType=1 } } // 售后业务 if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){ redirectUrl="/pages/index/index" 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/index/index" } if(type=="19"){ handleType="resumeSigning" redirectUrl="/pages/order/order" } console.log("data.promoteId",data.promoteId,handleType) uni.navigateTo({ url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId?data.vehicleId:""}&handleType=${handleType}&orderNo=${(handleType!='continuation' && data.orderId)?data.orderId:""}&orderType=${orderType}&afterType=${afterType}&accountType=${accountType}&carType=${carType}&etcProductId=${data.promoteId?data.promoteId:data.productId}&mobile=${getItem("mobile")}` }) } }