} | } | ||||
} | } | ||||
}); | }); | ||||
this.globalParam(); | |||||
//获取微信小程序openid | //获取微信小程序openid | ||||
uni.login({ | uni.login({ | ||||
provider: "weixin", | provider: "weixin", | ||||
}); | }); | ||||
} | } | ||||
// #endif | // #endif | ||||
this.globalParam(); | |||||
}, | }, | ||||
onShow: function (option) { | onShow: function (option) { | ||||
console.log(option); | console.log(option); |
{ | { | ||||
"root": "subpackage/personal-center", //个人中心 | "root": "subpackage/personal-center", //个人中心 | ||||
"pages": [ | "pages": [ | ||||
{ | |||||
"path": "consumption-record", | |||||
"style": { | |||||
"navigationBarTitleText": "消费明细", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | { | ||||
"path": "remind/remind", | "path": "remind/remind", | ||||
"style": { | "style": { |
</view> | </view> | ||||
<view class="right-box"> | <view class="right-box"> | ||||
<view class="no">账户编号:000100</view> | <view class="no">账户编号:000100</view> | ||||
<view class="btn btn-record">账户充值记录</view> | |||||
<view class="btn btn-record" @click="goRecord()">账户充值记录</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
console.log(data); | console.log(data); | ||||
}); | }); | ||||
}; | |||||
}; | |||||
const goRecord=()=>{ | |||||
uni.navigateTo({ | |||||
url:"/subpackage/personal-center/consumption-record" | |||||
}) | |||||
} | |||||
</script> | </script> | ||||
<style> | <style> |
const getCarColor = () => { | const getCarColor = () => { | ||||
const data=getItem('globalParam') | const data=getItem('globalParam') | ||||
if(props.type=="1"){ | if(props.type=="1"){ | ||||
console.log("111111111111111111111111111",data) | |||||
for(var i=0;i<data.carPlateColorType.length;i++){ | for(var i=0;i<data.carPlateColorType.length;i++){ | ||||
for(var j=0;j<state.allColorList.length;j++){ | for(var j=0;j<state.allColorList.length;j++){ | ||||
console.log("23",getCodeName('VEHICLE_COLOR_TYPE',data.trucksPlateColorType[i])) | console.log("23",getCodeName('VEHICLE_COLOR_TYPE',data.trucksPlateColorType[i])) |
<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> | |||||
</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> | |||||
</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"; | |||||
const state = reactive({ | |||||
list:'', //所有数据 | |||||
newList:'', //最终展示的 | |||||
name:'', | |||||
value:'',//input框里的值 | |||||
}) | |||||
onLoad((option : any) => { | |||||
console.log("option",option) | |||||
state.name=option.name; | |||||
getList(); | |||||
}) | |||||
const getList=()=>{ | |||||
// const options = { | |||||
// type: 2, | |||||
// data: { | |||||
// 'accountId': state.name | |||||
// }, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// 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.newList=state.list; | |||||
// console.log("交易记录",data) | |||||
// }) | |||||
} | |||||
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]); | |||||
} | |||||
} | |||||
console.log("state.newList",state.newList) | |||||
} | |||||
const doSearch=()=>{ | |||||
search(); | |||||
} | |||||
</script> | |||||
<style scoped> | |||||
.content{ | |||||
/* background-color:#f6f6f6; */ | |||||
min-height:100vh; | |||||
padding: 0 30rpx; | |||||
overflow: hidden; | |||||
font-size: 32rpx; | |||||
} | |||||
.search_wrap{ | |||||
display:flex; | |||||
margin:20rpx 0; | |||||
} | |||||
.search_wrap>input{ | |||||
background-color:rgb(238,240,237); | |||||
width: 76%; | |||||
height: 40rpx; | |||||
line-height: 40rpx; | |||||
padding: 10rpx 10rpx; | |||||
border-radius: 10rpx 0 0 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; | |||||
} | |||||
.time{ | |||||
display:flex; | |||||
margin-bottom: 16rpx; | |||||
justify-content: space-between; | |||||
} | |||||
</style> |
</script> | </script> | ||||
<style scoped> | <style scoped> | ||||
::v-deep .uni-date-x { | |||||
background-color: #EEF7F7 !important; | |||||
} | |||||
.content{ | .content{ | ||||
background-color: white; | |||||
background-color: #EEF7F7; | |||||
overflow: hidden; | overflow: hidden; | ||||
min-height: 100vh; | |||||
} | } | ||||
.charts-box { | .charts-box { | ||||
width: 100%; | width: 100%; | ||||
display:flex; | display:flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
margin-bottom:36rpx; | margin-bottom:36rpx; | ||||
margin-top: 16rpx; | |||||
} | } | ||||
.change_type>uni-data-select{ | .change_type>uni-data-select{ | ||||
width:40%; | width:40%; |