zhengkaixin 1 year ago
parent
commit
761c7ae254
1 changed files with 7 additions and 2 deletions
  1. 7 2
      pages/user/member/member.vue

+ 7 - 2
pages/user/member/member.vue

@@ -254,8 +254,13 @@
 			if (monthN2 >= 1 && monthN2 <= 9) {
 				monthN2 = "0" + monthN2;
 			}
-			this.carImg3span1 =parseInt( this.personInfo.curMonthKwh)
-			this.carImg3span3 =parseInt(this.personInfo.prevMonthKwh)
+			if(this.personInfo.curMonthKwh){
+				this.carImg3span1 =parseInt( this.personInfo.curMonthKwh)
+			}
+			if(this.personInfo.prevMonthKwh){
+				this.carImg3span3 =parseInt( this.personInfo.prevMonthKwh)
+			}
+			//this.carImg3span3 =parseInt(this.personInfo.prevMonthKwh)
 			this.startDate= year2 + '-' + monthN2 + '-01' 
 			
 		},