@@ -1,33 +1,34 @@ | |||
<template> | |||
<view class='content'> | |||
<view class='search_wrap'> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch"/><button size='mini' @click='search()'>搜索</button> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch" /><button size='mini' | |||
@click='search()'>搜索</button> | |||
</view> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> | |||
<view>ETC卡号:{{item.cardId}}</view> | |||
<view>ETC卡号:{{item.bankCardId}}</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {transactionRecord} from "@/utils/network/api.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { transactionRecord } from "@/utils/network/api.js"; | |||
import { stringToJson } from "@/utils/network/encryption.js"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
list:'', //所有数据 | |||
newList:'', //最终展示的 | |||
name:'', | |||
value:'',//input框里的值 | |||
list: '', //所有数据 | |||
newList: '', //最终展示的 | |||
name: '', | |||
value: '',//input框里的值 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
console.log("option", option) | |||
state.name = option.name; | |||
getList(); | |||
}) | |||
const getList=()=>{ | |||
const getList = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
@@ -38,59 +39,63 @@ | |||
}; | |||
request(transactionRecord, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.list=data.qtkCorporateAccountDetails; | |||
for(var i=0;i<state.list.length;i++){ | |||
state.list[i].tradeConfirmTime=state.list[i].tradeConfirmTime.split('T').join(' '); | |||
state.list = data.qtkCorporateAccountDetails; | |||
for (var i = 0; i < state.list.length; i++) { | |||
state.list[i].tradeConfirmTime = state.list[i].tradeConfirmTime.split('T').join(' '); | |||
} | |||
state.newList=state.list; | |||
console.log("交易记录",data) | |||
state.newList = state.list; | |||
console.log("交易记录", data) | |||
}) | |||
} | |||
const search=()=>{ | |||
state.newList=[]; | |||
const search = () => { | |||
state.newList = []; | |||
for (var i = 0; i < state.list.length; i++) { | |||
if (state.list[i].cardId.indexOf(state.value) >= 0) { | |||
state.newList.push(state.list[i]); | |||
state.newList.push(state.list[i]); | |||
} | |||
} | |||
console.log("state.newList",state.newList) | |||
} | |||
console.log("state.newList", state.newList) | |||
} | |||
const doSearch=()=>{ | |||
const doSearch = () => { | |||
search(); | |||
} | |||
</script> | |||
<style scoped> | |||
.content{ | |||
.content { | |||
background-color: #EEF7F7; | |||
min-height:100vh; | |||
min-height: 100vh; | |||
padding: 0 30rpx; | |||
overflow: hidden; | |||
font-size: 32rpx; | |||
} | |||
.search_wrap{ | |||
display:flex; | |||
margin:20rpx 0; | |||
.search_wrap { | |||
display: flex; | |||
margin: 20rpx 0; | |||
} | |||
.search_wrap>input{ | |||
background-color:white; | |||
.search_wrap>input { | |||
background-color: white; | |||
width: 76%; | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
padding: 10rpx 10rpx; | |||
border-radius: 10rpx 0 0 10rpx; | |||
} | |||
.item{ | |||
width:100%; | |||
border-radius:10rpx; | |||
.item { | |||
width: 100%; | |||
border-radius: 10rpx; | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top:30rpx; | |||
background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color:white; | |||
margin-top: 30rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color: white; | |||
} | |||
.time{ | |||
display:flex; | |||
.time { | |||
display: flex; | |||
margin-bottom: 16rpx; | |||
justify-content: space-between; | |||
} |
@@ -1,33 +1,34 @@ | |||
<template> | |||
<view class='content'> | |||
<view class='search_wrap'> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch"/><button size='mini' @click='search()'>搜索</button> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch" /><button size='mini' | |||
@click='search()'>搜索</button> | |||
</view> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> | |||
<view>ETC卡号:{{item.cardId}}</view> | |||
<view>ETC卡号:{{item.bankCardId}}</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {transactionRecord} from "@/utils/network/api.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { transactionRecord } from "@/utils/network/api.js"; | |||
import { stringToJson } from "@/utils/network/encryption.js"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
list:'', //所有数据 | |||
newList:'', //最终展示的 | |||
name:'', | |||
value:'',//input框里的值 | |||
list: '', //所有数据 | |||
newList: '', //最终展示的 | |||
name: '', | |||
value: '',//input框里的值 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
console.log("option", option) | |||
state.name = option.name; | |||
getList(); | |||
}) | |||
const getList=()=>{ | |||
const getList = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
@@ -38,59 +39,63 @@ | |||
}; | |||
request(transactionRecord, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.list=data.qtkCorporateAccountDetails; | |||
for(var i=0;i<state.list.length;i++){ | |||
state.list[i].tradeConfirmTime=state.list[i].tradeConfirmTime.split('T').join(' '); | |||
state.list = data.qtkCorporateAccountDetails; | |||
for (var i = 0; i < state.list.length; i++) { | |||
state.list[i].tradeConfirmTime = state.list[i].tradeConfirmTime.split('T').join(' '); | |||
} | |||
state.newList=state.list; | |||
console.log("交易记录",data) | |||
state.newList = state.list; | |||
console.log("交易记录", data) | |||
}) | |||
} | |||
const search=()=>{ | |||
state.newList=[]; | |||
const search = () => { | |||
state.newList = []; | |||
for (var i = 0; i < state.list.length; i++) { | |||
if (state.list[i].cardId.indexOf(state.value) >= 0) { | |||
state.newList.push(state.list[i]); | |||
state.newList.push(state.list[i]); | |||
} | |||
} | |||
console.log("state.newList",state.newList) | |||
} | |||
console.log("state.newList", state.newList) | |||
} | |||
const doSearch=()=>{ | |||
const doSearch = () => { | |||
search(); | |||
} | |||
</script> | |||
<style scoped> | |||
.content{ | |||
.content { | |||
background-color: #EEF7F7; | |||
min-height:100vh; | |||
min-height: 100vh; | |||
padding: 0 30rpx; | |||
overflow: hidden; | |||
font-size: 32rpx; | |||
} | |||
.search_wrap{ | |||
display:flex; | |||
margin:20rpx 0; | |||
.search_wrap { | |||
display: flex; | |||
margin: 20rpx 0; | |||
} | |||
.search_wrap>input{ | |||
background-color:white; | |||
.search_wrap>input { | |||
background-color: white; | |||
width: 76%; | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
padding: 10rpx 10rpx; | |||
border-radius: 10rpx 0 0 10rpx; | |||
} | |||
.item{ | |||
width:100%; | |||
border-radius:10rpx; | |||
.item { | |||
width: 100%; | |||
border-radius: 10rpx; | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top:30rpx; | |||
background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color:white; | |||
margin-top: 30rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color: white; | |||
} | |||
.time{ | |||
display:flex; | |||
.time { | |||
display: flex; | |||
margin-bottom: 16rpx; | |||
justify-content: space-between; | |||
} |
@@ -238,6 +238,7 @@ | |||
}; | |||
const checkQuanCengEvent = (val : any) => { | |||
console.log("val========", val) | |||
if (val.chargeStatus === 1) { | |||
let cmdArr = val.command.split(","); | |||
uni.showLoading({ | |||
@@ -256,10 +257,12 @@ | |||
//圈存初始化验证通过 , 进行圈存 | |||
if (value.commandType === 2) { | |||
console.log("value============", value) | |||
uanConfirmAction(value).then((confirmResult) => { | |||
navTo( | |||
`/subpackage/after-sale/refund-order-balance/result`) | |||
}); | |||
uanConfirmAction(value) | |||
// uanConfirmAction(value).then((confirmResult) => { | |||
// console.log("成功333333333333", confirmResult) | |||
// navTo( | |||
// `/subpackage/after-sale/refund-order-balance/result`) | |||
// }); | |||
} else { | |||
msg("圈存初始化指令验证失败, 重新初始化"); | |||
} | |||
@@ -309,16 +312,19 @@ | |||
}; | |||
console.log("消费成功"); | |||
quanApplyAction(applyDic).then((applyValue) => { | |||
uanConfirmAction(applyValue).then(( | |||
confirmResult) => { | |||
navTo( | |||
`/subpackage/after-sale/refund-order-balance/result`) | |||
}); | |||
uanConfirmAction(value) | |||
// uanConfirmAction(applyValue).then(( | |||
// confirmResult) => { | |||
// console.log("成功111111111111", confirmResult) | |||
// navTo( | |||
// `/subpackage/after-sale/refund-order-balance/result`) | |||
// }); | |||
}); | |||
} | |||
}); | |||
} else if (fixStatus === 2) { | |||
uanConfirmSucessAction(value).then((confirmResult) => { | |||
console.log("成功222222222222", confirmResult) | |||
navTo( | |||
`/subpackage/after-sale/refund-order-balance/result`) | |||
}); | |||
@@ -408,7 +414,7 @@ | |||
}; | |||
/*圈存确认*/ | |||
const uanConfirmAction = (data) => { | |||
console.log("圈存确认进入"); | |||
console.log("圈存确认进入", data); | |||
console.log("applyValue===========", data) | |||
let cmdArr = data.command.split(","); | |||
console.log(cmdArr); | |||
@@ -427,7 +433,7 @@ | |||
command: data.command, | |||
cosResponse: res.toString(), | |||
rechargeId: data.rechargeId, | |||
paidAmount: data.fee, | |||
paidAmount: state.refundBalance, | |||
giftAmount: 0, | |||
}; | |||
const options = { | |||
@@ -436,15 +442,24 @@ | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(quanConfirm, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
request(quanConfirm, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
navTo( | |||
`/subpackage/after-sale/refund-order-balance/result`) | |||
}); | |||
} | |||
}); | |||
// return new Promise(async (resolve, reject) => { | |||
// uni.hideLoading(); | |||
// const res = await request(quanConfirm, options); | |||
// const data = stringToJson(res.bizContent); | |||
// console.log("data=========", data) | |||
// resolve(data); | |||
// }).catch((error) => { | |||
// reject(error); | |||
// }); | |||
// } | |||
// }); | |||
}; | |||
/*圈存修复*/ |
@@ -353,6 +353,14 @@ | |||
} | |||
const savaHandle = () => { | |||
if (!state.form.userPosImgUrl) { | |||
msg('请上传身份证的人像面'); | |||
return; | |||
} | |||
if (!state.form.userNegImgUrl) { | |||
msg('请上传身份证的国徽面'); | |||
return; | |||
} | |||
if (!checkStr(state.form.userIdNum, 'card')) { | |||
msg('请输入正确身份证'); | |||
return; |
@@ -111,12 +111,13 @@ export function request(code, options = {}, start = false) { | |||
if (options.showLoading) { | |||
uni.hideLoading() | |||
} | |||
if (res.data.statusCode == 704 && res.data.errorMsg.indexOf('相应的申请单')) { | |||
// let content = s4.decryptData_CBC(res, sm4Key) | |||
// console.log('请求成功返回参数:', code, content, res) | |||
let aa = "data: {bizContent:{'val':null}}" | |||
resolve(aa) | |||
} else if (res.data.statusCode !== 0) { | |||
// if (res.data.statusCode == 704 && res.data.errorMsg.indexOf('相应的申请单')) { | |||
// // let content = s4.decryptData_CBC(res, sm4Key) | |||
// console.log('请求成功返回参数:---------', code, content, res) | |||
// let aa = "data: {bizContent:{'val':null}}" | |||
// resolve(aa) | |||
// } else | |||
if (res.data.statusCode !== 0) { | |||
if (res.data.statusCode == 600) { | |||
resolve(res.data) | |||
} else if (res.data.statusCode == 401) { |