|
|
@@ -11,9 +11,9 @@ |
|
|
|
} from "@/utils/utils" |
|
|
|
import { |
|
|
|
orderList, |
|
|
|
userInfoQuery, |
|
|
|
silentLoginApi, |
|
|
|
selectCarInfo |
|
|
|
selectCarInfo, |
|
|
|
oneOreTwo |
|
|
|
} from "@/utils/network/api.js"; |
|
|
|
import { |
|
|
|
getItem, |
|
|
@@ -49,57 +49,57 @@ |
|
|
|
// 31发票 32月结单查询 |
|
|
|
|
|
|
|
onLoad((options) => { |
|
|
|
if(options.params){ |
|
|
|
let params=JSON.parse(decodeURIComponent(options.params)) |
|
|
|
// 登录回来 |
|
|
|
console.log("options",params) |
|
|
|
state.type = params.type |
|
|
|
state.name = params.name |
|
|
|
state.vehicleId = params.vehicleId |
|
|
|
state.deptShortName = params.deptShortName |
|
|
|
state.userType = params.userType |
|
|
|
state.userIdNum = params.userIdNum |
|
|
|
state.mobile = params.mobile |
|
|
|
if (options.params) { |
|
|
|
let params = JSON.parse(decodeURIComponent(options.params)) |
|
|
|
// 登录回来 |
|
|
|
console.log("options", params) |
|
|
|
state.type = params.type |
|
|
|
state.name = params.name |
|
|
|
state.vehicleId = params.vehicleId |
|
|
|
state.deptShortName = params.deptShortName |
|
|
|
state.userType = params.userType |
|
|
|
state.userIdNum = params.userIdNum |
|
|
|
state.mobile = params.mobile |
|
|
|
judge() |
|
|
|
} else { |
|
|
|
// 不需要登录 |
|
|
|
state.type = options.type |
|
|
|
state.name = options.name |
|
|
|
state.vehicleId = options.vehicleId |
|
|
|
state.deptShortName = options.deptShortName |
|
|
|
state.userType = options.userType |
|
|
|
state.userIdNum = options.userIdNum |
|
|
|
state.mobile = options.mobile |
|
|
|
console.log("options", options) |
|
|
|
if ((options.userType && state.userIdNum) || (options.userType && state.mobile)) { |
|
|
|
// 登录了 |
|
|
|
silentLogin().then(() => { |
|
|
|
judge() |
|
|
|
}else{ |
|
|
|
// 不需要登录 |
|
|
|
state.type = options.type |
|
|
|
state.name = options.name |
|
|
|
state.vehicleId = options.vehicleId |
|
|
|
state.deptShortName = options.deptShortName |
|
|
|
state.userType = options.userType |
|
|
|
state.userIdNum = options.userIdNum |
|
|
|
state.mobile = options.mobile |
|
|
|
console.log("options", options) |
|
|
|
if((options.userType && state.userIdNum) || (options.userType && state.mobile)){ |
|
|
|
// 登录了 |
|
|
|
silentLogin().then(() => { |
|
|
|
judge() |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
let obj={ |
|
|
|
type:state.type, |
|
|
|
name:state.name, |
|
|
|
vehicleId:state.vehicleId, |
|
|
|
deptShortName:state.deptShortName, |
|
|
|
userType:state.userType, |
|
|
|
userIdNum:state.userIdNum, |
|
|
|
mobile:state.mobile, |
|
|
|
} |
|
|
|
const params = encodeURIComponent(JSON.stringify(obj)) |
|
|
|
// 没登录情况 |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/login/login?back=2¶ms=${params}`, |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
let obj = { |
|
|
|
type: state.type, |
|
|
|
name: state.name, |
|
|
|
vehicleId: state.vehicleId, |
|
|
|
deptShortName: state.deptShortName, |
|
|
|
userType: state.userType, |
|
|
|
userIdNum: state.userIdNum, |
|
|
|
mobile: state.mobile, |
|
|
|
} |
|
|
|
const params = encodeURIComponent(JSON.stringify(obj)) |
|
|
|
// 没登录情况 |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/login/login?back=2¶ms=${params}`, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
// 判断哪些需要跳转 |
|
|
|
const judge=()=>{ |
|
|
|
if(state.type == "9" || state.type == "20" || state.type == "23" || state.type == "25" || state.type == "28" || state.type == "31"){ |
|
|
|
const judge = () => { |
|
|
|
if (state.type == "9" || state.type == "20" || state.type == "23" || state.type == "25" || state.type == "28" || state.type == "31") { |
|
|
|
jump() |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
quanCheckActionTrue().then((item : any) => { |
|
|
|
console.log("item====", item, item.data.length) |
|
|
|
if (item.data.length == 1) { |
|
|
@@ -115,7 +115,7 @@ |
|
|
|
}) |
|
|
|
}, 1500) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@@ -218,7 +218,18 @@ |
|
|
|
} else if (state.type == "27") { |
|
|
|
navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?id=${state.id}`) |
|
|
|
} else if (state.type == "28") { |
|
|
|
navTo(`/subpackage/personal-center/install-activation-order`) |
|
|
|
queryOneOreTwo().then((data) => { |
|
|
|
// newStatus 0:未激活(首次激活) 1:激活(obu重新激活) |
|
|
|
console.log("data000", data) |
|
|
|
if (data.pass == "on") { |
|
|
|
if (data.newStatus == "0") { |
|
|
|
navTo(`/subpackage/personal-center/install-activation-order`) |
|
|
|
} else { |
|
|
|
navTo(`/subpackage/after-sale/activation-once-again/select-car?type=1`) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} else if (state.type == "29") { |
|
|
|
navTo(`/subpackage/personal-center/search/select-card?vehicleId=${state.vehicleId}`) |
|
|
|
} else if (state.type == "30") { |
|
|
@@ -269,8 +280,29 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
// 查询首次激活还是OBU重新激活 |
|
|
|
const queryOneOreTwo = () => { |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
|
"source": 'MINI_PROGRAM', |
|
|
|
"vehicleId": state.vehicleId |
|
|
|
}, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
const res = await request(oneOreTwo, options); |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
console.log("data==", data) |
|
|
|
resolve(data); |
|
|
|
}).catch((error) => { |
|
|
|
reject(error); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |