|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import {
- getItem
- } from "@/utils/storage";
- export function jump(type,item){
- console.log("type",type,item)
- let data=""//传递过来的数据
- if(item){
- data = JSON.parse(decodeURIComponent(item))
- }
- let path=""
- let jumpType=type //1 obu重新激活 2 卡签注销 3 首次激活 4客车个人用户办理etc 5 更换设备 6 卡签续期
- if(jumpType=="1"){
- path="pages/route/index"
- }else if(jumpType=="2"){
- path="pages/route/index"
- }else if(jumpType=="3"){
- path="pages/route/index"
- }else if(jumpType=="4"){
- path="pages/route/index"
- }else if(jumpType=="5"){
- if(item.applyType=="EXCHANGE_CARD"){
- // 卡
- path="pages/route/index"
- }else if(item.applyType=="EXCHANGE_OBU"){
- // 签
- path="pages/route/index"
- }else if(item.applyType=="EXCHANGE_ALL"){
- // 卡签
- path="pages/route/index"
- }
- }else if(jumpType=="6"){ //卡签续期 renevalType
- if(item.renevalType=="1"){
- // 卡
- path="pages/route/index"
- }else if(item.renevalType=="2"){
- // 签
- path="pages/route/index"
- }else if(item.renevalType=="3"){
- // 卡签
- path="pages/route/index"
- }
- }
- console.log("===",getItem("QYorder").openid,data.vehicleId,data.cardId,jumpType)
- uni.navigateToMiniProgram({
- appId: "wxbcad394b3d99dac9",
- path: path,
- extraData: {
- openid: getItem("QYorder").openid,
- access_token: getItem("QYorder").access_token,
- mobile: getItem("mobile"),
- vehicleId: data.vehicleId?data.vehicleId:"",
- cardId: data.cardId?data.cardId:"",
- obuId: data.obuId?data.obuId:"" ,
- },
- success(res) {
- console.log(res);
- },
- complete(res) {
- console.log(res);
- },
- fail(res) {
- console.log(res);
- // 未成功跳转到车主小程序
- },
- })
- }
|