Bläddra i källkod

替换接口20241017

master
yangteng 7 månader sedan
förälder
incheckning
2f15d0ee15

+ 6
- 6
pages.json Visa fil

@@ -1467,12 +1467,12 @@
"navigationBarTitleText": "ETC通行流水记录"
}
},
{
"path": "search/select-card",
"style": {
"navigationBarTitleText": "选择卡号"
}
},
// {
// "path": "search/select-card",
// "style": {
// "navigationBarTitleText": "选择卡号"
// }
// },
{
"path": "help/help",
"style": {

+ 19
- 21
subpackage/after-sale/arrears/arrears.vue Visa fil

@@ -83,16 +83,15 @@
getItem
} from "@/utils/storage.ts"
import {
CardBillQuery,
CardBillPlaceOrder,
CardBillPayStatus,
wechatPayConfigId,
aliPayConfigId,
obtainUserId,
getOpenidApi
trafficsupplObtainuserid,
trafficsuppleQueryList,
trafficsuppleApply,
trafficsupplePayQuery,getOpenId
} from "@/utils/network/api.js";
import {
request
request,requestNew
} from "@/utils/network/request.js";

import {
@@ -100,7 +99,6 @@
} from "@/utils/network/encryption";
import {
onLoad,
onShow,
onPullDownRefresh
} from "@dcloudio/uni-app";
import {
@@ -138,8 +136,8 @@
method: "POST",
showLoading: true,
};
request(CardBillQuery, options).then((res) => {
const data = stringToJson(res.bizContent);
requestNew(trafficsuppleQueryList, options).then((res) => {
const data = res;
console.log(data);
data.data = data.data.map(val => {
val.checked = false
@@ -215,10 +213,10 @@
showLoading: true,
};
// #ifdef MP-WEIXIN
request(getOpenidApi, options).then((res) => {
const result = stringToJson(res.bizContent);
requestNew(getOpenId, options).then((res) => {
const result = res;
console.log("获取微信小程序openid", result);
const openidData = stringToJson(result.data);
const openidData = result.data;
state.openid = openidData.openid
});
// #endif
@@ -239,8 +237,8 @@
method: "POST",
showLoading: true,
};
request(CardBillPlaceOrder, options).then((res) => {
const data = stringToJson(res.bizContent);
requestNew(trafficsuppleApply, options).then((res) => {
const data =res;
state.orderId = data.orderId
uni.requestPayment({
provider: "wxpay",
@@ -275,7 +273,7 @@
showLoading: true,
};
console.log('支付宝用户编号请求:', optionsUser)
request(obtainUserId, optionsUser).then((res) => {
requestNew(trafficsupplObtainuserid, optionsUser).then((res) => {
console.log('支付宝用户编号返回:', res)
const data = stringToJson(res.bizContent);
const optionsali = {
@@ -290,9 +288,9 @@
showLoading: true,
};
console.log('支付下单请求:', optionsali)
request(CardBillPlaceOrder, optionsali).then((res) => {
requestNew(trafficsuppleApply, optionsali).then((res) => {
console.log('支付下单返回:', res)
const data = stringToJson(res.bizContent);
const data = res;
my.tradePay({
// 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号 trade_no
tradeNO: data.tranPackage,
@@ -309,8 +307,8 @@
method: "POST",
showLoading: true,
};
request(CardBillQuery, options).then((res) => {
const data = stringToJson(res.bizContent);
requestNew(trafficsuppleQueryList, options).then((res) => {
const data = res;
console.log(data);
data.data = data.data.map(val => {
val.checked = false
@@ -356,7 +354,7 @@
showLoading: true,
};

request(CardBillPayStatus, options).then((res) => {
requestNew(trafficsupplePayQuery, options).then((res) => {
msg("支付成功!");
getlist()
});
@@ -365,7 +363,7 @@
onLoad(() => {
getlist()
getOpenID()
console.log(state);
console.log("state");
})

onPullDownRefresh(() => {

+ 3
- 4
subpackage/after-sale/blacklist-query/list.vue Visa fil

@@ -14,10 +14,9 @@
<script setup lang="ts">
import { reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { blackApi,cardBlackQuery } from "@/utils/network/api.js";
import { request, requestNew } from "@/utils/network/request.js";
import { stringToJson } from "@/utils/network/encryption.js";
import { getItem } from "@/utils/storage";
import {cardBlackQuery } from "@/utils/network/api.js";
import {requestNew } from "@/utils/network/request.js";
import {getItem } from "@/utils/storage";
const state = reactive({
vehiclePlate: "",
vehiclePlateColor: "",

+ 7
- 13
subpackage/after-sale/card-loss-reporting/cardloss-confirm.vue Visa fil

@@ -107,22 +107,15 @@
onUnload,
onShow
} from "@dcloudio/uni-app";
import {
request
import {requestNew
} from "@/utils/network/request.js";
import {
orderDetail,
CardlossStatus
import {orderDetailQuery,cardObuLoss
} from "@/utils/network/api.js";

import {
msg
} from "@/utils/utils";

import {
stringToJson
} from "@/utils/network/encryption";

const state = reactive({
id: "",
data: {
@@ -137,6 +130,7 @@
/*视图进入后操作*/
onShow(() => {
queryOrderDetail(state.id).then((val : any) => {
console.log("val",val)
state.data = val
state.cardType=val.cardId.substring(8,10)
console.log(state.cardType)
@@ -245,7 +239,7 @@

const queryOrderDetail = (id) => {
return new Promise(async (resolve, reject) => {
const res = await request(orderDetail, {
const res = await requestNew(orderDetailQuery, {
type: 2,
data: {
id: id
@@ -253,7 +247,7 @@
method: "POST",
showLoading: true,
});
const data = stringToJson(res.bizContent);
const data = res;
resolve(data);
}).catch((error) => {

@@ -274,8 +268,8 @@
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(CardlossStatus, options);
const data = stringToJson(res.bizContent);
const res = await requestNew(cardObuLoss, options);
const data = res
resolve(data);
}).catch((error) => {
reject(error);

+ 5
- 7
subpackage/after-sale/card-loss-reporting/cardloss.vue Visa fil

@@ -35,12 +35,10 @@
import {
onLoad
} from "@dcloudio/uni-app";
import { requestNew} from "@/utils/network/request.js";
import {
request
} from "@/utils/network/request.js";
import {
sendCode,
checkCode,
messageValid,
sendMessage
} from "@/utils/network/api.js";

import {
@@ -94,7 +92,7 @@
method: "POST",
showLoading: true,
};
request(sendCode, options)
requestNew(sendMessage, options)
.then((res) => {
codeInterval();

@@ -121,7 +119,7 @@
method: "POST",
showLoading: true,
};
request(checkCode, options)
requestNew(messageValid, options)
.then((res) => {

uni.$emit('queryCardlossStatus', {

+ 35
- 20
subpackage/after-sale/deviceInfo/deviceInfo.vue Visa fil

@@ -146,9 +146,13 @@
onUnload
} from "@dcloudio/uni-app";
import {
request,requestNew
request
} from "@/utils/network/request";
import {cardObuQuery,obuFileDataDecrypt} from "@/utils/network/api";
import {
obuDecrypt,
cardList,
searchObuInfo
} from "@/utils/network/api";
import {
stringToJson
} from "@/utils/network/encryption";
@@ -252,15 +256,13 @@
console.log("card.color===========", card.vehiclePlate, parseInt(res[2].substring(82, 84),
16))
// 读卡信息
// getCardList()
getCardList()
//执行0016文件
let arr = [cmd.HOME_DIRECTORY, cmd.PERSONAL_INFORMATION]
bluetoothUtil.transCmd(arr, '10', function(res) {
let str2 = res[1].substring(res[1].length - 4, res[1].length);
if (str2 == "9000") {
if (res[1].length > 108) {
console.log("res====",res)
console.log("进来了",res[1].substring(4, 44),HexToStrig(res[1].substring(4, 44)))
card.userName = HexToStrig(res[1].substring(4, 44)); //姓名
card.userName = card.userName[0] + '*'.repeat(card.userName.length - 1)
card.idNum = HexToStrig(res[1].substring(44, 108)).replace(/^\d{14}/,
@@ -399,14 +401,13 @@
type: 2,
data: {
obuSerailNo: num,
fileData: data,
fileData: data
},
method: "POST",
showLoading: true,
};
requestNew(obuFileDataDecrypt, options).then((res) => {
console.log("obuFileDataDecrypt",res)
const data =res
request(obuDecrypt, options).then((res) => {
const data = stringToJson(res.bizContent)
const FileData = data.data.FileData
func(FileData)
});
@@ -429,10 +430,9 @@
//提示对话框
tools.showModalAlert(msg);
}
const getObuList = () => {
const getCardList = () => {
var data = {
obuId: obu.num,
cardId:card.cardNo,
vehicleId: state.vehicleId
};
const options = {
type: 2,
@@ -440,19 +440,34 @@
method: "POST",
showLoading: true,
};
requestNew(cardObuQuery, options).then((res) => {
tools.hideLoadingAlert();
let result = res;
console.log("153", result)
state.obuStatus = result.obuStatus?result.obuStatus:""
state.cardStatus = result.cardStatus
if (result.cardType == 1 && result.debitType == 1) {
request(cardList, options).then((res) => {
let result = stringToJson(res.bizContent);
state.cardStatus = result.data[0].cardStatus
if (result.data[0].cardType == 1 && result.data[0].debitType == 1) {
state.cardTypeName = "预存卡"
} else if (result.cardType == 2) {
} else if (result.data[0].cardType == 2) {
state.cardTypeName = "储值卡"
} else {
state.cardTypeName = "记账卡"
}
console.log("152", result)
})
}
const getObuList = () => {
var data = {
obuId: obu.num
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
request(searchObuInfo, options).then((res) => {
tools.hideLoadingAlert();
let result = stringToJson(res.bizContent);
console.log("153", result)
state.obuStatus = result.data[0]?result.data[0].obuStatus:""
})
}
</script>

+ 12
- 15
subpackage/personal-center/search/etcFlowingWater.vue Visa fil

@@ -109,9 +109,8 @@
stringToJson
} from "@/utils/network/encryption.js";
import {
passBillCount,
downloadBills,
passbill,cardList
passBillCount,detaildownload,
passbill,cardinformationquery,totalbill
} from "@/utils/network/api.js";
import {
onLoad,
@@ -166,7 +165,9 @@ const changeCardId = (e) => {
}
const getCardList = (vehicleId) => {
var data = {
vehicleId: vehicleId
vehicleId: vehicleId,
vehiclePlate:vehicleId.split('_')[0],
vehiclePlateColor:Number(vehicleId.split('_')[1])
};
const options = {
type: 2,
@@ -174,9 +175,9 @@ const changeCardId = (e) => {
method: "POST",
showLoading: true,
};
request(cardList, options).then((res) => {
console.log("152", stringToJson(res.bizContent))
let result = stringToJson(res.bizContent);
requestNew(cardinformationquery, options).then((res) => {
console.log("152", res)
let result =res;
for (var k = 0; k < result.data.length; k++) {
state.cardIdRange.push(result.data[k]['cardId'])
}
@@ -242,8 +243,8 @@ const changeCardId = (e) => {
method: "POST",
showLoading: true,
};
request(passBillCount, options).then((res) => {
let result = stringToJson(res.bizContent)
requestNew(totalbill, options).then((res) => {
let result =res
state.aggregateAmount = result.aggregateAmount ? result.aggregateAmount : 0
state.passTotal = result.passTotal ? result.passTotal : 0
state.parkTotal = result.parkTotal ? result.parkTotal : 0
@@ -296,8 +297,8 @@ const changeCardId = (e) => {
method: "POST",
showLoading: true,
};
request(downloadBills, options).then((res) => {
let result = stringToJson(res.bizContent)
requestNew(detaildownload, options).then((res) => {
let result =res
console.log("downloadFileURL", downloadFileURL + result.ossFilePath);
download(downloadFileURL + result.ossFilePath)
})
@@ -469,10 +470,6 @@ const changeCardId = (e) => {
display: flex;
justify-content: space-evenly;
align-items: center;

// .total-space {
// margin-left: 41rpx;
// }
}

.btn-download {

subpackage/personal-center/search/select-card.vue → subpackage/personal-center/search/select-card-删除.vue Visa fil


+ 17
- 1
utils/network/api.js Visa fil

@@ -338,5 +338,21 @@ export const issueCallback= "/iaw/issue/order/issueCallback" //发行指令回
export const activeImgUpload= "/iaw/issue/order/activeImgUpload" //激活图片上传
export const cardObuQuery= "/iaw/ass/query/cardObuQuery" //卡签信息查询
export const singleEquityDetail= "/iaw/ass/equity/singleEquityDetail" //单项权益详情查询
export const obuFileDataDecrypt= "/iaw/ass/issueBase/obuFileDataDecrypt" //OBU系统信息在线解密
// 通行流水记录查询
export const cardinformationquery= "/iaw/app/issue/cardAnnounce/cardinformationquery" //卡信息查询
export const detaildownload= "/iaw/app/issue/cardAnnounce/detaildownload" //明细下载
export const totalbill= "/iaw/app/issue/cardAnnounce/totalbill" //账单合计
export const passbill= "/iaw/app/issue/cardAnnounce/passbill" //ETC通行流水记录查询
export const obuFileDataDecrypt= "/iaw/ass/issueBase/obuFileDataDecrypt" //OBU系统信息在线解密

// 验证码
export const sendMessage= "/iaw/message/sendMessage" //发送短信验证码
export const messageValid= "/iaw/message/messageValid" //短信验证码验证

// 卡签挂失解挂
export const cardObuLoss= "/iaw/api/afterSale/cardObuLoss/loss" //卡签挂失解挂失
// 欠费补缴
export const trafficsuppleQueryList= "/iaw/trafficsupple/queryList" //通行流水欠费补缴信息查询
export const trafficsuppleApply= "/iaw/trafficsupple/apply" //通行流水欠费补缴支付下单
export const trafficsupplePayQuery= "/iaw/trafficsupple/payQuery" //通行流水欠费补缴支付查询
export const trafficsupplObtainuserid= "/iaw/trafficsupple/obtainuserid" //统一会员平台获取第三方用户标识

+ 6
- 30
utils/util/fileData.js Visa fil

@@ -1,16 +1,7 @@
// import {
// TextEncoder,
// TextDecoder
// } from "../node-model/text-decoding";
import "./encoder.js"

// #ifdef MP-WEIXIN
console.log("global", global)
// #endif

// #ifdef MP-ALIPAY
console.log("global", $global)
// #endif
import {
TextEncoder,
TextDecoder
} from "../node-model/text-decoding";

export function IntegerToHexString(num, nLen) {
if (num == null) {
@@ -36,15 +27,7 @@ export function HighAddZero(str, nLen) {
}
export function AsciToHexString(strAsci, nLen) {
let s = String(strAsci);

// #ifdef MP-WEIXIN
let encoder = new global.TextEncoder("UTF-8");
// #endif

// #ifdef MP-ALIPAY
let encoder = new $global.TextEncoder("UTF-8");
// #endif
// let encoder = new TextEncoder("UTF-8");
let encoder = new TextEncoder("UTF-8");
// let encoder = new TextEncoder("gbk");
// let bytes = encode(str, 'gbk');
let bytes = encoder.encode(s);
@@ -92,14 +75,7 @@ export function HexToStrig(data, charType = 1) {
}
const asd = hexStringToByteArray(data);
try {
// #ifdef MP-WEIXIN
let str = new global.TextDecoder("GBK").decode(asd)
// #endif

// #ifdef MP-ALIPAY
let str = new $global.TextDecoder("GBK").decode(asd)
// #endif
// str = new TextDecoder("GBK").decode(asd);
str = new TextDecoder("GBK").decode(asd);

} catch (e) {
console.error(e);

Laddar…
Avbryt
Spara