Commit 67b8168ddf035af7bdca9b3ff145d60060ba8dc3

Authored by wuxuehong
1 parent a8788a3ea2

儿童预约建档

Showing 1 changed file with 15 additions and 10 deletions

littleApp_child/packageA/pages/preDocumented/preDocumented.js View file @ 67b8168
... ... @@ -10,6 +10,7 @@
10 10 postObj: {},
11 11 queryData:{},
12 12 currentAddress: {},
  13 + currentAddress1: {},
13 14 sex:[
14 15 {
15 16 name:"男",
16 17  
... ... @@ -419,17 +420,21 @@
419 420 let postData = this.data.postObj;
420 421 postData.liveType = liveType;
421 422 postData.hospitalId = hospital.hospitalId;
422   - if (this.data.currentAddress.addEntry) {
423   - postData.babyProvinceId = this.data.currentAddress.addEntry[0].id;
424   - postData.babyCityId = this.data.currentAddress.addEntry[1].id;
425   - postData.babyAreaId = this.data.currentAddress.addEntry[2].id;
426   - postData.babyStreetId = this.data.currentAddress.addEntry[3].id;
  423 + if (this.data.currentAddress) {
  424 + if (this.data.currentAddress.addEntry) {
  425 + postData.babyProvinceId = this.data.currentAddress.addEntry[0].id;
  426 + postData.babyCityId = this.data.currentAddress.addEntry[1].id;
  427 + postData.babyAreaId = this.data.currentAddress.addEntry[2].id;
  428 + postData.babyStreetId = this.data.currentAddress.addEntry[3].id;
  429 + }
427 430 }
428   - if (this.data.currentAddress1.addEntry) {
429   - postData.provinceId = this.data.currentAddress1.addEntry[0].id;
430   - postData.cityId = this.data.currentAddress1.addEntry[1].id;
431   - postData.areaId = this.data.currentAddress1.addEntry[2].id;
432   - postData.streetId = this.data.currentAddress1.addEntry[3].id;
  431 + if (this.data.currentAddress1) {
  432 + if (this.data.currentAddress1.addEntry) {
  433 + postData.provinceId = this.data.currentAddress1.addEntry[0].id;
  434 + postData.cityId = this.data.currentAddress1.addEntry[1].id;
  435 + postData.areaId = this.data.currentAddress1.addEntry[2].id;
  436 + postData.streetId = this.data.currentAddress1.addEntry[3].id;
  437 + }
433 438 }
434 439 if (postData.vcCardNo===null) {
435 440 delete postData.vcCardNo;