|
@@ -687,7 +687,7 @@
|
|
|
import * as api from "@/apis/site.js"
|
|
|
let _self;
|
|
|
import {
|
|
|
- newDate
|
|
|
+ newDate,parseUnixTime
|
|
|
|
|
|
} from '@/utils'
|
|
|
export default {
|
|
@@ -769,6 +769,8 @@
|
|
|
]
|
|
|
},
|
|
|
},
|
|
|
+ carImg3span1:0,
|
|
|
+ carImg3span2:0,
|
|
|
canUse:false,
|
|
|
flag: "",
|
|
|
pilestate:{}
|
|
@@ -934,6 +936,44 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getChargeList(){
|
|
|
+ var date =new Date().getTime()-30*1000*60*60*24;
|
|
|
+ var startDate =parseUnixTime(new Date(date),'{y}-{m}-{d}');
|
|
|
+ indexAPI.chargingRecordData({
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize:999,
|
|
|
+ startDate: startDate,
|
|
|
+ // endDate: this.endDate
|
|
|
+ }).then((res) => {
|
|
|
+
|
|
|
+
|
|
|
+ var chargeList =res.data.data;
|
|
|
+ var num1=0;
|
|
|
+ var num2=0;
|
|
|
+ for(var i in chargeList){
|
|
|
+ var obj=chargeList[i]
|
|
|
+ if(obj.status==2&&obj.userCardId==null&&obj.entAccountId==null){
|
|
|
+ num1+=obj.electricQuantity
|
|
|
+ num2+=obj.totalServiceMoney
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(num1,num2)
|
|
|
+ this.carImg3span1=parseInt(num1);
|
|
|
+ this.carImg3span2=parseInt(num2) ;
|
|
|
+ // if(num2*0.4>20){
|
|
|
+
|
|
|
+ // this.carImg3Bl=true;
|
|
|
+ // }else{
|
|
|
+ // this.carImg4Bl=true;
|
|
|
+ // }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getHomePage() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|