diff --git a/pages/applicationKeyUser/applicationKeyUser.js b/pages/applicationKeyUser/applicationKeyUser.js index 67da65f..39d512a 100644 --- a/pages/applicationKeyUser/applicationKeyUser.js +++ b/pages/applicationKeyUser/applicationKeyUser.js @@ -14,18 +14,22 @@ Page({ communityId:'', showTypeCd:false, typeCdList: ['业主', '家庭成员','租客'], - typeCd:0, typeCdName:'业主', - age:null, - sex:'男', sexList:['男','女'], showSex:false, showExpiry: false, expiryList:['一个月','半年','一年'], + + photoList:[], + name:'', + age: null, + sex: '男', + typeCd: 0, + idCard:'', startTime: null, - photos:[], - photoList:[] - + endTime:null, + tel:'', + photos: [], }, /** @@ -33,6 +37,16 @@ Page({ */ onLoad: function (options) { + let _that = this; + context.getOwner(function(_owner){ + _that.setData({ + name:_owner.appUserName, + idCard:_owner.idCard, + tel:_owner.link + }); + + }); + this.setData({ locations: JSON.parse(options.locations), communityId: options.communityId @@ -206,5 +220,38 @@ Page({ }, removePhoto:function(e){ console.log(e.detail.index); + }, + saveApplicationKey:function(){ + //保存钥匙信息 + console.log(this.data); + let _objData = { + name: this.data.name, + age: this.data.age, + sex: this.data.sex, + typeCd: this.data.typeCd, + idCard: this.data.idCard, + startTime: this.data.startTime, + endTime: this.data.endTime, + tel: this.data.tel, + photos: this.data.photos, + }; + let msg = ''; + if(_objData.name == ''){ + msg = '请填写名称'; + } + if (_objData.age == null){ + msg = "请填写年龄" + } + if (_objData.sex == null) { + msg = "请选择性别" + } + if (_objData.typeCd == null) { + msg = "请选择身份" + } + if (_objData.idCard == null) { + msg = "请填写身份证" + } + + } }) \ No newline at end of file diff --git a/pages/applicationKeyUser/applicationKeyUser.wxml b/pages/applicationKeyUser/applicationKeyUser.wxml index bb2156a..f4809cf 100644 --- a/pages/applicationKeyUser/applicationKeyUser.wxml +++ b/pages/applicationKeyUser/applicationKeyUser.wxml @@ -25,13 +25,16 @@ + + 请上传身份证正反面 + - 提交申请 + 提交申请 diff --git a/pages/applicationKeyUser/applicationKeyUser.wxss b/pages/applicationKeyUser/applicationKeyUser.wxss index 9be3843..92bb469 100644 --- a/pages/applicationKeyUser/applicationKeyUser.wxss +++ b/pages/applicationKeyUser/applicationKeyUser.wxss @@ -12,6 +12,11 @@ .aku_photo_view{ background-color: #FFF; - height: 200rpx; + height: 250rpx; padding: 40rpx 0 40rpx 40rpx; +} + +.aku_photo_view text{ + font-size: 30rpx; + color: #8a8a8a } \ No newline at end of file