huangmp 4 سال پیش
والد
کامیت
3c7844a5cb

+ 48 - 0
.gitignore

@@ -0,0 +1,48 @@
+/unpackage/dist/build/mp-weixin/comps/login.js
+/unpackage/dist/build/mp-weixin/comps/login.json
+/unpackage/dist/build/mp-weixin/comps/login.wxml
+/unpackage/dist/build/mp-weixin/comps/login.wxss
+/unpackage/dist/build/mp-weixin/pages/bindRoom/bindRoom.js
+/unpackage/dist/build/mp-weixin/pages/bindRoom/bindRoom.json
+/unpackage/dist/build/mp-weixin/pages/bindRoom/bindRoom.wxml
+/unpackage/dist/build/mp-weixin/pages/bindRoom/bindRoom.wxss
+/unpackage/dist/build/mp-weixin/static/common/banner.png
+/unpackage/dist/build/mp-weixin/static/wode/churu.png
+/unpackage/dist/build/mp-weixin/static/wode/logout.png
+/unpackage/dist/build/mp-weixin/static/wode/renliang.png
+/unpackage/dist/build/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.js
+/unpackage/dist/build/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.json
+/unpackage/dist/build/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.wxml
+/unpackage/dist/build/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.wxss
+/unpackage/dist/build/mp-weixin/project.private.config.json
+/unpackage/dist/dev/.sourcemap/mp-weixin/comps/login.js.map
+/unpackage/dist/dev/.sourcemap/mp-weixin/pages/bindRoom/bindRoom.js.map
+/unpackage/dist/dev/.sourcemap/mp-weixin/pages/bingRoom/bingRoom.js.map
+/unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.js.map
+/unpackage/dist/dev/mp-weixin/comps/login.js
+/unpackage/dist/dev/mp-weixin/comps/login.json
+/unpackage/dist/dev/mp-weixin/comps/login.wxml
+/unpackage/dist/dev/mp-weixin/comps/login.wxss
+/unpackage/dist/dev/mp-weixin/pages/bindRoom/bindRoom.js
+/unpackage/dist/dev/mp-weixin/pages/bindRoom/bindRoom.json
+/unpackage/dist/dev/mp-weixin/pages/bindRoom/bindRoom.wxml
+/unpackage/dist/dev/mp-weixin/pages/bindRoom/bindRoom.wxss
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left.js
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left.json
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left.wxml
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left.wxss
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left1.js
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left1.json
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left1.wxml
+/unpackage/dist/dev/mp-weixin/pages/community/community-u-waterfall-left1.wxss
+/unpackage/dist/dev/mp-weixin/static/common/banner.png
+/unpackage/dist/dev/mp-weixin/static/wode/churu.png
+/unpackage/dist/dev/mp-weixin/static/wode/logout.png
+/unpackage/dist/dev/mp-weixin/static/wode/renliang.png
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.js
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.json
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.wxml
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.wxss
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-parse/libs/trees.json
+/unpackage/dist/dev/mp-weixin/uview-ui/components/u-parse/u-parse.json
+/node_modules/

+ 3 - 5
assets/http/api.js

@@ -81,9 +81,8 @@ const adList = p => http.post('/community-app-service/app/adPushApp/getList', p)
 
 
 
-
-
-
+//获取住户审核记录
+const getAllApplyUserByMemberId = p => http.get('/community-app-service/app/applyuser/list', {params:p})
 
 //获取字典接口
 const getDictByCode = code => http.get('/blade-system/dict-biz/dictionary?code=' + code);
@@ -94,8 +93,7 @@ const carPage = p => http.post('/community-app-service/app/car/page', p)
 const saveOrUpdateCar = p => http.post('/community-app-service/app/car/saveOrUpdate', p)
 //根据memberId获取家人列表
 const getAllUserByMemberId = p => http.post('/community-app-service/app/houseuser/getRoomUserByMemberId', p)
-//获取住户审核记录
-const getAllApplyUserByMemberId = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByMemberId', p)
+
 //通过房间获取住户审核记录
 const getAllApplyUserByRoomIds = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByRoomIds', p)
 

+ 2 - 2
pages/choosePlot/householdCert/householdCert.vue

@@ -449,8 +449,8 @@
 				let entry_img_uri = that.entry_img_uri;
 
 				if (nationality == 3) {
-					params['passport_img_uri'] = that.passport_img_uri;
-					params['entry_img_uri'] = that.entry_img_uri;
+					params['passportImgUri'] = that.passport_img_uri;
+					params['entryImgUri'] = that.entry_img_uri;
 
 					if (type == 0) {
 						if (!passport_img_uri) {

+ 14 - 0
pages/index/index.vue

@@ -566,8 +566,22 @@
 					_this.getResidentialListByMember();
 					_this.getAuthDevice()
 					_this.fetchAuthRecordNum()
+					_this.getOwnRoomList()
 				}
 			},
+			getOwnRoomList(){
+				let params={
+					memberId:this.vuex_member.id
+				}
+				this.$http.getHouseUserCondition(params).then(res=>{
+					let list=res.data.data
+					list.forEach(item=>{
+						item.address=item.residentialName+"-"+item.buildingName+"-"+item.unitName+"-"+item.roomName
+					})
+					getApp().globalData.own_room_list = list;
+					this.$u.vuex('vuex_own_room_list',list)
+				})
+			},
 			/**
 			 * 游客登陆
 			 */

+ 35 - 36
pages/myFamily/add/add.vue

@@ -113,7 +113,7 @@
 			</view>
 		</view>
 		<u-action-sheet @click="photoChecked" z-index="999999" :list="list" v-model="show"></u-action-sheet>
-		<u-select z-index="999999" mode="single-column" value-name="id" label-name="name" :list="own_room_list"
+		<u-select z-index="999999" mode="single-column" value-name="id" label-name="address" :list="roomList"
 			v-model="roomShow" @confirm="roomConfirm"></u-select>
 		<u-select z-index="999999" mode="single-column" :list="typeArry" v-model="typeShow" @confirm="typeConfirm">
 		</u-select>
@@ -161,10 +161,11 @@
 
 				roomLabel: '',
 				roomShow: false,
+				room: {},
 				room_id: 0,
-				own_room_list: null,
+				roomList: null,
 				//房间列表下标
-				own_room_list_index: 0,
+				roomList_index: 0,
 
 				//姓名
 				name: null,
@@ -172,9 +173,9 @@
 				tel: null,
 
 				//住户类型
-				typeLabel: '业主',
+				typeLabel: '家属',
 				typeShow: false,
-				type: 0,
+				type: 1,
 				typeArry: [{
 						value: '0',
 						label: '业主'
@@ -256,10 +257,11 @@
 			};
 		},
 		onLoad: function(options) {
-			var that = this;
-			that.setData({
-				own_room_list: app.globalData.own_room_list
-			});
+			let residentialId = uni.getStorageSync("residentialId")
+			this.roomList = this.vuex_own_room_list.filter(item => item.residentialId == residentialId)
+			this.roomLabel = this.roomList[0].address
+			this.room_id = this.roomList[0].roomId
+			this.room = this.roomList[0]
 		},
 		onShow() {
 			this.appletType = uni.getStorageSync("appletType")
@@ -302,15 +304,12 @@
 			 * @param {Object} imgUrl 图片url
 			 */
 			uploadImage(imgUrl) {
-				console.log("operatype: ", this.operaType);
-				console.log("imgUrl", imgUrl)
 				var that = this;
 				//是否需要md5加密上传人脸照
 				let is_need_md5 = false;
 				if (this.operaType == 3) {
 					is_need_md5 = true;
 				}
-
 				that.$http.uploadFile(imgUrl).then(res => {
 					if (that.operaType == 1) {
 						that.setData({
@@ -334,11 +333,9 @@
 
 			},
 			roomConfirm(e) {
-				this.room_id = 0;
-				e.map((val, index) => {
-					this.room_id = val.value
-					this.roomLabel = val.label
-				})
+				this.roomLabel = e[0].label
+				this.room_id = e[0].value
+				this.room = this.roomList.find(item => item.roomId == this.room_id)
 			},
 			typeConfirm(e) {
 				this.type = 0;
@@ -384,17 +381,14 @@
 					return;
 				}
 				params['phone'] = tel;
-				let room_id = that.own_room_list[that.own_room_list_index].id;
-
-				if (!room_id) {
-					app.globalData.autoFailHint("请选择房间号");
+				if (!this.room_id) {
 					return;
 				}
-				params['room_id'] = room_id;
+				params['roomId'] = this.room_id;
 				let type = that.type;
 				params['type'] = type;
 				let id_card = that.id_card;
-				params['id_card'] = id_card; //业主身份时,身份证必填
+				params['idCard'] = id_card; //业主身份时,身份证必填
 
 				//0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
 				if (!this.$isEmpty(id_card)) {
@@ -412,8 +406,8 @@
 				let entry_img_uri = that.entry_img_uri;
 
 				if (nationality == 3) {
-					params['passport_img_uri'] = that.passport_img_uri;
-					params['entry_img_uri'] = that.entry_img_uri;
+					params['passportImgUri'] = that.passport_img_uri;
+					params['entryImgUri'] = that.entry_img_uri;
 
 					if (type == 0) {
 						if (!passport_img_uri) {
@@ -434,24 +428,29 @@
 					this.$u.toast('请上传人脸')
 					return
 				}
-				
-				params['face_url'] = that.image_uri;
+
+				params['unitId'] = this.room.unitId
+				params['buildingId'] = this.room.buildingId
+				params['residentialId'] = this.room.residentialId
+				params['faceUrl'] = that.image_uri;
 				let face_code = that.face_code;
-				params['face_code'] = that.face_code; //性别
-				params['oper_user_type'] = 0 //操作类型,业主操作
+				params['faceCode'] = that.face_code; //性别
+				params['operUserType'] = 0 //操作类型,业主操作
 				params['sex'] = that.sex;
-				params['member_id'] = app.globalData.member.id;
+				params['memberId'] = app.globalData.member.id;
 				params['operatorName'] = app.globalData.member.name;
-				params['create_type'] = '0'; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
+				params['createType'] = '0'; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
 
-				params['record_type'] = '1'; ///申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
+				params['recordType'] = '1'; ///申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
 				// let operation = 'member/authentication';
+				console.log(params,"params");
 				this.$dialog.showLoading('请等待...')
-				let res=await that.$http.authentication(params)
+				let res = await that.$http.authentication(params)
 				uni.hideLoading()
-				//添加成功
-				if (res.data.result_code == 1) {
-					app.globalData.oneFailHint(res.data.result_msg, function() {
+				//提交成功
+				if (res.data.success) {
+					app.globalData.oneFailHint("提交成功", function() {
+						//跳转到首页
 						uni.navigateBack({
 							delta: 1 // 返回上一级页面。
 						});

+ 2 - 2
pages/myFamily/addFamily/addFamily.vue

@@ -419,8 +419,8 @@ export default {
       let entry_img_uri = that.entry_img_uri;
 
       if (nationality == 3) {
-        params['passport_img_uri'] = that.passport_img_uri;
-        params['entry_img_uri'] = that.entry_img_uri;
+        params['passportImgUri'] = that.passport_img_uri;
+        params['entryImgUri'] = that.entry_img_uri;
 
         if (type == 0) {
           if (!passport_img_uri) {

+ 0 - 1
pages/myFamily/audit-detail/audit-detail.vue

@@ -171,7 +171,6 @@ export default {
 		  params['idCard'] = that.dataDetail.id_card;
 		  params['operatorId'] = that.vuex_member.id;
 		  params['operatorName'] = that.vuex_member.name;
-		  // let operation = 'applyUser/updateCheckState';
 		  that.$http.updateCheckState(params).then(res =>{
 			  //添加成功
 			  if (res.data.result_code==1) {

+ 9 - 9
pages/myFamily/comps/apply-card.vue

@@ -7,15 +7,15 @@
 					<view class="title">{{item.residentialName}}-{{item.buildingName}}-{{item.unitName}}-{{item.roomName}}</view>
 				</view>
 				<view class="right">
-					<text v-if="item.checkState==0" class="text-warning">待审核</text>
-					<text v-if="item.checkState==1" class="text-green">已通过</text>
-					<text v-if="item.checkState==2" class="text-red">未通过</text>
+					<text v-if="item.auditStatus==0" class="text-warning">待审核</text>
+					<text v-if="item.auditStatus==1" class="text-green">已通过</text>
+					<text v-if="item.auditStatus==2" class="text-red">未通过</text>
 				</view>
 			</view>
 			<view class="item">
 				<view class="left">
 					<view  data-aid="undefined">
-					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
+					  <image v-if="!$isEmpty(item.faceUrl)" mode="aspectFill" :src="item.faceUrl"></image>
 					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
@@ -26,9 +26,9 @@
 							<text v-if="item.type==2" class="cu-tag radius line-blue sm margin-left-20">租客</text>
 							<text v-if="item.type==3" class="cu-tag radius line-blue sm margin-left-20">访客</text>
 						</view>
-						<view >手机:{{item.tel}}</view>
+						<view >手机:{{item.phone}}</view>
 						<view >申请时间:{{item.createTime}}</view>
-						<view  v-if="item.checkState==2">
+						<view  v-if="item.auditStatus==2">
 						    <text>审核意见:</text>
 							<text >{{item.checkOpinion}}</text>
 						</view>
@@ -36,7 +36,7 @@
 				</view>
 			</view>
 			<view class="bottom" >
-				<view @click="edit(item)" v-if="item.checkState==2"  class="cu-btn line-btn round sm margin-right-sm" >
+				<view @click="edit(item)" v-if="item.auditStatus==2"  class="cu-btn line-btn round sm margin-right-sm" >
 					重新提交
 				</view>
 			</view>
@@ -58,7 +58,7 @@ export default {
 	    editShow() {
 			return item => {
 				//旧版本的逻辑,有点看不懂
-				if (item.checkState!=2) {
+				if (item.auditStatus!=2) {
 					return false
 				}
 				this.vuex_own_room_list.forEach(val=>{
@@ -86,7 +86,7 @@ export default {
 				id_card:item.idCard || '',
 				sex:item.sex,
 				nationality:item.nationality,
-				image_uri:item.imageUri,
+				faceUrl:item.faceUrl,
 				passport_img_uri:item.passportImgUri || '',
 				entry_img_uri:item.entryImgUri
 			}

+ 5 - 5
pages/myFamily/comps/audit-card.vue

@@ -7,15 +7,15 @@
 					<view class="title">{{item.residentialName}}-{{item.buildingName}}-{{item.unitName}}-{{item.roomName}}</view>
 				</view>
 				<view class="right">
-					<text v-if="item.auditState==0" class="text-warning">待审核</text>
-					<text v-if="item.auditState==1" class="text-green">已通过</text>
-					<text v-if="item.auditState==2" class="text-red">未通过</text>
+					<text v-if="item.auditStatus==0" class="text-warning">待审核</text>
+					<text v-if="item.auditStatus==1" class="text-green">已通过</text>
+					<text v-if="item.auditStatus==2" class="text-red">未通过</text>
 				</view>
 			</view>
 			<view class="item">
 				<view class="left">
 					<view  data-aid="undefined">
-					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
+					  <image v-if="!$isEmpty(item.faceUrl)" mode="aspectFill" :src="item.faceUrl"></image>
 					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
@@ -28,7 +28,7 @@
 						</view>
 						<view >手机:{{item.phone}}</view>
 						<view >申请时间:{{item.createTime}}</view>
-						<view  v-if="item.auditState==2">
+						<view  v-if="item.auditStatus==2">
 						    <text>审核意见:</text>
 							<text class="text-red">{{item.checkOpinion}}</text>
 						</view>

+ 9 - 10
pages/myFamily/comps/item.vue

@@ -77,7 +77,7 @@
 			 * 删除用户
 			 */
 			deleteUserById(id) {
-				app.globalData.twoFailHint("确认删除该住户吗?", function() {
+				app.globalData.twoFailHint("确认删除该住户吗?", ()=>{
 					let params = {
 						user_id: id
 					};
@@ -162,19 +162,18 @@
 			 */
 			getApplyListByMemberId(mescroll) {
 				let params = {
-					"pageNum": mescroll.num,
-					"pageSize": mescroll.size,
-					"member_id": getApp().globalData.member.id
-				};
-				if (!this.$isEmpty(this.roomId)) {
-					params.roomId = this.roomId
+					"current": mescroll.num,
+					"size": mescroll.size,
+					"memberId": getApp().globalData.member.id,
+					'residentialId':uni.getStorageSync('residentialId')
 				}
-				// let operation = 'applyUser/getAllApplyUserByMemberId';
 				try {
 					this.$http.getAllApplyUserByMemberId(params).then(res => {
+						console.log(res);
 						if (res.data.success) {
-							let data = res.data.list
-							mescroll.endByPage(data.length, res.data.pages);
+							let data = res.data.data.records
+							let total=res.data.data.total
+							mescroll.endBySize(data.length, total);
 							if (mescroll.num == 1) this.applyList = [];
 							this.applyList = this.applyList.concat(data); //追加新数据
 						} else {

+ 6 - 11
pages/myFamily/comps/user-card.vue

@@ -10,7 +10,7 @@
 			<view class="item">
 				<view class="left">
 					<view  data-aid="undefined">
-					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
+					  <image v-if="!$isEmpty(item.faceUrl)" mode="aspectFill" :src="item.faceUrl"></image>
 					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
@@ -42,17 +42,11 @@
 		</view>
 		
 		<!-- 有自己房屋的人才可以显示添加家人的功能按钮 -->
-		<view  @click="onTap('add/add')" class=" footer-fixed" >
+		<view v-if="vuex_relationshipType==0" @click="onTap('add/add')" class=" footer-fixed" >
 			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
 				添加家人
 			</view>
 		</view>
-		
-<!-- 		<view v-if="!$isEmpty(vuex_own_room_list)" @click="onTap('add/add')" class=" footer-fixed" >
-			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-				添加家人
-			</view>
-		</view> -->
 
 	</view>
 </template>
@@ -113,9 +107,10 @@ export default {
 				id_card:item.idCard || '',
 				sex:item.sex,
 				nationality:item.nationality || '',
-				image_uri:item.imageUri || '',
+				faceUrl:item.faceUrl || '',
 				passport_img_uri:item.passportImgUri || '',
-				entry_img_uri:item.entryImgUri || ''
+				entry_img_uri:item.entryImgUri || '',
+				operUserType:item.type
 			}
 			if (this.vuex_relationshipType==0) {
 				//业主身份操作
@@ -139,7 +134,7 @@ export default {
 				id_card:item.idCard || '',
 				sex:item.sex,
 				nationality:item.nationality || '',
-				image_uri:item.imageUri || '',
+				faceUrl:item.faceUrl || '',
 				passport_img_uri:item.passportImgUri || '',
 				entry_img_uri:item.entryImgUri || ''
 			}

+ 3 - 3
pages/myFamily/editApplyFamily/editApplyFamily.vue

@@ -531,8 +531,8 @@ export default {
       let entry_img_uri = that.entry_img_uri;
 
       if (nationality == 3) {
-        params['passport_img_uri'] = that.passport_img_uri;
-        params['entry_img_uri'] = that.entry_img_uri;
+        params['passportImgUri'] = that.passport_img_uri;
+        params['entryImgUri'] = that.entry_img_uri;
 
         if (type == 0) {
           if (!passport_img_uri && !that.show_passport_img_uri) {
@@ -595,7 +595,7 @@ export default {
       }
 
       params['id'] = that.apply_user_id;
-      params['checkState'] = e.currentTarget.dataset.id;
+      params['auditStatus'] = e.currentTarget.dataset.id;
       params['checkOpinion'] = that.checkOpinion;
 	  params['name'] = that.name;
 	  params['idCard'] = that.id_card;

+ 35 - 24
pages/myFamily/editFamily/editFamily.vue

@@ -3,30 +3,41 @@
 		<view class="form" style="padding-top: 20rpx;">
 			<u-form :border="true" ref="uForm">
 				<u-form-item :required="true" label="姓名:" prop="name" label-width="150">
-					<u-input :disabled="true" :border="true" placeholder="姓名,必填" v-model="name" type="text"></u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="姓名,必填" v-model="name" type="text"></u-input>
+					</view>
 				</u-form-item>
 				<u-form-item :required="true" label="手机号:" prop="tel" label-width="150">
 					<u-input :border="true" maxlength="11" placeholder="请输入11位手机号码" v-model="tel" type="number">
 					</u-input>
 				</u-form-item>
 				<u-form-item :required="true" label="房间号:" prop="room_name" label-width="150">
-					<u-input :disabled="true" :border="true" placeholder="请输入房间号" v-model="room_name" type="text">
-					</u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="请输入房间号" v-model="room_name" type="text">
+						</u-input>
+					</view>
 				</u-form-item>
 				<u-form-item :required="true" label="住户类型:" prop="type" label-width="150">
-					<u-input :border="true" type="select" :select-open="typeShow" v-model="typeLabel"
-						placeholder="请选择住户类型" @click="typeShow = true"></u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="请选择住户类型" v-model="typeLabel" type="text">
+						</u-input>
+					</view>
 				</u-form-item>
 				<u-form-item :required="true" label="国籍:" prop="nationality" label-width="150">
-					<u-input :border="true" type="select" :select-open="nationalityShow" v-model="nationalityLabel"
-						@click="nationalityShow = true"></u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="国籍" v-model="nationalityLabel" type="text">
+						</u-input>
+					</view>
 				</u-form-item>
 				<u-form-item label="证件类型:" prop="nationalityName" label-width="150">
-					<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="证件类型" v-model="nationalityName" type="text"></u-input>
+					</view>
 				</u-form-item>
 				<u-form-item :required="type==0?true:false" label="证件号码" prop="id_card" label-width="150">
-					<u-input :border="true" placeholder="住户类型是业主时,必填" :trim="true" maxlength="18" v-model="id_card"
-						type="text"></u-input>
+					<view style="background-color: #f6f6f6;padding: 0 20rpx;border-radius: 4rpx;">
+						<u-input disabled :border="false" placeholder="身份证号" v-model="id_card" type="text"></u-input>
+					</view>
 				</u-form-item>
 				<u-form-item :required="true" label="性别" prop="sex" label-width="150">
 					<u-radio-group v-model="sex">
@@ -98,7 +109,7 @@
 			</view>
 			<view class="category" style="padding-bottom: 140rpx;">
 				<view v-for="(item, index) in iconArray" :key="index" class="category_item">
-					<view class="category_item_wrap"  :data-index="item.index">
+					<view class="category_item_wrap" :data-index="item.index">
 						<view class="icon_wrap">
 							<image :src="item.iconUrl" class="index_icon"></image>
 						</view>
@@ -148,7 +159,7 @@
 				show: false,
 
 				//背景图
-				bgsrc:'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
+				bgsrc: 'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
 				bgWidth: 350,
 				bgHeight: 320,
 				//显示图
@@ -170,7 +181,7 @@
 						value: '0',
 						label: '业主'
 					},
-			 	{
+					{
 						value: '1',
 						label: '家属'
 					},
@@ -179,18 +190,18 @@
 						label: '租户'
 					}
 				],
-			 //国籍
+				//国籍
 				defaultNationality: [0],
-			 nationalityLabel: '中国大陆',
+				nationalityLabel: '中国大陆',
 				nationalityShow: false,
 				nationality: 0,
-			 nationalityName: '身份证',
+				nationalityName: '身份证',
 				nationalityArry: [{
 						value: '0',
 						label: '中国大陆'
 					},
 					{
-			 		value: '1',
+						value: '1',
 						label: '中国香港/澳门'
 					},
 					{
@@ -297,7 +308,7 @@
 			let sex = options.sex;
 			let passport_img_uri = options.passport_img_uri || null;
 			let entry_img_uri = options.entry_img_uri || null;
-			let image_uri = options.image_uri || null; //选中性别
+			let image_uri = options.faceUrl || null; //选中性别
 			this.setData({
 				user_id: user_id,
 				name: name,
@@ -349,7 +360,7 @@
 					if (this.nationality == 0) {
 						this.nationalityName = '身份证';
 					} else if (this.nationality == 1) {
-				 	this.nationalityName = '港澳居民往来内地通行证';
+						this.nationalityName = '港澳居民往来内地通行证';
 					} else if (this.nationality == 2) {
 						this.nationalityName = '台湾居民往来大陆通行证';
 					} else if (this.nationality == 3) {
@@ -389,7 +400,7 @@
 						that.setData({
 							passport_img_uri: res.data.data.link,
 							show_passport_img_uri: imgUrl
-				 	});
+						});
 					} else if (that.operaType == 2) {
 						that.setData({
 							entry_img_uri: res.data.data.link,
@@ -400,7 +411,7 @@
 							image_uri: res.data.data.link,
 							show_image_uri: imgUrl,
 							face_code: res.data.data.imgMd5
-				  });
+						});
 					}
 				})
 
@@ -447,8 +458,8 @@
 				let entry_img_uri = that.entry_img_uri;
 
 				if (nationality == 3) {
-					params['passport_img_uri'] = that.passport_img_uri;
-					params['entry_img_uri'] = that.entry_img_uri;
+					params['passportImgUri'] = that.passport_img_uri;
+					params['entryImgUri'] = that.entry_img_uri;
 
 					if (type == 0) {
 						if (!passport_img_uri && !that.show_passport_img_uri) {
@@ -475,7 +486,7 @@
 				params['sex'] = that.sex; //添加了人脸
 
 				params['member_id'] = app.globalData.member.id; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
-		 	params['operatorName'] = app.globalData.member.name;
+				params['operatorName'] = app.globalData.member.name;
 				params['create_type'] = '0';
 				params['name'] = that.name;
 				console.log(params)

+ 14 - 16
pages/myFamily/myFamily.vue

@@ -28,7 +28,7 @@
 			</swiper>
 		</view>
 		
-		<u-picker mode="selector" v-model="roomShow"   :range="roomList" range-key="fullRoomName" @confirm="roomChange"></u-picker>
+		<u-picker mode="selector" v-model="roomShow" :default-selector="defaultSelector"  :range="roomList" range-key="fullRoomName" @confirm="roomChange"></u-picker>
 	</view>
 </template>
 <script>
@@ -39,6 +39,7 @@
 		},
 		data() {
 			return {
+				defaultSelector:[0],
 				roomShow:false,
 				roomList:[],
 				
@@ -73,38 +74,35 @@
 		},
 		methods:{
 			getRoomByMemberId(){
+				let memberId=getApp().globalData.member.id
 				let that=this
 				let params={
 					residentialId:uni.getStorageSync('residentialId'),
-					id:getApp().globalData.member.id
+					id:memberId
 				}
-				// let operation = 'estate/getRoomByMemberId';
 				that.$http.getRoomByMemberId(params).then(res =>{
 					if (res.data.success) {
 						that.roomList=res.data.data
+						let own_room_list=[]
 						this.roomList.forEach(item=>{
 							item.fullRoomName=item.residentialName+"-"+item.buildingName+"-"+item.unitName+"-"+item.name
 						})
+						//选中的房间
 						this.roomName=this.roomList[0].name
 						this.roomId=that.roomList[0].id
-						// that.realRoomList.forEach(item=>{
-						// 	item.fullRoomName=item.buildingName+"-"+item.unitName+"-"+item.name
-						// 	own_room_list.push(item)
-						// })
-						// getApp().globalData.own_room_list = own_room_list;
-						// that.$u.vuex('vuex_own_room_list',own_room_list)
-						
-						// that.roomName=that.roomList[0].name
-						// that.roomId=that.roomList[0].id
-						// that.$u.vuex('vuex_relationshipType', that.roomList[0].relationshipType)
+						let room= this.vuex_own_room_list.find(item=>item.roomId==this.roomId)
+						this.$u.vuex('vuex_relationshipType',room.type)
 					}
 					
 				})
 			},
 			roomChange(e){
-				this.roomName=this.realRoomList[e[0]].name
-				this.roomId=this.realRoomList[e[0]].id
-				// this.$u.vuex('vuex_relationshipType', this.roomList[e[0]].relationshipType)
+				this.defaultSelector=[e[0]]
+				let room=this.roomList[e[0]]
+				this.roomName=room.name
+				this.roomId=room.id
+				let obj= this.vuex_own_room_list.find(line=>line.roomId==this.roomId)
+				this.$u.vuex('vuex_relationshipType',obj.type)
 				this.refreshMescroll()
 			},
 			/**

+ 1 - 1
pages/myhome/familyList.vue

@@ -2,7 +2,7 @@
 	<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 		<view class="card" v-for="(item,index) in user_list" :key="index">
 			<view class="alignCenter">
-				<image :src="item.imageUri?item.imageUri:'https://szsq.nxzhsq.cn/community/miniofile/image/head.png'" mode="scaleToFill"></image>
+				<image :src="item.faceUrl?item.faceUrl:'https://szsq.nxzhsq.cn/community/miniofile/image/head.png'" mode="scaleToFill"></image>
 			</view>
 			<view class="content">
 				<view class="flex">

+ 1 - 0
store/index.js

@@ -34,6 +34,7 @@ const store = new Vuex.Store({
 		// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
 		
 		//自己与房屋的关系 在 pages/myFamily/myFamily中定义
+		//0-业主;1-成员;2-租户
 		vuex_relationshipType: lifeData.vuex_relationshipType ? lifeData.vuex_relationshipType : -1,
 		//用户信息
 		vuex_member: lifeData.vuex_member ? lifeData.vuex_member : null,