您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

9901Jump.js 3.4KB

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