Browse Source

为空判断

zhengkaixin 4 years ago
parent
commit
7b4521cc29
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/projects/business/views/Master/Property/Car/Apply.vue

+ 8 - 3
src/projects/business/views/Master/Property/Car/Apply.vue

@@ -12,7 +12,7 @@
 				</div>
 				<div class="mui-input-row">
 					<label>手机号码</label>
-					<span class="color4fc5f7">{{info.telephone}}</span>
+					<span>{{info.telephone}}</span>
 				</div>
 
 				<div class="mui-input-row">
@@ -359,8 +359,13 @@
 				this.isLoading = true;
 
 				API.parkingUnit().then(response => {
-					this.detail.unitId=response.unit.id;
-					this.unitName=response.unit.name;
+					if(!response.unit){
+						mui.toast('未配置租用单位,请联系管理员');
+					}else{
+						this.detail.unitId=response.unit.id;
+						this.unitName=response.unit.name;
+					}
+
 					this.isLoading = false;
 					if(response.id){
 						this.issubmit=false;