From bcc9d110052cd61cf2c2fa162f1182b7a1c65ec5 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Thu, 2 Jan 2020 12:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E9=92=A5=E5=8C=99=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationKeyUser/applicationKeyUser.js | 59 +++++++++++++++++-- .../applicationKeyUser.wxml | 5 +- .../applicationKeyUser.wxss | 7 ++- 3 files changed, 63 insertions(+), 8 deletions(-) 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