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 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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异地-邮寄地址填写 18去下单
  9. // 16签约 17卡签信息读取(没登录去异地登录)
  10. if(type=="17"){
  11. uni.navigateTo({
  12. url:`plugin://issuer-plugin/login?redirectUrl=/pages/index/index&type=1&mobile=${getItem("mobile")}`
  13. })
  14. }else if(type=="16"){
  15. uni.navigateTo({
  16. url:`plugin://issuer-plugin/login?redirectUrl=/pages/index/index&wechatSignNo=${item}&mobile=${getItem("mobile")}`
  17. })
  18. }else{
  19. let data=""//传递过来的数据
  20. if(item){
  21. data = JSON.parse(decodeURIComponent(item))
  22. }
  23. console.log("type",type,data)
  24. let redirectUrl=""
  25. let handleType=""
  26. let orderType=""
  27. let afterType=""
  28. let accountType=""
  29. let carType=""
  30. if(type=="15" ){
  31. // 7. accountType 1 个人 2企业
  32. // 8. carType 0 客车 1 货车
  33. accountType=data.userType
  34. carType=data.type=='1'?0:1
  35. console.log("accountType",accountType,carType,type,handleType)
  36. redirectUrl=`/pages/order/order`
  37. }
  38. if(type=="10" || type=="11" || type=="12"|| type=="13" || type=="18"){
  39. redirectUrl="/pages/order/order"
  40. handleType="continuation"
  41. console.log("accountType",type)
  42. }
  43. // 售后激活 更换卡签
  44. if(type=="14" && (data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL')){
  45. afterType=3
  46. orderType=2
  47. handleType="aftersale"
  48. redirectUrl="/pages/order/order"
  49. }else if(type=="14"){
  50. // 14 正常激活
  51. redirectUrl="/pages/order/order"
  52. handleType="continuation"
  53. }
  54. if(type=="7" || type=="8" || type=="9"){
  55. redirectUrl="/pages/order/order"
  56. handleType="aftersale"
  57. if(type=="7"){
  58. afterType=7
  59. }else if(type=="8"){
  60. afterType=8
  61. }else if(type=="9"){
  62. afterType=9
  63. }
  64. if(data['after']){
  65. orderType=2
  66. // plateNum 车牌号码和颜色编号 例:浙A0P73H_0
  67. // orderNo 订单编号
  68. // afterType 售后办理类型 1.挂失 2.解挂 3.更换 4.续期 5.补办 6.注销 7.换货 8.退货 9.补货
  69. // orderType 订单类型 1.新办 2.售后
  70. }else{
  71. orderType=1
  72. }
  73. }
  74. // 售后业务
  75. if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){
  76. redirectUrl="/pages/index/index"
  77. handleType="aftersale"
  78. if(data['after']){
  79. orderType=2
  80. }else{
  81. orderType=1
  82. }
  83. }
  84. // 售后办理类型
  85. if(type=="2"){
  86. afterType=6
  87. }else if(type=="3"){
  88. afterType=3
  89. }else if(type=="4"){
  90. afterType=4
  91. }else if(type=="5"){
  92. afterType=1
  93. }else if(type=="6"){
  94. afterType=5
  95. }
  96. // 重新激活
  97. if(type=="1"){
  98. handleType="reactivate"
  99. redirectUrl="/pages/index/index"
  100. }
  101. console.log("data.promoteId",data.promoteId,handleType)
  102. uni.navigateTo({
  103. 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")}`
  104. })
  105. }
  106. }