Parcourir la source

支付宝适配

yxb
skx il y a 1 an
Parent
révision
5cf503e150

+ 3
- 3
pages/bluetooth/bluetooth.vue Voir le fichier

@@ -516,9 +516,9 @@
}
else if (routeType.value == "5") {
uni.$emit('bluetoothLink', { status: true })
uni.navigateBack({
delta: 1
})
// uni.navigateBack({
// delta: 1,
// })
} else {
return;
}

+ 11
- 1
subpackage/after-sale/activation-once-again/activation-once-again.vue Voir le fichier

@@ -165,6 +165,7 @@
});

onLoad((option) => {
console.log('======重新激活开始======',option);
//请求订单详情
queryOrderDetail(option.id);
@@ -178,7 +179,10 @@
getObuId()
}
//移除监听
uni.$off('bluetoothLink')
console.log('======移除监听======',res)
// uni.$off('bluetoothLink')
})

})
@@ -356,12 +360,18 @@
.then(() => {
tools.hideLoadingAlert();
state.showPopup = true;
uni.navigateBack({
delta: 1,
})
});
};



</script>

<style>

+ 79
- 7
subpackage/after-sale/activation/activate.vue Voir le fichier

@@ -235,11 +235,8 @@
console.log('======获取OBU号======')
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
tools.showLoadingAlert("正在执行指令");
console.log('======cmdArray======', cmdArray)
bluetoothUtil.transCmd(cmdArray, "20", function(res) {
console.log('======cmdArray1======', cmdArray)
tools.hideLoadingAlert();
console.log('======cmdArray2======', cmdArray)
var status = res[1].substring(res[1].length - 4, res[1].length);

console.log('获取OBU号执行结果' + status, res)
@@ -255,8 +252,9 @@

//获取fileData
const getFileData = () => {
console.log(fileDataStrings);
console.log("======修改车辆信息0.1======",fileDataStrings);
//获取fileData 拼接字符串
let res1 = AsciToHexString(fileDataStrings.vehiclePlate, 24); //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

@@ -721,11 +719,85 @@
// "&orderId=" +
// state.orderId,
// });
uni.navigateTo({
url: "/subpackage/after-sale/deviceInfo/deviceInfo",
});
bindCardAndObu();
});
};
/**
* 卡签绑定 请求
*/
const bindCardAndObu = () => {
console.log('======卡签绑定======')
tools.showLoadingAlert("加载中");
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
obuId: obu.obuId,
cardId: card.cardId,
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};
//调用方式
request(IFCODE.bindCardAndObu, options)
.then((res) => {
tools.hideLoadingAlert();
let result = JSON.parse(res.bizContent);
console.log("写卡指令============", result)
tools.showLoadingAlert("执行指令中");
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
tools.hideLoadingAlert();
let response = res.toString();
getCommandBackEnd(result.command, result.cosRecordId, response);
// uni.navigateTo({
// url: "/subpackage/after-sale/deviceInfo/deviceInfo",
// });
});
})
.catch((err) => {
console.log(err);
});
};
/**
* 卡签绑定写卡指令返回 请求
*/
const getCommandBackEnd = (command, cosRecordId, response) => {
console.log('======卡签绑定循环写卡指令中======')
tools.showLoadingAlert("加载中");
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
cardId: card.cardId,
orderId: fileDataStrings.orderId,
command: command,
response: response,
cosRecordId: cosRecordId,
cosType: "4"
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};
//调用方式
request(IFCODE.writeCardBack, options)
.then((res) => {
tools.hideLoadingAlert();
let result = JSON.parse(res.bizContent);
console.log("写卡指令============", result)
if (result.orderStatus == 1 || result.orderStatus == "1") {
tools.showLoadingAlert("执行指令中");
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
tools.hideLoadingAlert();
let response = res.toString();
getCommandBackEnd(result.command, cosRecordId, response);
});
} else {
uni.navigateTo({
url: "/subpackage/after-sale/deviceInfo/deviceInfo",
});
}
})
};
</script>

<style>

+ 1
- 2
subpackage/after-sale/arrears/arrears.vue Voir le fichier

@@ -237,7 +237,6 @@
val.checked = false;
})
}

console.log(state.suppleNoList, "支付集合");
}

@@ -356,7 +355,7 @@
tradeNO: data.tranPackage,
success: res => {
console.log("支付成功", res);
const dataaa = stringToJson(res.bizContent);
allPrice.value = 0
const options = {

+ 2
- 1
utils/node-model/text-decoding/src/lib/TextEncoder.js Voir le fichier

@@ -38,11 +38,12 @@ export default class TextEncoder {
} else {
// Standard behavior.
this._encoding = getEncoding('utf-8')
// #ifdef MP-WEIXIN
if (label !== undefined && 'console' in global) {
console.warn('TextEncoder constructor called with encoding label, '
+ 'which is ignored.')
}
// #endif
}
}
get encoding() {

Chargement…
Annuler
Enregistrer