浏览代码

'2023年5月17日18:45:07'

yxb
wq 2 年前
父节点
当前提交
dfda03bb6c
共有 3 个文件被更改,包括 10 次插入16 次删除
  1. 2
    11
      pages/recharge/recharge.vue
  2. 6
    3
      subpackage/after-sale/activation/activate.vue
  3. 2
    2
      utils/network/api.js

+ 2
- 11
pages/recharge/recharge.vue 查看文件

const rechargeAction = () => { const rechargeAction = () => {
state.fee = state.money * 100; //元换成分 state.fee = state.money * 100; //元换成分
wx.showModal({ wx.showModal({
title: '圈存确认', title: '圈存确认',
content: '您确定要充值圈存吗', content: '您确定要充值圈存吗',
//拿到订单,存起来 //拿到订单,存起来
state.orderNum = checkResult.orders[0].orderNum; state.orderNum = checkResult.orders[0].orderNum;
setItem("orderNum", state.orderNum); setItem("orderNum", state.orderNum);
//链接蓝牙 //链接蓝牙
uni.navigateTo({ uni.navigateTo({
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`, url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
state.orderNum = applyResult.orderNum; state.orderNum = applyResult.orderNum;
setItem("orderNum", state.orderNum); setItem("orderNum", state.orderNum);
//如果订单没有支付 走支付 //如果订单没有支付 走支付
if (applyResult.orderStatus ===
"ORDER_NOT_PAY") {
if (applyResult.orderStatus === "ORDER_NOT_PAY") {
//走支付 //走支付
console.log("走支付"); console.log("走支付");
wxPayment(); wxPayment();
}); });
} }
}); });
} }
} }
}); });
}; };
/*读卡*/ /*读卡*/
} else if (fixStatus === 2) { } else if (fixStatus === 2) {
uanConfirmSucessAction(value).then((confirmResult) => { uanConfirmSucessAction(value).then((confirmResult) => {
msg("充值成功"); msg("充值成功");
navTo(
`/pages/recharge/result`)
navTo(`/pages/recharge/result`)
}); });
} else if (fixStatus === 1) { } else if (fixStatus === 1) {
quanCheckActionTrue().then((val) => { quanCheckActionTrue().then((val) => {

+ 6
- 3
subpackage/after-sale/activation/activate.vue 查看文件

const obuId = orderInfo.obuId; const obuId = orderInfo.obuId;
const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9' const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9'
console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus) console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus)
console.log('输出内容', obu.obuId, '=======', fileDataStrings.obuId)
if (obu.obuId != fileDataStrings.obuId) { if (obu.obuId != fileDataStrings.obuId) {
tools.showModalAlert("订单设备号信息与当前设备号信息不符!"); tools.showModalAlert("订单设备号信息与当前设备号信息不符!");
return return
}; };
request(IFCODE.orderDetail, options).then((res) => { request(IFCODE.orderDetail, options).then((res) => {
orderInfo = JSON.parse(res.bizContent); orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo",orderInfo);
console.log("orderInfo", orderInfo);
if (orderInfo) { if (orderInfo) {
fileDataStrings.userType = orderInfo.userType; //用户类型 fileDataStrings.userType = orderInfo.userType; //用户类型
fileDataStrings.approvedCount = parseInt(orderInfo.vehicleApprovedCount); //核载人数 fileDataStrings.approvedCount = parseInt(orderInfo.vehicleApprovedCount); //核载人数
tools.hideLoadingAlert(); tools.hideLoadingAlert();
let result = stringToJson(res.bizContent); let result = stringToJson(res.bizContent);
tools.showLoadingAlert("执行指令中"); tools.showLoadingAlert("执行指令中");
console.log('写卡指令', result.command)
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) { bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
tools.hideLoadingAlert(); tools.hideLoadingAlert();
getCommandBack(result.command, result.cosRecordId, res.toString()); getCommandBack(result.command, result.cosRecordId, res.toString());
if (res[0] == "9000") { if (res[0] == "9000") {
tools.showLoadingAlert("执行指令"); tools.showLoadingAlert("执行指令");
//再次获取随机数 //再次获取随机数
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd.RANDOM_NUMBER];
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
.RANDOM_NUMBER];
bluetoothUtil.transCmd(cmdArr, '20', function(res) { bluetoothUtil.transCmd(cmdArr, '20', function(res) {
var str = res[3].substring(res[3].length - 4, res[3].length); var str = res[3].substring(res[3].length - 4, res[3].length);
if (str == "9000") { if (str == "9000") {
font-size: 34rpx; font-size: 34rpx;
border-radius: 20rpx; border-radius: 20rpx;
} }
</style>
</style>

+ 2
- 2
utils/network/api.js 查看文件

export const envs = { export const envs = {
//开发环境配置 //开发环境配置
development: { development: {
baseUrl: "192.168.100.63:8087",
// baseUrl: "222.85.144.89:19002",
// baseUrl: "192.168.100.63:8087",
baseUrl: "222.85.144.89:19002",
}, },
//生产环境配置 //生产环境配置
production: { production: {

正在加载...
取消
保存