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

9901Jump.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import {
  2. getItem
  3. } from "@/utils/storage";
  4. export function jump(type,item){
  5. console.log("type",type,item)
  6. let data=""//传递过来的数据
  7. if(item){
  8. data = JSON.parse(decodeURIComponent(item))
  9. }
  10. let path=""
  11. let jumpType=type //1 obu重新激活 2 卡签注销 3 首次激活 4客车个人用户办理etc 5 更换设备 6 卡签续期
  12. if(jumpType=="1"){
  13. path="pages/route/index"
  14. }else if(jumpType=="2"){
  15. path="pages/route/index"
  16. }else if(jumpType=="3"){
  17. path="pages/route/index"
  18. }else if(jumpType=="4"){
  19. path="pages/route/index"
  20. }else if(jumpType=="5"){
  21. if(item.applyType=="EXCHANGE_CARD"){
  22. // 卡
  23. path="pages/route/index"
  24. }else if(item.applyType=="EXCHANGE_OBU"){
  25. // 签
  26. path="pages/route/index"
  27. }else if(item.applyType=="EXCHANGE_ALL"){
  28. // 卡签
  29. path="pages/route/index"
  30. }
  31. }else if(jumpType=="6"){ //卡签续期 renevalType
  32. if(item.renevalType=="1"){
  33. // 卡
  34. path="pages/route/index"
  35. }else if(item.renevalType=="2"){
  36. // 签
  37. path="pages/route/index"
  38. }else if(item.renevalType=="3"){
  39. // 卡签
  40. path="pages/route/index"
  41. }
  42. }
  43. console.log("===",getItem("QYorder").openid,data.vehicleId,data.cardId,jumpType)
  44. uni.navigateToMiniProgram({
  45. appId: "wxbcad394b3d99dac9",
  46. path: path,
  47. extraData: {
  48. openid: getItem("QYorder").openid,
  49. access_token: getItem("QYorder").access_token,
  50. mobile: getItem("mobile"),
  51. vehicleId: data.vehicleId?data.vehicleId:"",
  52. cardId: data.cardId?data.cardId:"",
  53. obuId: data.obuId?data.obuId:"" ,
  54. },
  55. success(res) {
  56. console.log(res);
  57. },
  58. complete(res) {
  59. console.log(res);
  60. },
  61. fail(res) {
  62. console.log(res);
  63. // 未成功跳转到车主小程序
  64. },
  65. })
  66. }