红绿项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

86 lines
1.9 KiB

<template>
<view class="content">
<navigation>
Recharge Record
</navigation>
<view class="record_body">
<view class="record_item flex" v-for="(item,index) in record_list" :key="item.orderNo">
<view class="numcon flex">
<image src="../../../static/login/[email protected]" mode="aspectFit" class="img1"></image>
<view class="num">
<view class="rec">
{{item.tranAmt}} Wait
</view>
<view class="cpay">
CPAY
</view>
</view>
</view>
<view class="time">
{{item.addTime}}
</view>
</view>
</view>
</view>
</template>
<script>
import api from '@/utils/api'
import utils from '@/utils'
import cont from "@/components/navigation/navigation.vue"
import index from '@/utils/index.js'
export default{
data(){
return{
pageNumber:1,
pageSize:20,
record_list:[],
}
},
onLoad() {
uni.request({
url: '/start/api/recharge/rechargeList',
data: {
"ticket": uni.getStorageSync('logInfo').data,
"pageNumber":this.pageNumber,
"pageSize":this.pageSize,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息
},
method: 'POST', //请求方式 或GET,必须为大写
success: (res) => {
this.record_list=res.data.data.content;
for(var i=0;i<this.record_list[i].addTime;i++){
this.record_list[i].addTime=index.formatyymmddhhmmss(this.record_list[i].addTime);
}
console.log(res.data.data.content,999);
},
fail: (res) => {
console.log(res);
}
});
setTimeout(function(){
this.getCurrentTime();
},2000)
},
methods:{
getCurrentTime(){
for(var i=0;i<record_list.length;i++){
this.record_list[i].addTime=index.formathhmm(this.record_list[i].addTime);
}
}
},
}
</script>
<style>
@import './index.css';
</style>