You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9901Jump.js 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import {
  2. getItem
  3. } from "@/utils/storage";
  4. export function jump(type,item){
  5. // type 1 obu重新激活 2 卡签注销 3更换设备 4卡签续期 5挂失解挂 6增补设备 售后业务
  6. // 14 首次激活 15客车个人用户办理etc
  7. // 7申请换货 8申请退货 9申请补货 没激活之前
  8. // 10 上传身份信息 11待支付 12待签约 13异地-邮寄地址填写
  9. let data=""//传递过来的数据
  10. if(item){
  11. data = JSON.parse(decodeURIComponent(item))
  12. }
  13. console.log("type",type,data)
  14. let redirectUrl=""
  15. let handleType=""
  16. let orderType=""
  17. let afterType=""
  18. let accountType=""
  19. let carType=""
  20. if(type=="15" ){
  21. // 7. accountType 1 个人 2企业
  22. // 8. carType 0 客车 1 货车
  23. accountType=data.userType
  24. carType=data.type=='1'?0:1
  25. console.log("accountType",accountType,carType)
  26. redirectUrl=`/pages/order/order`
  27. }
  28. if(type=="10" || type=="11" || type=="12"|| type=="13"){
  29. redirectUrl="/pages/order/order"
  30. handleType="continuation"
  31. }
  32. // 售后激活 更换卡签
  33. if(type=="14" && (data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL')){
  34. afterType=3
  35. orderType=2
  36. handleType="aftersale"
  37. redirectUrl="/pages/order/order"
  38. }else{
  39. // 14 正常激活
  40. redirectUrl="/pages/order/order"
  41. handleType="continuation"
  42. }
  43. if(type=="7" || type=="8" || type=="9"){
  44. redirectUrl="/pages/order/order"
  45. handleType="aftersale"
  46. if(type=="7"){
  47. afterType=7
  48. }else if(type=="8"){
  49. afterType=8
  50. }else if(type=="9"){
  51. afterType=9
  52. }
  53. if(data['after']){
  54. orderType=2
  55. // plateNum 车牌号码和颜色编号 例:浙A0P73H_0
  56. // orderNo 订单编号
  57. // afterType 售后办理类型 1.挂失 2.解挂 3.更换 4.续期 5.补办 6.注销 7.换货 8.退货 9.补货
  58. // orderType 订单类型 1.新办 2.售后
  59. }else{
  60. orderType=1
  61. }
  62. }
  63. // 售后业务
  64. if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){
  65. redirectUrl="/pages/index/index"
  66. handleType="aftersale"
  67. if(data['after']){
  68. orderType=2
  69. }else{
  70. orderType=1
  71. }
  72. }
  73. // 售后办理类型
  74. if(type=="2"){
  75. afterType=6
  76. }else if(type=="3"){
  77. afterType=3
  78. }else if(type=="4"){
  79. afterType=4
  80. }else if(type=="5"){
  81. afterType=1
  82. }else if(type=="6"){
  83. afterType=5
  84. }
  85. // 重新激活
  86. if(type=="1"){
  87. handleType="reactivate"
  88. redirectUrl="/pages/index/index"
  89. }
  90. uni.navigateTo({
  91. url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId?data.vehicleId:""}&handleType=${handleType}&orderNo=${data.orderId?data.orderId:""}&orderType=${orderType}&afterType=${afterType}&accountType=${accountType}&carType=${carType}`
  92. })
  93. }