<text>手机号码</text> | <text>手机号码</text> | ||||
<text>{{ fileDataStrings.customerTel }}</text> | <text>{{ fileDataStrings.customerTel }}</text> | ||||
</view> | </view> | ||||
<view class="info_plate" style="border: none"> | |||||
<view class="info_plate" style="border: none" v-if="fileDataStrings.cardId"> | |||||
<text>卡号</text> | <text>卡号</text> | ||||
<text>{{ fileDataStrings.cardId }}</text> | <text>{{ fileDataStrings.cardId }}</text> | ||||
</view> | </view> | ||||
<view class="info_plate"> | |||||
<view class="info_plate" v-if="fileDataStrings.obuId"> | |||||
<text>OBU号</text> | <text>OBU号</text> | ||||
<text>{{ fileDataStrings.obuId }}</text> | <text>{{ fileDataStrings.obuId }}</text> | ||||
</view> | </view> | ||||
import { | import { | ||||
getItem | getItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
import { | |||||
request, requestNew | |||||
} from "@/utils/network/request.js"; | |||||
import {requestNew} from "@/utils/network/request.js"; | |||||
import { | import { | ||||
IntegerToHexString, | IntegerToHexString, | ||||
} from "@/utils/util/fileData.js"; | } from "@/utils/util/fileData.js"; | ||||
import { | |||||
stringToJson | |||||
} from "@/utils/network/encryption.js"; | |||||
import * as IFCODE from "@/utils/network/api.js"; | |||||
import { | import { | ||||
issueApply,issueCallback | issueApply,issueCallback | ||||
} from "@/utils/network/api"; | } from "@/utils/network/api"; | ||||
showBtn: true, | showBtn: true, | ||||
disabled: true | disabled: true | ||||
}) | }) | ||||
let snums = 0 | |||||
onLoad((option) => { | onLoad((option) => { | ||||
//读取传入 存储的数据orderInfo | //读取传入 存储的数据orderInfo | ||||
let orderData = getItem("orderInfo"); | let orderData = getItem("orderInfo"); | ||||
state.id = orderData.id; | state.id = orderData.id; | ||||
state.orderId = orderData.orderId; | |||||
console.log(state); | console.log(state); | ||||
state.transfer = Number(option.transfer) | state.transfer = Number(option.transfer) | ||||
//获取订单详情 | //获取订单详情 | ||||
getOrderDetails(state.id); | getOrderDetails(state.id); | ||||
console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1) | |||||
console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1,getItem("orderInfo")) | |||||
}) | }) | ||||
orderId: "", | orderId: "", | ||||
vehicleClassStr: "" | vehicleClassStr: "" | ||||
}); | }); | ||||
// 卡签版本校验接口 | |||||
function versionVerification(transOrderId, cmd, cmdResult, stepNo){ | |||||
tools.showLoadingAlert('正在激活,请等待') | |||||
const options = { | |||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
showLoading: false, | |||||
data: { | |||||
transOrderId, //步骤号 | |||||
cmd, | |||||
cmdResult, | |||||
stepNo | |||||
}, //请求参数 | |||||
method: "POST", //提交方式(默认POST) | |||||
}; | |||||
console.log("options2222", options) | |||||
//卡签版本校验接口 | |||||
request(IFCODE.versionVerificationApi, options) | |||||
.then((res) => { | |||||
console.log(stringToJson(res.bizContent)); | |||||
const datas = stringToJson(res.bizContent).data; | |||||
console.log("在线激活 请求", datas,datas.stepNo == 100); | |||||
if (datas.stepNo == 100) { | |||||
console.log("陈工") | |||||
cmdResult1() | |||||
} else { | |||||
console.log("datas.stepNo", datas.stepNo) | |||||
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) { | |||||
versionVerification(datas.transOrderId, datas.cmd, res.toString(), datas.stepNo) | |||||
}, () => { | |||||
tools.hideLoadingAlert(); | |||||
}); | |||||
} | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
tools.hideLoadingAlert(); | |||||
}); | |||||
} | |||||
function cmdResult1() { | function cmdResult1() { | ||||
tools.showLoadingAlert('正在激活,请等待') | tools.showLoadingAlert('正在激活,请等待') | ||||
const options = { | const options = { |
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.isValueCard = option.isValueCard; | state.isValueCard = option.isValueCard; | ||||
state.vehicleId = option.vehicleId; | state.vehicleId = option.vehicleId; | ||||
state.orderQuery = option.orderQuery; | |||||
let source = "" | let source = "" | ||||
// #ifdef MP-ALIPAY | // #ifdef MP-ALIPAY | ||||
}) | }) | ||||
} else { | } else { | ||||
navTo( | navTo( | ||||
`/subpackage/orders/release-products?orderId=${state.orderId}`, | |||||
`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}`, | |||||
); | ); | ||||
} | } | ||||
], | ], | ||||
openid: "", | openid: "", | ||||
isclick: true,//防止重复点击 | isclick: true,//防止重复点击 | ||||
vehicleId: "" | |||||
vehicleId: "", | |||||
orderQuery:"0" | |||||
}); | }); | ||||
</script> | </script> | ||||
console.log(val); | console.log(val); | ||||
// #ifdef MP-ALIPAY | // #ifdef MP-ALIPAY | ||||
navTo( | navTo( | ||||
`/subpackage/orders/sign-up-ali?orderId=${state.orderId}`, | |||||
`/subpackage/orders/sign-up-ali?orderId=${state.orderId}&orderQuery=${state.orderQuery}`, | |||||
); | ); | ||||
// #endif | // #endif | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
navTo( | navTo( | ||||
`/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`, | |||||
`/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&orderQuery=${state.orderQuery}`, | |||||
); | ); | ||||
// #endif | // #endif | ||||
state.orderId = getRequest(q)['orderId']; | state.orderId = getRequest(q)['orderId']; | ||||
} else { | } else { | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.orderQuery = option.orderQuery; | |||||
state.clientFee = option.clientFee; | state.clientFee = option.clientFee; | ||||
state.id = option.id; | state.id = option.id; | ||||
} | } | ||||
id: "", | id: "", | ||||
clientFee: "", | clientFee: "", | ||||
orderId: "", | orderId: "", | ||||
orderQuery:"0" | |||||
}); | }); | ||||
</script> | </script> | ||||
import { stringToJson } from "@/utils/network/encryption"; | import { stringToJson } from "@/utils/network/encryption"; | ||||
import { fileURL } from "@/datas/fileURL.js"; | import { fileURL } from "@/datas/fileURL.js"; | ||||
import { setItem } from "@/utils/storage"; | |||||
import { getItem, setItem } from "@/utils/storage"; | |||||
import { msg } from "@/utils/utils"; | import { msg } from "@/utils/utils"; | ||||
import { | import { | ||||
infoQuery, | infoQuery, | ||||
envs, channelSingQueryApi, userSign, getOpenId | envs, channelSingQueryApi, userSign, getOpenId | ||||
} from "@/utils/network/api"; | } from "@/utils/network/api"; | ||||
const imgURL = `${fileURL}image/`; | const imgURL = `${fileURL}image/`; | ||||
import useOrderSkip from "@/composables/order/useOrderSkip"; | |||||
const { gotoActiveOrder} = useOrderSkip(); | |||||
const state = reactive({ | const state = reactive({ | ||||
openid: "", | openid: "", | ||||
orderId: "", | orderId: "", | ||||
agreeURL: "", | agreeURL: "", | ||||
channelSing: "0",//0 正常签约 1恢复签约 | channelSing: "0",//0 正常签约 1恢复签约 | ||||
vehiclePlate: "", | vehiclePlate: "", | ||||
code: "" | |||||
code: "", | |||||
orderQuery:"0" | |||||
}); | }); | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
getOpenID(); | getOpenID(); | ||||
} | } | ||||
console.log("state.channelSing",option.channelSing,option) | console.log("state.channelSing",option.channelSing,option) | ||||
state.vehiclePlate = option.vehiclePlate; | state.vehiclePlate = option.vehiclePlate; | ||||
state.orderQuery = option.orderQuery; | |||||
getInfo(); | getInfo(); | ||||
}); | }); | ||||
const checkboxChange = (e) => { | const checkboxChange = (e) => { | ||||
} else if (data.userState === "NORMAL") { | } else if (data.userState === "NORMAL") { | ||||
msg("已开通车主服务"); | msg("已开通车主服务"); | ||||
setTimeout(() => { | |||||
uni.redirectTo({ | |||||
url: `/pages/order/order?index=0` | |||||
}) | |||||
}, 1500) | |||||
if(state.orderQuery=='1'){ | |||||
// 查询订单直接去激活 | |||||
// 待激活 | |||||
gotoActiveOrder(getItem('orderQueryActivate')) | |||||
}else{ | |||||
// 正常订单 | |||||
setTimeout(() => { | |||||
uni.redirectTo({ | |||||
url: `/pages/order/order?index=0` | |||||
}) | |||||
}, 1500) | |||||
} | |||||
} else if (data.userState === "PAUSED") { | } else if (data.userState === "PAUSED") { | ||||
msg("已暂停车主服务"); | msg("已暂停车主服务"); |
requestNew(orderQuery, options).then((res) => { | requestNew(orderQuery, options).then((res) => { | ||||
console.log("擦寻",res) | console.log("擦寻",res) | ||||
state.details=res | state.details=res | ||||
setItem('orderQueryActivate',res) | |||||
state.isDetails=true | state.isDetails=true | ||||
state.orderId=res.orderNo | state.orderId=res.orderNo | ||||
queryAgreement() | queryAgreement() | ||||
}else{ | }else{ | ||||
isValueCard=1 | isValueCard=1 | ||||
} | } | ||||
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=${isValueCard}&vehicleId=${vehicleId}`); | |||||
// orderQuery 1 订单查询 0正常订单 | |||||
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=${isValueCard}&vehicleId=${vehicleId}&orderQuery=1`); | |||||
}) | }) | ||||
}else if(state.details['orderStep'] == OrderStatus['已支付/待签约']){ | }else if(state.details['orderStep'] == OrderStatus['已支付/待签约']){ | ||||
// 去签约 | // 去签约 |
<template> | <template> | ||||
<!-- <cover-view class="custom-nav" @click="closeWebView"> | |||||
<cover-image class="close-icon" src="/static/image/icon-back.png" ></cover-image> | |||||
<cover-view>返回</cover-view> | |||||
</cover-view> --> | |||||
<web-view :src="state.url"></web-view> | |||||
<web-view :src="state.url"> | |||||
<!-- <cover-view class="custom-nav" @click="closeWebView"> | |||||
<cover-image class="close-icon" src="/static/image/icon-back.png" ></cover-image> | |||||
<cover-view>返回</cover-view> | |||||
</cover-view> --> | |||||
</web-view> | |||||
</template> | </template> | ||||
<script setup> | <script setup> |