getCodeName | getCodeName | ||||
} from "@/datas/queryKey.js"; | } from "@/datas/queryKey.js"; | ||||
import { agentId } from "@/utils/network/difference"; | import { agentId } from "@/utils/network/difference"; | ||||
import { secondActiveInstallApply,writeActiveInfo,issueConfirm,commGetDetail,reactivateQuery,vehicleLicenseOcr,reactivateConfirm} from "@/utils/network/api"; | |||||
import { secondActiveInstallApply,issueConfirm,commGetDetail,reactivateQuery,vehicleLicenseOcr,reactivateConfirm,vfjObuActive,vfjCfmActive} from "@/utils/network/api"; | |||||
import { | import { | ||||
getCredentialType | getCredentialType | ||||
} from "@/subpackage/after-sale/js/credentialType.js"; | } from "@/subpackage/after-sale/js/credentialType.js"; | ||||
* VFJ-OBU在线激活 请求 | * VFJ-OBU在线激活 请求 | ||||
*/ | */ | ||||
const getObuActivation = (cmdRandNum : string) => { | const getObuActivation = (cmdRandNum : string) => { | ||||
console.log('======VFJ-OBU在线激活======') | |||||
tools.showLoadingAlert("加载中"); | tools.showLoadingAlert("加载中"); | ||||
let options = { | let options = { | ||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | ||||
data: { | data: { | ||||
random: cmdRandNum, | random: cmdRandNum, | ||||
obuSerailNo: obu.obuId, | |||||
orderId: orderInfos.orderId, | |||||
contractSN: obu.obuId, | |||||
flag:"0001" | |||||
}, //请求参数 | }, //请求参数 | ||||
method: "POST", //提交方式(默认POST) | method: "POST", //提交方式(默认POST) | ||||
showLoading: true, //是否显示加载中(默认显示) | showLoading: true, //是否显示加载中(默认显示) | ||||
}; | }; | ||||
//调用方式 | //调用方式 | ||||
requestNew(writeActiveInfo, options) | |||||
requestNew(vfjObuActive, options) | |||||
.then((res) => { | .then((res) => { | ||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
console.log("在线激活 请求"); | console.log("在线激活 请求"); | ||||
console.log(res); | console.log(res); | ||||
const datas = res; | const datas = res; | ||||
tools.showLoadingAlert("执行指令"); | tools.showLoadingAlert("执行指令"); | ||||
bluetoothUtil.transCmd([datas.data.APDU], "20", function (res) { | |||||
bluetoothUtil.transCmd([datas.apdu], "20", function (res) { | |||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
console.log(res); | console.log(res); | ||||
if (res[0] == "9000") { | if (res[0] == "9000") { | ||||
console.log("在线激活执行指令88888 请求", res); | console.log("在线激活执行指令88888 请求", res); | ||||
getObuInstall(0, ""); //status 0 - 安装成功 || 1 - 安装失败 | |||||
cfmActiveRequest(datas.orderNo) | |||||
} | } | ||||
}); | }); | ||||
}) | }) | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
}; | }; | ||||
// 激活确认 | |||||
const cfmActiveRequest = (orderNo) => { | |||||
tools.showLoadingAlert("加载中"); | |||||
let options = { | |||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
data: { | |||||
orderNo, | |||||
result:"9000", | |||||
code:"00" | |||||
}, //请求参数 | |||||
method: "POST", //提交方式(默认POST) | |||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | |||||
//调用方式 | |||||
requestNew(vfjCfmActive, options) | |||||
.then((res) => { | |||||
tools.hideLoadingAlert(); | |||||
console.log("在线激活 确认"); | |||||
console.log(res); | |||||
getObuInstall(0, ""); //status 0 - 安装成功 || 1 - 安装失败 | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
}; | |||||
/** | /** | ||||
* BDS-安装确认 请求 | * BDS-安装确认 请求 |
cardInfoChangeConfirm, | cardInfoChangeConfirm, | ||||
renewalObu, | renewalObu, | ||||
changeVehicleInfo, | changeVehicleInfo, | ||||
writeActiveInfo, | |||||
cardRenewalConfirm | |||||
cardRenewalConfirm, | |||||
vfjObuActive, | |||||
vfjCfmActive | |||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
import { | import { | ||||
getVehiclePlateColor | getVehiclePlateColor | ||||
* VFJ-OBU在线激活 请求 | * VFJ-OBU在线激活 请求 | ||||
*/ | */ | ||||
const getObuActivation = () => { | const getObuActivation = () => { | ||||
console.log('======VFJ-OBU在线激活======') | |||||
tools.showLoadingAlert("加载中"); | tools.showLoadingAlert("加载中"); | ||||
let options = { | let options = { | ||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | ||||
data: { | data: { | ||||
random: cmdRandNum, | random: cmdRandNum, | ||||
obuSerailNo: orderInfos.obuId, | |||||
orderId: orderInfos.orderId, | |||||
contractSN: obu.obuId, | |||||
flag:"0001" | |||||
}, //请求参数 | }, //请求参数 | ||||
method: "POST", //提交方式(默认POST) | method: "POST", //提交方式(默认POST) | ||||
showLoading: true, //是否显示加载中(默认显示) | showLoading: true, //是否显示加载中(默认显示) | ||||
}; | }; | ||||
//调用方式 | //调用方式 | ||||
requestNew(writeActiveInfo, options) | |||||
requestNew(vfjObuActive, options) | |||||
.then((res) => { | .then((res) => { | ||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
console.log("在线激活 请求",res); | |||||
console.log("在线激活 请求"); | |||||
console.log(res); | |||||
const datas = res; | const datas = res; | ||||
tools.showLoadingAlert("执行指令"); | tools.showLoadingAlert("执行指令"); | ||||
console.log("在线激活 请求==========================", datas, datas.data.APDU); | |||||
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) { | |||||
bluetoothUtil.transCmd([datas.apdu], "20", function (res) { | |||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
console.log("在线激活 请求", res); | |||||
console.log(res); | |||||
if (res[0] == "9000") { | if (res[0] == "9000") { | ||||
sure(2) | |||||
state.showPopup = true; | |||||
console.log("在线激活执行指令88888 请求", res); | |||||
cfmActiveRequest(datas.orderNo) | |||||
} | } | ||||
}); | }); | ||||
}) | }) | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
}; | }; | ||||
// 激活确认 | |||||
const cfmActiveRequest = (orderNo) => { | |||||
tools.showLoadingAlert("加载中"); | |||||
let options = { | |||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
data: { | |||||
orderNo, | |||||
result:"9000", | |||||
code:"00" | |||||
}, //请求参数 | |||||
method: "POST", //提交方式(默认POST) | |||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | |||||
//调用方式 | |||||
requestNew(vfjCfmActive, options) | |||||
.then((res) => { | |||||
tools.hideLoadingAlert(); | |||||
console.log("在线激活 确认"); | |||||
console.log(res); | |||||
sure(2) | |||||
state.showPopup = true; | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
}; | |||||
// const getObuActivation = () => { | |||||
// console.log('======VFJ-OBU在线激活======') | |||||
// tools.showLoadingAlert("加载中"); | |||||
// let options = { | |||||
// type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
// data: { | |||||
// random: cmdRandNum, | |||||
// obuSerailNo: orderInfos.obuId, | |||||
// orderId: orderInfos.orderId, | |||||
// }, //请求参数 | |||||
// method: "POST", //提交方式(默认POST) | |||||
// showLoading: true, //是否显示加载中(默认显示) | |||||
// }; | |||||
// //调用方式 | |||||
// requestNew(writeActiveInfo, options) | |||||
// .then((res) => { | |||||
// tools.hideLoadingAlert(); | |||||
// console.log("在线激活 请求",res); | |||||
// const datas = res; | |||||
// tools.showLoadingAlert("执行指令"); | |||||
// console.log("在线激活 请求==========================", datas, datas.data.APDU); | |||||
// bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) { | |||||
// tools.hideLoadingAlert(); | |||||
// console.log("在线激活 请求", res); | |||||
// if (res[0] == "9000") { | |||||
// sure(2) | |||||
// state.showPopup = true; | |||||
// } | |||||
// }); | |||||
// }) | |||||
// .catch((err) => { | |||||
// console.log(err); | |||||
// }); | |||||
// }; | |||||
//获取订单详情 | //获取订单详情 | ||||
const getOrderDetails = (vehicleId) => { | const getOrderDetails = (vehicleId) => { | ||||
console.log('======获取订单信息======') | console.log('======获取订单信息======') |
//充值检测 | //充值检测 | ||||
czCheckAction().then((checkResult : any) => { | czCheckAction().then((checkResult : any) => { | ||||
//判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | //判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | ||||
if (checkResult.orders && checkResult.orders.length > 0) { | |||||
if (checkResult.orderDTOs && checkResult.orderDTOs.length > 0) { | |||||
//拿到订单,存起来 | //拿到订单,存起来 | ||||
state.orderNum = checkResult.orders[0].orderNum; | |||||
state.orderNum = checkResult.orderDTOs[0].orderNum; | |||||
// setItem("orderNum", state.orderNum); | // setItem("orderNum", state.orderNum); | ||||
// 检测用户是否存在有半条流水 | // 检测用户是否存在有半条流水 | ||||
} else { | } else { | ||||
console.log(`进行充值检测`); | console.log(`进行充值检测`); | ||||
czCheckAction().then((checkResult : any) => { | czCheckAction().then((checkResult : any) => { | ||||
//判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | //判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | ||||
if (checkResult.orders && checkResult.orders.length > 0) { | |||||
if (checkResult.orderDTOs && checkResult.orderDTOs.length > 0) { | |||||
//拿到订单,存起来 | //拿到订单,存起来 | ||||
state.orderNum = checkResult.orders[0].orderNum; | |||||
state.orderNum = checkResult.orderDTOs[0].orderNum; | |||||
// 检测用户是否存在有半条流水 | // 检测用户是否存在有半条流水 | ||||
getCardId() | getCardId() | ||||
} else { | } else { | ||||
console.log("进行充值检测", checkResult) | console.log("进行充值检测", checkResult) | ||||
//判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | //判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙 | ||||
if (checkResult.orders && checkResult.orders.length > 0) { | |||||
state.fee = checkResult.orders[0]['rechargeMoney'] | |||||
state.money = checkResult.orders[0]['rechargeMoney'] / 100 | |||||
if (checkResult.orderDTOs && checkResult.orderDTOs.length > 0) { | |||||
state.fee = checkResult.orderDTOs[0]['rechargeMoney'] | |||||
state.money = checkResult.orderDTOs[0]['rechargeMoney'] / 100 | |||||
//拿到订单,存起来 | //拿到订单,存起来 | ||||
state.orderNum = checkResult.orders[0].orderNum; | |||||
state.orderNum = checkResult.orderDTOs[0].orderNum; | |||||
//链接蓝牙 | //链接蓝牙 | ||||
go(state.money) | go(state.money) | ||||
} else { | } else { |
export const appId = "52030131"; //应用appid 综合业务支撑平台使用 | export const appId = "52030131"; //应用appid 综合业务支撑平台使用 | ||||
export const loginTime = 86400; //登录有效时间(单位s) 1天 | export const loginTime = 86400; //登录有效时间(单位s) 1天 | ||||
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f8"; //支付配置编号 微信小程序支付:6a9a54bc01f6443faea7ffe132b19f6 | |||||
export const wechatPayConfigId = "6a9a54bc01f6443faea7f1e123456902"; //支付配置编号 微信小程序支付:6a9a54bc01f6443faea7ffe132b19f6 | |||||
export const aliPayConfigId = "6a9a54bc01f6443123452b1234"; //支付配置编号 支付宝小程序支付:6a9a54bc01f6443123452b1234 | export const aliPayConfigId = "6a9a54bc01f6443123452b1234"; //支付配置编号 支付宝小程序支付:6a9a54bc01f6443123452b1234 | ||||
export const aliPayConfigIdTwo = "6a9a54bc01f6443123452b1"; | export const aliPayConfigIdTwo = "6a9a54bc01f6443123452b1"; | ||||
//支付宝配置相关 | //支付宝配置相关 | ||||
export const paymentequityapplyapp = "/iaw/app/issue/quanyi/paymentequityapplyapp" //权益支付下单 | export const paymentequityapplyapp = "/iaw/app/issue/quanyi/paymentequityapplyapp" //权益支付下单 | ||||
export const equitypurchasepage = "/iaw/app/issue/quanyi/equitypurchasepage" //购买权益列表 | export const equitypurchasepage = "/iaw/app/issue/quanyi/equitypurchasepage" //购买权益列表 | ||||
export const queryuserallequity = "/iaw/ass/equity/queryuserallequity" //查询用户所有权益 | export const queryuserallequity = "/iaw/ass/equity/queryuserallequity" //查询用户所有权益 | ||||
// export const singleEquityDetailNew = "/iaw/ass/equity/singleEquityDetail" //单项权益详情查询 | |||||
export const couponActivate = "/iaw/app/issue/coupon/activate" //卡卷激活 | export const couponActivate = "/iaw/app/issue/coupon/activate" //卡卷激活 | ||||
export const couponQuery = "/iaw/app/issue/coupon/query" //根据手机号权益编号查询所属订单及卡卷 | export const couponQuery = "/iaw/app/issue/coupon/query" //根据手机号权益编号查询所属订单及卡卷 | ||||
//激活服务查询 | //激活服务查询 | ||||
export const mobileChangeProfile = "/iaw/aftersale/etcMobileChange/mobileChangeProfile" //ETC预留手机号修改-ocr识别记录上传 | export const mobileChangeProfile = "/iaw/aftersale/etcMobileChange/mobileChangeProfile" //ETC预留手机号修改-ocr识别记录上传 | ||||
//车辆信息变更 | //车辆信息变更 | ||||
export const vehicleInfoChangeChangeApply = "/iaw/aftersale/vehicleInfoChange/changeApply" //车辆信息变更申请 | export const vehicleInfoChangeChangeApply = "/iaw/aftersale/vehicleInfoChange/changeApply" //车辆信息变更申请 | ||||
// export const vehicleInfoChangeEditablePage = "/iaw/aftersale/vehicleInfoChange/editablePage" //可修改信息列表查询 | |||||
export const vehicleInfoChangeQuery = "/iaw/aftersale/vehicleInfoChange/query" //车辆详情信息查询 | export const vehicleInfoChangeQuery = "/iaw/aftersale/vehicleInfoChange/query" //车辆详情信息查询 | ||||
export const preDeviceCheck = "/iaw/aftersale/deviceUpgrade/preDeviceCheck" //设备预检 | export const preDeviceCheck = "/iaw/aftersale/deviceUpgrade/preDeviceCheck" //设备预检 | ||||
export const preDeviceCheckRes = "/iaw/aftersale/deviceUpgrade/preDeviceCheckRes" //设备预检结果回传 | export const preDeviceCheckRes = "/iaw/aftersale/deviceUpgrade/preDeviceCheckRes" //设备预检结果回传 | ||||
// 二次激活 | // 二次激活 | ||||
export const secondActiveInstallApply = "/iaw/api/secondActive/installApply" // OBU安装申请 | export const secondActiveInstallApply = "/iaw/api/secondActive/installApply" // OBU安装申请 | ||||
export const writeActiveInfo = "/iaw/api/secondActive/writeActiveInfo" // VFJ-写激活信息(普通车)接口 | |||||
export const vfjObuActive = "/iaw/vfj/obuActive" // VFJ-OBU激活申请 | |||||
export const vfjCfmActive = "/iaw/vfj/cfmActive" // VFJ-OBU激活申请 | |||||
export const issueConfirm = "/iaw/api/secondActive/issueConfirm" // OBU发行确认接口 | export const issueConfirm = "/iaw/api/secondActive/issueConfirm" // OBU发行确认接口 | ||||
export const reactivateQuery = "/iaw/api/obu/reactivate/query" // 重新激活记录 | export const reactivateQuery = "/iaw/api/obu/reactivate/query" // 重新激活记录 | ||||
export const reactivateConfirm = "/iaw/api/obu/reactivate/confirm" // 重新激活新增记录 | export const reactivateConfirm = "/iaw/api/obu/reactivate/confirm" // 重新激活新增记录 |