144 lines
3.8 KiB
Vue
144 lines
3.8 KiB
Vue
<template>
|
|
<div id="myapp" v-cloak style="display: none;" :style="{display:'block'}">
|
|
<!-- <div class="title-header header" style="padding: 0;">-->
|
|
<!-- <div class="nav-btn" @click="back()">-->
|
|
<!-- <img src="@/static/common/back.png" alt="">-->
|
|
<!-- </div>-->
|
|
<!-- <div class="btn-header ">消费记录-->
|
|
<!-- </div>-->
|
|
<!-- <div class="nav-btn">-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- <div class="placeholder"></div> -->
|
|
<div class="updateContents" style="margin-top:89u*2upx;width: 100%;height: calc(100vh - 120u*2upx)">
|
|
<div class="content" style="height:100% !important">
|
|
<!-- <div class="mask" v-show="loading">-->
|
|
<!-- <img src="@/static/loadingMf.gif" alt="">-->
|
|
<!-- <span>加载中...</span>-->
|
|
<!-- </div>-->
|
|
<ul>
|
|
<!-- <li v-for="item in list">
|
|
<span>{{item.cardtime.slice(0,16)}}</span>
|
|
<span v-if="item.outmoney > 0" style="font-weight: bolder">{{item.outmoney}}元</span>
|
|
<span v-if="item.outmoney < 0"
|
|
style="color: #ff6868;font-weight: bolder">{{item.outmoney}}元(退款)</span>
|
|
</li> -->
|
|
<li v-for="item in list">
|
|
<div class="item_icon">
|
|
<img :src="getIconUrl(item.terminalType)">
|
|
</div>
|
|
<div class="item_content">
|
|
<div>
|
|
<div class="typeName">{{item.terminalName}}</div>
|
|
<div class="cardTime">{{item.cardtime}}</div>
|
|
</div>
|
|
<div class="moneyNum" :style="{color:item.outmoney > 0?'#fb9907':''}">
|
|
{{item.outmoney > 0 ? '+'+item.outmoney : item.outmoney}}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div style="text-align: center;margin-top: 50% " v-if="noDataFlag">
|
|
<img src="@/static/no-application.png" style="width: 74u*2upx;" alt="">
|
|
<p>暂无消费记录</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
mealCardRecords
|
|
} from '@/common/api.js'
|
|
import {
|
|
callbackRequest
|
|
} from '@/common/util.js'
|
|
export default {
|
|
name: "problem",
|
|
data() {
|
|
return {
|
|
list: [],
|
|
noDataFlag: false,
|
|
loading: false
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
},
|
|
created: function () {
|
|
var self = this;
|
|
self.list = [];
|
|
self.loading = true;
|
|
self.noDataFlag = false;
|
|
// request.listConsumRecords({}, function (res) {
|
|
let params ={
|
|
method: mealCardRecords,
|
|
}
|
|
callbackRequest(params).then((res) => {
|
|
self.loading = false;
|
|
if (res.returnCode === "1") {
|
|
self.list = res.returnData?res.returnData:[];
|
|
if(self.list.length == 0){
|
|
self.noDataFlag = true;
|
|
}
|
|
console.log(self.list)
|
|
} else {
|
|
self.noDataFlag = true;
|
|
mui.alert(res.returnMsg)
|
|
}
|
|
})
|
|
},
|
|
methods: {
|
|
getIconUrl(terminalType){
|
|
return '@/staic/xfjl/icon' + (terminalType < 12?terminalType:'12')+'.png';
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.content ul{
|
|
padding: 10*2upx 10*2upx;
|
|
}
|
|
.content ul li{
|
|
background: #fff;
|
|
width: 100%;
|
|
height: 60*2upx;
|
|
border-radius: 10*2upx;
|
|
margin-bottom: 10*2upx;
|
|
}
|
|
.item_icon {
|
|
width: 60*2upx;
|
|
height: 100%;
|
|
float: left;
|
|
padding:12*2upx
|
|
}
|
|
.item_icon img {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.item_content {
|
|
float: left;
|
|
width: calc(100% - 60*2upx);
|
|
height: 100%;
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.moneyNum {
|
|
padding-right: 10*2upx;
|
|
font-size: 16*2upx;
|
|
font-weight: 600;
|
|
color: #0E1A24;
|
|
}
|
|
.typeName {
|
|
font-size: 16*2upx;
|
|
color: #0E1A24;
|
|
}
|
|
.cardTime {
|
|
font-size: 12*2upx;
|
|
color: #97A5B1;
|
|
padding-top: 4*2upx;
|
|
}
|
|
</style> |