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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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"){
  45. if(data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL'){
  46. afterType=3
  47. orderType=2
  48. handleType="aftersale"
  49. redirectUrl="/pages/order/order"
  50. }else{
  51. // 14 正常激活
  52. redirectUrl="/pages/order/order"
  53. handleType="continuation"
  54. }
  55. }
  56. if(type=="7" || type=="8" || type=="9"){
  57. redirectUrl="/pages/order/order"
  58. handleType="aftersale"
  59. if(type=="7"){
  60. afterType=7
  61. }else if(type=="8"){
  62. afterType=8
  63. }else if(type=="9"){
  64. afterType=9
  65. }
  66. if(data['after']){
  67. orderType=2
  68. // plateNum 车牌号码和颜色编号 例:浙A0P73H_0
  69. // orderNo 订单编号
  70. // afterType 售后办理类型 1.挂失 2.解挂 3.更换 4.续期 5.补办 6.注销 7.换货 8.退货 9.补货
  71. // orderType 订单类型 1.新办 2.售后
  72. }else{
  73. orderType=1
  74. }
  75. }
  76. // 售后业务
  77. if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){
  78. redirectUrl="/pages/index/index"
  79. handleType="aftersale"
  80. if(data['after']){
  81. orderType=2
  82. }else{
  83. orderType=1
  84. }
  85. }
  86. // 售后办理类型
  87. if(type=="2"){
  88. afterType=6
  89. }else if(type=="3"){
  90. afterType=3
  91. }else if(type=="4"){
  92. afterType=4
  93. }else if(type=="5"){
  94. afterType=1
  95. }else if(type=="6"){
  96. afterType=5
  97. }
  98. // 重新激活
  99. if(type=="1"){
  100. handleType="reactivate"
  101. redirectUrl="/pages/index/index"
  102. }
  103. console.log("data.promoteId",data.promoteId,handleType)
  104. uni.navigateTo({
  105. 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")}`
  106. })
  107. }
  108. }