huangmp 4 tahun lalu
induk
melakukan
50cce2b3ce

+ 14 - 3
assets/http/api.js

@@ -27,6 +27,9 @@ const getAuthDeviceByMemberId = p => http.post("/community-app-service/app/membe
 //远程开门
 const openDoor = p => http.post("/community-app-service/app/member/openDoor", p)
 
+const getResidentialListByMember = p => http.post('/community-app-service/app/residential/getResidentialListByMember', p)
+
+
 
 const feedback = p => http.post("/community-app-service/app/feedback/submit", p)
 
@@ -57,8 +60,10 @@ const getSmsCode = p => http.post('/community-app-service/app/member/getSmsCode'
 const memberRegister = p => http.post('/community-app-service/app/member/memberRegister', p)
 //会员注册用户/添加家人
 const authentication = p => http.post('/community-app-service/app/member/authentication', p)
-//编辑家
+//编辑家
 const editFamily = p => http.post('/community-app-service/app/houseuser/editUser', p)
+//编辑家人
+const bindRoom = (p,q) => http.post('/community-app-service/app/houseuser/bindRoom?memberId='+p, q)
 
 //删除家人
 const deleteUserById = p => http.post('/community-app-service/app/houseuser/deleteUserById', p)
@@ -68,6 +73,8 @@ const getFamilyByRoomIds = p => http.post('/community-app-service/app/houseuser/
 
 //getHouseUser列表
 const getHouseUser = p => http.post('/community-app-service/app/houseuser/getHouseUserListByMemberAndResidential', p)
+//getHouseUser列表
+const getHouseUserCondition = p => http.get('/community-app-service/app/houseuser/list', {params:p})
 //banner列表
 const adList = p => http.post('/community-app-service/app/adPushApp/getList', p)
 
@@ -85,7 +92,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/getAllUserByMemberId', p)
+const getAllUserByMemberId = p => http.post('/community-app-service/app/houseuser/getRoomUserByMemberId', p)
 //获取住户审核记录
 const getAllApplyUserByMemberId = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByMemberId', p)
 //通过房间获取住户审核记录
@@ -146,6 +153,8 @@ export const api = {
 	authentication,
 	//编辑家人
 	editFamily,
+	//绑定房间
+	bindRoom,
 	//删除家人
 	deleteUserById,
 	//通过房间id获取房屋成员
@@ -199,5 +208,7 @@ export const api = {
 	//获取我家的设备
 	iotDeviceList,
 	getHouseUser,
-	feedback
+	getHouseUserCondition,
+	feedback,
+	getResidentialListByMember
 }

+ 1 - 1
pages.json

@@ -610,7 +610,7 @@
             
         }
         ,{
-            "path" : "pages/bingRoom/bingRoom",
+            "path" : "pages/bindRoom/bindRoom",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "绑定房间",

+ 5 - 1
pages/auth/auth.vue

@@ -121,6 +121,7 @@
 			this.unit_id=app.globalData.unitId || ''
 		},
 		onLoad(options){
+			console.log(options);
 			if(!this.$isEmpty(options)){
 				//页面数据
 				this.city_county_name=app.globalData.city+app.globalData.county
@@ -261,8 +262,11 @@
 					})
 					return
 				}
+				let params=this.$u.deepClone(this.data)
+				params.residentialId=this.residential_id
+				params.unitId=this.unit_id
 				uni.navigateTo({
-					url:"../choosePlot/householdCert/householdCert"+this.$u.queryParams(this.data)
+					url:"../choosePlot/householdCert/householdCert"+this.$u.queryParams(params)
 				})
 			}
 		}

+ 119 - 0
pages/bindRoom/bindRoom.vue

@@ -0,0 +1,119 @@
+<!-- 地址列表 -->
+<template>
+	<view class="address-wrap">
+		<view class="" v-if="$isNotEmpty(houseList)">
+			<u-checkbox-group :wrap="true" v-for="(item,index) in houseList" :key="index">
+				<view class="card_list" @click="checked(item)">
+					<view class="card_list_left">
+						<u-icon name="home"></u-icon>
+						<text class="padding-left-10">{{item.residentialName}} | {{item.buildingName}} | {{item.unitName}} | {{item.roomName}}</text>
+					</view>
+					<view class="card_list_right">
+						<u-checkbox style="float: right;" v-model="item.checked" :name="item.id"></u-checkbox>
+					</view>
+				</view>
+			</u-checkbox-group>
+		</view>
+		<u-empty v-else src="/static/common/empty.png" marginTop="300"></u-empty>
+		<view class="foot_box-wrap safe-area-inset-bottom">
+			<view class="foot_box u-flex u-row-between safe-area-inset-bottom" style="box-sizing: border-box;">
+				<button @click="auth" class="sync-wxaddress u-m-20 u-flex u-row-center u-col-center">
+					绑定新房间
+				</button>
+				<button class="u-m-20 add-btn" @click="confirm">确定绑定</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {
+				houseList: []
+			};
+		},
+		computed: {},
+		onLoad() {
+			this.initData()
+		},
+		methods: {
+			initData() {
+				this.houseList = uni.getStorageSync("houseList") || []
+				this.houseList.forEach(item => {
+					item.checked = false
+				})
+			},
+			checked(item) {
+				item.checked = !item.checked
+				this.$forceUpdate()
+			},
+			confirm() {
+				let memberId = getApp().globalData.member.id
+				let checkedList = this.houseList.filter(item => item.checked)
+				if (this.$isEmpty(checkedList)) {
+					this.$u.toast('至少选择一个房间')
+					return
+				}
+				let ids = checkedList.map(item => item.id)
+				this.$http.bindRoom(memberId, ids).then(res => {
+					if (res.data.success) {
+						uni.removeStorageSync("houseList")
+						this.$dialog.showModal('绑定成功',false).then(()=>{
+							uni.reLaunch({
+								url:"../index/index"
+							})
+						})
+					}
+				})
+			},
+			auth() {
+				uni.redirectTo({
+					url: "../auth/auth"
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.card_list {
+		background-color: #FFFFFF;
+		padding: 30rpx 0rpx 30rpx 30rpx;
+		display: flex;
+		justify-content: space-between;
+		margin: 10rpx 0;
+
+		&_left {}
+	}
+
+	// 底部按钮
+	.foot_box-wrap {
+		height: 140rpx;
+		width: 100%;
+	}
+
+	.foot_box {
+		padding: 10rpx 20rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		// border-top: 1rpx solid rgba(#ccc, 0.2);
+		// background-color: #fff;
+
+		.sync-wxaddress {
+			flex: 1;
+			line-height: 80rpx;
+			background: #ff9900;
+		}
+
+		.add-btn {
+			line-height: 80rpx;
+			flex: 1;
+			background: $base;
+			color: rgba(255, 255, 255, 1);
+		}
+	}
+</style>

+ 0 - 22
pages/bingRoom/bingRoom.vue

@@ -1,22 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style>
-
-</style>

+ 1 - 1
pages/choosePlot/chooseRoom/chooseRoom.vue

@@ -78,7 +78,7 @@ export default {
 		let params={
 			residential_name:this.residential_name,
 			building_name:this.building_name,
-			building_id:this.building_id,
+			building_id:item.buildingId,
 			unit_name:this.unit_name,
 			room_name:item.name,
 			room_id:item.id

+ 651 - 641
pages/choosePlot/householdCert/householdCert.vue

@@ -1,672 +1,682 @@
 <template>
 	<view class="bg-white" style="min-height: 100vh;">
-		<view class="" >
+		<view class="">
 			<view class="flex justify-between " style="padding: 30rpx;box-sizing: border-box;">
-					<view class="" style="font-size: 38rpx;">
-						<text class="text-bold text-black">您的申请信息</text>
+				<view class="" style="font-size: 38rpx;">
+					<text class="text-bold text-black">您的申请信息</text>
+				</view>
+				<view class="text-red" style="padding-top: 12rpx;">
+					<text style="font-size: 38rpx;">{{totalStep}}</text>
+					<text class="text-df">/{{totalStep}}</text>
+				</view>
+			</view>
+			<view class="">
+				<view style="padding: 50rpx 0 20rpx 48rpx;">
+					<text class="cuIcon-locationfill text-blue padding-right-sm"></text>
+					<text
+						class="local_city_info">{{residential_name}},{{building_name}},{{unit_name}},{{room_name}}</text>
+				</view>
+			</view>
+			<view class="form">
+				<u-form :border="true" ref="uForm">
+					<u-form-item :required="true" label="住户姓名:" prop="name" label-width="150">
+						<u-input :border="true" placeholder="住户姓名,必填" v-model="name" type="text"></u-input>
+					</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>
+					</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>
+					</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>
+					</u-form-item>
+					<u-form-item :required="type==0?true:false" label="证件号码" prop="id_card" label-width="150">
+						<u-input :border="true" placeholder="请输入证件号码" type="text" :trim="true" maxlength="18"
+							v-model="id_card"></u-input>
+					</u-form-item>
+					<view class="flex justify-end">
+						<text class="text-sm text-orange">*住户类型不是业主时,不需要等待管理员审核</text>
 					</view>
-					<view class="text-red"  style="padding-top: 12rpx;">
-						<text style="font-size: 38rpx;">{{totalStep}}</text>
-						<text class="text-df">/{{totalStep}}</text>
+					<u-form-item :required="true" label="性别" prop="sex" label-width="150">
+						<u-radio-group v-model="sex">
+							<u-radio shape="circle" name="1">男</u-radio>
+							<u-radio shape="circle" name="2">女</u-radio>
+						</u-radio-group>
+					</u-form-item>
+				</u-form>
+			</view>
+			<view v-if="nationality==3" style="background-color: #FFFFFF;">
+				<view class="form_group mb0" style="padding-left: 60rpx;">
+					<view>
+						<text class="sex">护照图片:</text>
+						<text class="tips">(基本身份信息页)</text>
 					</view>
 				</view>
-				<view class="">
-					<view style="padding: 50rpx 0 20rpx 48rpx;">
-						<text class="cuIcon-locationfill text-blue padding-right-sm"></text>
-						<text class="local_city_info">{{residential_name}},{{building_name}},{{unit_name}},{{room_name}}</text>
+				<view @click="show=true;operaType=1"
+					style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+					<upload-img :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
+						:height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight"
+						:currentImage="show_passport_img_uri" :bgsrc="bgsrc">
+					</upload-img>
+					<view class="" style="color: #59a5f0;">
+						<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						<text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
+						<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
 					</view>
 				</view>
-				<view class="form">
-						<u-form :border="true" ref="uForm" >
-							<u-form-item :required="true"  label="住户姓名:" prop="name" label-width="150">
-								<u-input :border="true"  placeholder="住户姓名,必填" v-model="name" type="text"></u-input>
-							</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>
-							</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>
-							</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>
-							</u-form-item>
-							<u-form-item :required="type==0?true:false"  label="证件号码" prop="id_card" label-width="150">
-								<u-input :border="true" placeholder="住户类型是业主时,必填" type="text" :trim="true"  maxlength="18" v-model="id_card"></u-input>
-							</u-form-item>
-							<u-form-item :required="true" label="性别" prop="sex" label-width="150">
-								<u-radio-group v-model="sex" >
-									<u-radio shape="circle"  name="1">男</u-radio>
-									<u-radio shape="circle"  name="2">女</u-radio>
-								</u-radio-group>
-							</u-form-item>
-						</u-form>
+			</view>
+
+			<view v-if="nationality==3" style="background-color: #FFFFFF;">
+				<view class="form_group mb0" style="padding-left: 60rpx;">
+					<view>
+						<text class="sex">入境证明:</text>
+						<text class="tips">(入镜盖章页)</text>
+					</view>
+				</view>
+				<view @click="show=true;operaType=2"
+					style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+					<upload-img :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
+						:height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight" :currentImage="show_entry_img_uri"
+						:bgsrc="bgsrc">
+					</upload-img>
+					<view class="" style="color: #59a5f0;">
+						<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						<text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
+						<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+					</view>
 				</view>
-				<view v-if="nationality==3" style="background-color: #FFFFFF;">
-				  <view class="form_group mb0" style="padding-left: 60rpx;">
-				    <view>
-				      <text class="sex">护照图片:</text>
-				      <text class="tips">(基本身份信息页)</text>
-				    </view>
-				  </view>
-				  <view @click="show=true;operaType=1" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-				    <upload-img
-				  	  :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
-				  	  :height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight"
-				  	  :currentImage="show_passport_img_uri"
-				  	  :bgsrc="bgsrc"
-				  	  >
-				    </upload-img>
-				    <view class="" style="color: #59a5f0;">
-				  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-				  	 <text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
-				  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-				    </view>
-				  </view>
+			</view>
+			<!-- 人脸 begin ,微信小程序审核时,隐藏该模块 -->
+			<view style="background-color: #FFFFFF;" v-if="vuex_appletType==1">
+				<view class="form_group mb0" style="padding-left: 60rpx;">
+					<view>
+						<text class="sex">人脸:</text>
+						<text class="tips">(人脸用于开门,请上传正脸图片)</text>
+					</view>
 				</view>
-				
-				<view v-if="nationality==3" style="background-color: #FFFFFF;">
-				  <view class="form_group mb0" style="padding-left: 60rpx;">
-				    <view>
-				      <text class="sex">入境证明:</text>
-				      <text class="tips">(入镜盖章页)</text>
-				    </view>
-				  </view>
-				  <view  @click="show=true;operaType=2" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-				    <upload-img
-				  	  :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
-				  	  :height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight"
-				  	  :currentImage="show_entry_img_uri"
-				  	  :bgsrc="bgsrc"
-				  	  >
-				    </upload-img>
-				    <view class="" style="color: #59a5f0;">
-				  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-				  	 <text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
-				  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-				    </view>
-				  </view>
+				<view @click="show=true;operaType=3"
+					style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+					<upload-img :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
+						:height="$isEmpty(show_image_uri)?bgHeight:imgHeight" :currentImage="show_image_uri"
+						:bgsrc="bgsrc">
+					</upload-img>
+					<view class="" style="color: #59a5f0;">
+						<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						<text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
+						<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+					</view>
 				</view>
-				<!-- 人脸 begin ,微信小程序审核时,隐藏该模块 -->
-				<view style="background-color: #FFFFFF;" v-if="vuex_appletType==1">
-							<view class="form_group mb0" style="padding-left: 60rpx;">
-								 <view>
-									<text class="sex">人脸:</text>
-									<text class="tips">(人脸用于开门,请上传正脸图片)</text>
-								  </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="icon_wrap">
+								<image :src="item.iconUrl" class="index_icon"></image>
 							</view>
-							<view @click="show=true;operaType=3" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-							  <upload-img
-								  :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
-								  :height="$isEmpty(show_image_uri)?bgHeight:imgHeight"
-								  :currentImage="show_image_uri"
-								  :bgsrc="bgsrc"
-								  >
-							  </upload-img>
-							  <view class="" style="color: #59a5f0;">
-								 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-								 <text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
-								 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-							  </view>
-							</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="icon_wrap">
-									  <image :src="item.iconUrl" class="index_icon"></image>
-									</view>
-									<view class="category_item_text">
-									  <text>{{item.iconText}}</text>
-									</view>
-								  </view>
+							<view class="category_item_text">
+								<text>{{item.iconText}}</text>
 							</view>
+						</view>
 					</view>
 				</view>
-				<!-- 人脸 end -->
-				
-			  <u-action-sheet @click="photoChecked"  z-index="999999" :list="list" v-model="show"></u-action-sheet>
-			  <u-select z-index="999999" mode="single-column" :list="typeArry" v-model="typeShow" @confirm="typeConfirm"></u-select>
-			  <u-select z-index="999999" mode="single-column" :list="nationalityArry" v-model="nationalityShow" @confirm="nationalityConfirm"></u-select>
-			  <view  @click="showDialogBtn"  class=" footer-fixed " >
-			  	<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-			  		提交认证
-			  	</view>
-			  </view>
+			</view>
+			<!-- 人脸 end -->
+
+			<u-action-sheet @click="photoChecked" z-index="999999" :list="list" v-model="show"></u-action-sheet>
+			<u-select z-index="999999" mode="single-column" :list="typeArry" v-model="typeShow" @confirm="typeConfirm">
+			</u-select>
+			<u-select z-index="999999" mode="single-column" :list="nationalityArry" v-model="nationalityShow"
+				@confirm="nationalityConfirm"></u-select>
+			<view @click="showDialogBtn" class=" footer-fixed ">
+				<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+					提交认证
+				</view>
+			</view>
 		</view>
- </view>
+	</view>
 </template>
 
 <script>
-import uploadImg from '@/comps/uploadimg/uploadImg.vue'
-//获取app实例
-var app = getApp();
-export default {
-	components:{
-		uploadImg
-	},
-	data() {
-		return {
-			//小程序审核状态
-			appletType:0,
-			
-			//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
-			operaType:3,
-			//人脸上传模态框,上传照片或拍照
-			list: [{
-				text: '相册上传',
-			}, {
-				text: '拍照上传'
-			}],
-			show: false,
-			
-			//背景图
-			bgsrc:'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
-			bgWidth:350,
-			bgHeight:320,
-			//显示图
-			imgWidth:540,
-			imgHeight:400,
-			
-			//总步骤数
-			totalStep:2,
-			sex: "1",
-			//住户类型
-			typeLabel:'业主',
-			typeShow: false,
-			type: 0,
-			typeArry: [
-				{
-					value: '0',
-					label: '业主'
-				},
-				{
-					value: '1',
-					label: '家属'
-				},
-				{
-					value: '2',
-					label: '租户'
-				}
-			],
-			
-			//国籍
-			nationalityLabel:'中国大陆',
-			nationalityShow: false,
-			nationality: 0,
-			nationalityName:'身份证',
-			nationalityArry: [
-				{
-					value: '0',
-					label: '中国大陆'
-				},
-				{
-					value: '1',
-					label: '中国香港/澳门'
-				},
-				{
-					value: '2',
-					label: '中国台湾'
-				},
-				{
-					value: '3',
-					label: '海外'
-				}
-			],
-			
-			//住户名字
-			name: '',
-			residential_name: "",
-			//小区名字
-			community_name: '',
-			//楼栋名字
-			building_name:'',
-			//单元名字
-			unit_name: '',
-			//房间名字
-			room_name: '',
-			//房间id
-			room_id: '',
-			
-			//护照照片
-			passport_img_uri: null,
-			//护照照片回显
-			show_passport_img_uri: null,
-			//入境证明
-			entry_img_uri: null,
-			//入境证明回显
-			show_entry_img_uri: null,
-			//人脸图片地址
-			image_uri: null,
-			//人脸回显
-			show_image_uri: null,
-			//图片的md5
-			face_code: null,
-			
-			//身份证
-			id_card: null,
-			iconArray: [{
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
-			  "iconText": '不要遮挡',
-			  "index": 1
-			}, {
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
-			  "iconText": '不戴墨镜',
-			  "index": 2
-			}, {
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
-			  "iconText": '不能仰头俯拍',
-			  "index": 3
-			}, {
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
-			  "iconText": '光线充足',
-			  "index": 4
-			}, {
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
-			  "iconText": '浅色背景',
-			  "index": 5
-			}, {
-			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
-			  "iconText": '物业审核生效',
-			  "index": 6
-			}],
-			
-		};
-	},
-	onLoad: function (options) {
-		  //显示用户选择的小区+楼栋+房间名字
-		  this.residential_name = options.residential_name;
-		  this.building_name=options.building_name
-		  this.unit_name = options.unit_name;
-		  this.room_name = options.room_name;
-		  this.room_id = options.room_id;
-		  this.name=app.globalData.member.name
-	},
-	onShow() {
-		this.getAppletType()
-		//总步骤数
-		//注册的流程总步骤数是3,其他流程总步骤数是2
-		if(this.$isEmpty(app.globalData.totalStep)){
-			this.totalStep=2
-		}else{
-			this.totalStep=app.globalData.totalStep
-		}
-		
-		//获取当前页面的对象,获取拍照回显照片
-		let currPage=this.$util.getPageCtx()
-		if(!this.$isEmpty(currPage.data.image)){
-			this.uploadImage(currPage.data.image)
-		} 
-		
-		
-	},
-	computed: {
-		
-	},
-	methods: {
-		getAppletType: function () {
-		  var that = this;
-		    uni.login({
-		      success: res => {
-		        let params = {};
-		        params['js_code'] = res.code;
-				params['name'] = 'community';
-				params["app_type"] = 1;
-		        // let operation = 'miniprogram/getOpenid'; //发起请求
-		        this.$http.getOpenid(params).then (res=>{
-					 //获取成功
-		          if (res.data.result_code == 1) {
-					uni.setStorageSync("appletType", res.data.appletType);
-					that.$u.vuex('vuex_appletType',res.data.appletType)
-		          } 
-				}) ;
-		      }
-		    });
+	import uploadImg from '@/comps/uploadimg/uploadImg.vue'
+	//获取app实例
+	var app = getApp();
+	export default {
+		components: {
+			uploadImg
 		},
-		//点击模态框选项触发
-		photoChecked(index){
-			if (index==0) {
-				//图片上传
-				this.chooseImage()
-			} else if(index==1){
-				if(this.operaType==3){
-					//拍照上传,拍照人脸
-					uni.navigateTo({
-						url:"../../my-camera/my-camera?type=0"
-					})
-				}else{
-					//拍照上传,拍照证件
-					uni.navigateTo({
-						url:"../../my-camera/my-camera?type=1"
-					})
-				}
-			}
+		data() {
+			return {
+				//小程序审核状态
+				appletType: 0,
+
+				//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
+				operaType: 3,
+				//人脸上传模态框,上传照片或拍照
+				list: [{
+					text: '相册上传',
+				}, {
+					text: '拍照上传'
+				}],
+				show: false,
+
+				//背景图
+				bgsrc: 'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
+				bgWidth: 350,
+				bgHeight: 320,
+				//显示图
+				imgWidth: 540,
+				imgHeight: 400,
+
+				//总步骤数
+				totalStep: 2,
+				sex: "1",
+				//住户类型
+				typeLabel: '业主',
+				typeShow: false,
+				type: 0,
+				typeArry: [{
+						value: '0',
+						label: '业主'
+					},
+					{
+						value: '1',
+						label: '家属'
+					},
+					{
+						value: '2',
+						label: '租户'
+					}
+				],
+
+				//国籍
+				nationalityLabel: '中国大陆',
+				nationalityShow: false,
+				nationality: 0,
+				nationalityName: '身份证',
+				nationalityArry: [{
+						value: '0',
+						label: '中国大陆'
+					},
+					{
+						value: '1',
+						label: '中国香港/澳门'
+					},
+					{
+						value: '2',
+						label: '中国台湾'
+					},
+					{
+						value: '3',
+						label: '海外'
+					}
+				],
+
+				//住户名字
+				name: '',
+				residentialId: '',
+				residential_name: "",
+				//小区名字
+				community_name: '',
+				//楼栋名字
+				buildingId:'',
+				building_name: '',
+				//单元名字
+				unitId:'',
+				unit_name: '',
+				//房间名字
+				room_name: '',
+				//房间id
+				room_id: '',
+
+				//护照照片
+				passport_img_uri: null,
+				//护照照片回显
+				show_passport_img_uri: null,
+				//入境证明
+				entry_img_uri: null,
+				//入境证明回显
+				show_entry_img_uri: null,
+				//人脸图片地址
+				image_uri: null,
+				//人脸回显
+				show_image_uri: null,
+				//图片的md5
+				face_code: null,
+
+				//身份证
+				id_card: null,
+				iconArray: [{
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
+					"iconText": '不要遮挡',
+					"index": 1
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
+					"iconText": '不戴墨镜',
+					"index": 2
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
+					"iconText": '不能仰头俯拍',
+					"index": 3
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
+					"iconText": '光线充足',
+					"index": 4
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
+					"iconText": '浅色背景',
+					"index": 5
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
+					"iconText": '物业审核生效',
+					"index": 6
+				}],
+
+			};
 		},
-		
-		
-		typeConfirm(e) {
-			this.type = 0;
-			e.map((val, index) => {
-				this.type=val.value
-				this.typeLabel=val.label
-			})
+		onLoad: function(options) {
+			console.log(options,"options");
+			//显示用户选择的小区+楼栋+房间名字
+			this.residentialId = options.residentialId
+			this.residential_name = options.residential_name;
+			this.buildingId=options.building_id
+			this.building_name = options.building_name
+			this.unitId=options.unitId
+			this.unit_name = options.unit_name;
+			this.room_name = options.room_name;
+			this.room_id = options.room_id;
+			this.name = app.globalData.member.name
 		},
-		nationalityConfirm(e) {
-			this.nationality = 0;
-			e.map((val, index) => {
-				this.nationality=val.value
-				this.nationalityLabel=val.label
-				
-				if (this.nationality == 0) {
-				  this.nationalityName = '身份证';
-				} else if (this.nationality == 1) {
-				  this.nationalityName = '港澳居民往来内地通行证';
-				} else if (this.nationality == 2) {
-				  this.nationalityName = '台湾居民往来大陆通行证';
-				} else if (this.nationality == 3) {
-				  this.nationalityName = '护照';
-				}
-			})
+		onShow() {
+			this.getAppletType()
+			//总步骤数
+			//注册的流程总步骤数是3,其他流程总步骤数是2
+			if (this.$isEmpty(app.globalData.totalStep)) {
+				this.totalStep = 2
+			} else {
+				this.totalStep = app.globalData.totalStep
+			}
+
+			//获取当前页面的对象,获取拍照回显照片
+			let currPage = this.$util.getPageCtx()
+			if (!this.$isEmpty(currPage.data.image)) {
+				this.uploadImage(currPage.data.image)
+			}
+
+
 		},
-		//点击上传图片事件
-		chooseImage: function () {
-		  var that = this;
-		  uni.chooseImage({
-		    count: 1,
-		    //最多可以选择的图片张数,默认9
-		    sourceType: ['album', 'camera'],
-		    sizeType: ['compressed'],
-		    //可选择原图或压缩后的图片
-		    success: res => {
-		      let tempFilePaths = res.tempFilePaths;
-			  that.uploadImage(tempFilePaths[0])
-		    }
-		  });
+		computed: {
+
 		},
-		/**上传图片
-		 * @param {Object} imgUrl 图片url
-		 */
-		uploadImage(imgUrl){
-			let that = this
-		   this.$http.uploadFile(imgUrl).then(res=>{
-		    if (that.operaType == 1) {
-		      that.setData({
-		        passport_img_uri: res.data,
-		        show_passport_img_uri: imgUrl
-		      });
-		    } else if (that.operaType == 2) {
-		      that.setData({
-		        entry_img_uri: res.data,
-		        show_entry_img_uri: imgUrl
-		      });
-		    } else if (that.operaType == 3) {
-		      that.setData({
-		        image_uri: res.data,
-		        show_image_uri: imgUrl,
-		      });
-		    }
-		   })
-		  },
-		//提交认证
-		showDialogBtn: function () {
-		  let params = {};
-		  let that = this;
-		
-		  if (that.name == "") {
-		    app.globalData.autoFailHint("请填写住户姓名");
-		    return;
-		  } 
-		  //用户类型
-		  let type = that.type; //['业主','家属','租户'],
-		  params['type'] = type; //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
-		  //国籍
-		  let nationality = that.nationality;
-		  params['nationality'] = nationality;
-		  //身份证
-		  var id_card = this.id_card;
-		  params['id_card'] = id_card; //业主身份证必填
-		
-		  if (type == 0 && !id_card) {
-		    app.globalData.autoFailHint("住户类型是业主时,证件号码必填");
-		    return;
-		  }
-		  
-		  if (!this.$isEmpty(id_card)) {
-		    //如果身份证号不为空,就校验身份证号
-			if (!this.$u.test.idCard(id_card)) {
-				app.globalData.autoFailHint("请输入正确的身份证号");
-				return;
-			}
-		  }
-		
-		  let passport_img_uri = that.passport_img_uri;
-		  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;
-		
-		    if (type == 0) {
-		      if (!passport_img_uri) {
-		        app.globalData.autoFailHint("请上传护照图片");
-		        return;
-		      }
-		      if (!entry_img_uri) {
-		        app.globalData.autoFailHint("请上传入境证明");
-		        return;
-		      }
-		    }
-		  }
-		  console.log(that.image_uri);
-		  let image_uri = that.image_uri;
-		  if (this.$isEmpty(image_uri)&&this.vuex_appletType==1) {
-		  	//微信小程序通过审核时,开放人脸模块
-			this.$u.toast('请上传人脸')
-			return
-		  }
-		  params['image_uri'] = that.image_uri.data.name;
-		  let face_code = that.face_code;
-		  params['face_code'] = that.face_code; //性别
-		  params['sex'] = that.sex;
-		  params['name'] = that.name;
-		  params['tel'] = app.globalData.member.tel;
-		  params['room_id'] = that.room_id; 
-		  params['create_type'] = '0'; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
-		  params['record_type'] = '0'; //申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
-		  params['member_id'] = app.globalData.member.id;//会员id
-	
-			that.$http.authentication(params).then (res=>{
-				//提交成功
-				if (res.data.result_code == 1) {
-				  app.globalData.oneFailHint(res.data.result_msg, function () {
-				    //跳转到首页
-				    uni.reLaunch({
-				      url: '/pages/index/index?isFlush=true'
-				    });
-				  });
-				} else {
-				  app.globalData.oneFailHint(res.data.result_msg);
+		methods: {
+			getAppletType: function() {
+				var that = this;
+				uni.login({
+					success: res => {
+						let params = {};
+						params['js_code'] = res.code;
+						params['name'] = 'community';
+						params["app_type"] = 1;
+						// let operation = 'miniprogram/getOpenid'; //发起请求
+						this.$http.getOpenid(params).then(res => {
+							//获取成功
+							if (res.data.result_code == 1) {
+								uni.setStorageSync("appletType", res.data.appletType);
+								that.$u.vuex('vuex_appletType', res.data.appletType)
+							}
+						});
+					}
+				});
+			},
+			//点击模态框选项触发
+			photoChecked(index) {
+				if (index == 0) {
+					//图片上传
+					this.chooseImage()
+				} else if (index == 1) {
+					if (this.operaType == 3) {
+						//拍照上传,拍照人脸
+						uni.navigateTo({
+							url: "../../my-camera/my-camera?type=0"
+						})
+					} else {
+						//拍照上传,拍照证件
+						uni.navigateTo({
+							url: "../../my-camera/my-camera?type=1"
+						})
+					}
+				}
+			},
+
+
+			typeConfirm(e) {
+				this.type = 0;
+				e.map((val, index) => {
+					this.type = val.value
+					this.typeLabel = val.label
+				})
+			},
+			nationalityConfirm(e) {
+				this.nationality = 0;
+				e.map((val, index) => {
+					this.nationality = val.value
+					this.nationalityLabel = val.label
+
+					if (this.nationality == 0) {
+						this.nationalityName = '身份证';
+					} else if (this.nationality == 1) {
+						this.nationalityName = '港澳居民往来内地通行证';
+					} else if (this.nationality == 2) {
+						this.nationalityName = '台湾居民往来大陆通行证';
+					} else if (this.nationality == 3) {
+						this.nationalityName = '护照';
+					}
+				})
+			},
+			//点击上传图片事件
+			chooseImage: function() {
+				var that = this;
+				uni.chooseImage({
+					count: 1,
+					//最多可以选择的图片张数,默认9
+					sourceType: ['album', 'camera'],
+					sizeType: ['compressed'],
+					//可选择原图或压缩后的图片
+					success: res => {
+						let tempFilePaths = res.tempFilePaths;
+						that.uploadImage(tempFilePaths[0])
+					}
+				});
+			},
+			/**上传图片
+			 * @param {Object} imgUrl 图片url
+			 */
+			uploadImage(imgUrl) {
+				let that = this
+				this.$http.uploadFile(imgUrl).then(res => {
+					if (that.operaType == 1) {
+						that.setData({
+							passport_img_uri: res.data,
+							show_passport_img_uri: imgUrl
+						});
+					} else if (that.operaType == 2) {
+						that.setData({
+							entry_img_uri: res.data,
+							show_entry_img_uri: imgUrl
+						});
+					} else if (that.operaType == 3) {
+						that.setData({
+							image_uri: res.data,
+							show_image_uri: imgUrl,
+						});
+					}
+				})
+			},
+			//提交认证
+			showDialogBtn: function() {
+				let params = {};
+				let that = this;
+
+				if (that.name == "") {
+					app.globalData.autoFailHint("请填写住户姓名");
+					return;
+				}
+				//用户类型
+				let type = that.type; //['业主','家属','租户'],
+				params['type'] = type; //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
+				//国籍
+				let nationality = that.nationality;
+				params['nationality'] = nationality;
+				//身份证
+				var id_card = this.id_card;
+				params['idCard'] = id_card; //业主身份证必填
+
+				if (type == 0 && !id_card) {
+					app.globalData.autoFailHint("住户类型是业主时,证件号码必填");
+					return;
 				}
-		  
-		  });
+
+				if (!this.$isEmpty(id_card)) {
+					//如果身份证号不为空,就校验身份证号
+					if (!this.$u.test.idCard(id_card)) {
+						app.globalData.autoFailHint("请输入正确的身份证号");
+						return;
+					}
+				}
+
+				let passport_img_uri = that.passport_img_uri;
+				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;
+
+					if (type == 0) {
+						if (!passport_img_uri) {
+							app.globalData.autoFailHint("请上传护照图片");
+							return;
+						}
+						if (!entry_img_uri) {
+							app.globalData.autoFailHint("请上传入境证明");
+							return;
+						}
+					}
+				}
+				let image_uri = that.image_uri;
+				if (this.$isEmpty(image_uri) && this.vuex_appletType == 1) {
+					//微信小程序通过审核时,开放人脸模块
+					this.$u.toast('请上传人脸')
+					return
+				}
+				params['unitId'] = this.unitId
+				params['buildingId'] = this.buildingId
+				params['residentialId'] = this.residentialId
+				params['faceUrl'] = that.image_uri.data.name;
+				params['sex'] = that.sex;
+				params['name'] = that.name;
+				params['phone'] = app.globalData.member.phone
+				params['roomId'] = that.room_id;
+				params['createType'] = '0'; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
+				params['recordType'] = '0'; //申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
+				params['memberId'] = app.globalData.member.id; //会员id
+				that.$http.authentication(params).then(res => {
+					//提交成功
+					if (res.data.success) {
+						app.globalData.oneFailHint("提交成功", function() {
+							//跳转到首页
+							uni.reLaunch({
+								url: '/pages/index/index?isFlush=true'
+							});
+						});
+					} else {
+						app.globalData.oneFailHint(res.data.result_msg);
+					}
+
+				});
+			}
+
 		}
-		
-	}
-};
+	};
 </script>
 
 <style scoped lang="scss">
-page{
-	background-color: #FFFFFF;
-}
-	
-.form {
-	padding:0 60rpx;
-	background-color: #FFFFFF;
-}
-
-.local_city{
-    padding: 30rpx 0;
-    position:relative;
-    background: #fff;
-}
-.local_city .changeCity{
-    padding: 20rpx;
-    position: absolute;
-    right: 0rpx;
-    top: 0;
-}
-.local_city .icon{
-    padding: 20rpx;
-    position: absolute;
-    left: -0;
-    top: 50%;
-    transform: translate(0,-50%);
-    font-size: 40rpx;
-}
-.local_city .local_city_info{
-    padding-left: 40rpx;
-    display:inline-block;
-}
-
-.form_group .upload {
-  padding: 0 28rpx;
-  font-size: 26rpx;
-  background: $base-btn-color;
-  color: #fff;
-  border: none;
-}
-
-.upload_tips {
-  font-size: 24rpx;
-}
-
-.upload_bg {
-  position: relative;
-  text-align: center;
-}
-
-.mb0 {
-  padding-top: 40rpx;
-  font-size: 28rpx;
-  margin-bottom: 0;
-}
-
-.form_group .tips {
-  margin-left: 50rpx;
-}
-
-.upload_bg .upload_bgImg {
-  width: 540rpx;
-  height: 400rpx;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 70%;
-  left: 50%;
-  transform: translate(-50%, 0);
-  color: $base-btn-color;
-}
-
-upload_bg {
-  position: relative;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 40%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 55%;
-  width: 100%;
-  color: $base-btn-color;
-}
-
-.img_content {
-  margin-top: 20rpx;
-  position: relative;
-  text-align: center;
-}
-
-.img_content .upload_bgImg {
-  width: 560rpx;
-  height: 420rpx;
-  max-height: 1;
-  display: inline-block;
-  border-radius: 20rpx;
-}
-
-.reUpload {
-  height: 60rpx;
-  line-height: 60rpx;
-  text-align: right;
-  color: #333;
-  padding-right: 100rpx;
-  font-size: 26rpx;
-}
-
-.img_content .img_icon {
-  width: 40rpx;
-  height: 40rpx;
-  vertical-align: text-top;
-  margin-right: 6rpx;
-  border-radius: 20rpx;
-}
-
-.category {
-  padding:20px 20rpx 0;
-  overflow: auto;
-  background-color: #FFF;
-text-align:center;
-
-}
-.category_item {
-  width: 33.3%;
-  float: left;
-  margin-bottom: 40rpx;
-}
-.icon_wrap {
-  width: 120rpx;
-  margin: 0 auto;
-  margin-bottom: 5px;
-}
-.index_icon {
-  width: 60rpx;
-  height: 60rpx;
-}
-.category_item_text {
-  text-align: center;
-  font-size: 24rpx;
-  color: #999;
-}
+	page {
+		background-color: #FFFFFF;
+	}
 
-</style>
+	.form {
+		padding: 0 60rpx;
+		background-color: #FFFFFF;
+	}
+
+	.local_city {
+		padding: 30rpx 0;
+		position: relative;
+		background: #fff;
+	}
+
+	.local_city .changeCity {
+		padding: 20rpx;
+		position: absolute;
+		right: 0rpx;
+		top: 0;
+	}
+
+	.local_city .icon {
+		padding: 20rpx;
+		position: absolute;
+		left: -0;
+		top: 50%;
+		transform: translate(0, -50%);
+		font-size: 40rpx;
+	}
+
+	.local_city .local_city_info {
+		padding-left: 40rpx;
+		display: inline-block;
+	}
+
+	.form_group .upload {
+		padding: 0 28rpx;
+		font-size: 26rpx;
+		background: $base-btn-color;
+		color: #fff;
+		border: none;
+	}
+
+	.upload_tips {
+		font-size: 24rpx;
+	}
+
+	.upload_bg {
+		position: relative;
+		text-align: center;
+	}
+
+	.mb0 {
+		padding-top: 40rpx;
+		font-size: 28rpx;
+		margin-bottom: 0;
+	}
+
+	.form_group .tips {
+		margin-left: 50rpx;
+	}
+
+	.upload_bg .upload_bgImg {
+		width: 540rpx;
+		height: 400rpx;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 70%;
+		left: 50%;
+		transform: translate(-50%, 0);
+		color: $base-btn-color;
+	}
 
-			
-		
+	upload_bg {
+		position: relative;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 40%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 55%;
+		width: 100%;
+		color: $base-btn-color;
+	}
+
+	.img_content {
+		margin-top: 20rpx;
+		position: relative;
+		text-align: center;
+	}
+
+	.img_content .upload_bgImg {
+		width: 560rpx;
+		height: 420rpx;
+		max-height: 1;
+		display: inline-block;
+		border-radius: 20rpx;
+	}
+
+	.reUpload {
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: right;
+		color: #333;
+		padding-right: 100rpx;
+		font-size: 26rpx;
+	}
+
+	.img_content .img_icon {
+		width: 40rpx;
+		height: 40rpx;
+		vertical-align: text-top;
+		margin-right: 6rpx;
+		border-radius: 20rpx;
+	}
+
+	.category {
+		padding: 20px 20rpx 0;
+		overflow: auto;
+		background-color: #FFF;
+		text-align: center;
+
+	}
+
+	.category_item {
+		width: 33.3%;
+		float: left;
+		margin-bottom: 40rpx;
+	}
+
+	.icon_wrap {
+		width: 120rpx;
+		margin: 0 auto;
+		margin-bottom: 5px;
+	}
+
+	.index_icon {
+		width: 60rpx;
+		height: 60rpx;
+	}
+
+	.category_item_text {
+		text-align: center;
+		font-size: 24rpx;
+		color: #999;
+	}
+</style>

+ 89 - 33
pages/demo/myfamily.vue

@@ -1,46 +1,102 @@
+<!-- 地址列表 -->
 <template>
-	<view class="flex bg-white flex-direction justify-center align-center">
-		<u-avatar  size="130" src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"></u-avatar>
-		<text  style="margin:30rpx 0 100rpx 0rpx;color: #333333;font-size: 26rpx;font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;">Hi~登陆玩转社区吧</text>
-		<view class="cu-btn round wx-btn ">
-			<view class="text-center"  style="position: relative;left: -100rpx;">
-				<text class="cuIcon-weixin icon"></text>
+	<view class="address-wrap">
+		<u-checkbox-group :wrap="true" v-for="(item,index) in houseList" :key="index">
+			<view class="card_list" @click="checked(item)">
+				<view class="card_list_left">
+					<u-icon name="home"></u-icon>
+					<text class="padding-left-10">{{item.name}}</text>
+				</view>
+				<view class="card_list_right">
+					<u-checkbox style="float: right;" v-model="item.checked" :name="item.id"></u-checkbox>
+				</view>
 			</view>
-			<view style="position: relative;left: -16rpx;">
-				<text class="text-center text-lg">微信快速登陆</text>
+		</u-checkbox-group>
+
+		<view class="foot_box-wrap safe-area-inset-bottom">
+			<view class="foot_box u-flex u-row-between safe-area-inset-bottom" style="box-sizing: border-box;">
+				<button class="sync-wxaddress u-m-20 u-flex u-row-center u-col-center">
+					重新录入
+				</button>
+				<button class="u-m-20 add-btn" @click="confirm">确定绑定</button>
 			</view>
 		</view>
-		<view class="cu-btn round line-gray " style="width: 200rpx;margin-top: 80rpx;">
-			返回
-		</view>
 	</view>
 </template>
 
 <script>
-export default {
-	name: '',
-	data() {
-		return {
-			
-		};
-	},
-	onLoad() {
-		
-	},
-	methods:{
-		
-	}
-};
+	export default {
+		components: {},
+		data() {
+			return {
+				houseList: [{
+						name: '阅海万家|测试小区|1栋|1单元|204',
+						id: 1,
+						checked: false
+					},
+					{
+						name: '宁夏电信|测试小区3|2栋|3单元|208',
+						id: 2,
+						checked: false
+					}
+				]
+			};
+		},
+		computed: {},
+		onLoad() {
+
+		},
+		methods: {
+			checked(item) {
+				item.checked = !item.checked
+			},
+			confirm() {
+				let checkedList = this.houseList.filter(item => item.checked)
+				console.log(checkedList);
+			}
+		}
+	};
 </script>
 
 <style lang="scss" scoped>
-	.wx-btn{
-		background-color: #2ba246;
-		color: #FFFFFF;
-		padding: 40rpx 180rpx;
-		.icon{
-			color: #216a21;
-			font-size: 42rpx;
+	.card_list {
+		background-color: #FFFFFF;
+		padding: 30rpx 0rpx 30rpx 30rpx;
+		display: flex;
+		justify-content: space-between;
+		margin: 10rpx 0;
+
+		&_left {}
+	}
+
+
+
+	// 底部按钮
+	.foot_box-wrap {
+		height: 140rpx;
+		width: 100%;
+	}
+
+	.foot_box {
+		padding: 10rpx 20rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		// border-top: 1rpx solid rgba(#ccc, 0.2);
+		// background-color: #fff;
+
+		.sync-wxaddress {
+			flex: 1;
+			line-height: 80rpx;
+			background: #ff9900;
+		}
+
+		.add-btn {
+			line-height: 80rpx;
+			flex: 1;
+			background: $base;
+			color: rgba(255, 255, 255, 1);
 		}
 	}
-</style>
+</style>

+ 25 - 4
pages/empty/empty.vue

@@ -23,6 +23,12 @@
 		},
 		onLoad(options) {
 			if(options.type=='2'){
+				this.getHouseUser()
+				this.initData()
+			}
+		},
+		methods: {
+			initData(){
 				//导航栏标题
 				uni.setNavigationBarTitle({
 					title:"房屋认证"
@@ -30,11 +36,26 @@
 				//去认证
 				this.msg="您还未完成房屋认证"
 				this.btnName="去认证"
-				this.url="../auth/auth"
+			},
+			async getHouseUser(){
+				let member=getApp().globalData.member
+				if (this.$isEmpty(member)) {
+					this.url="../auth/auth"
+					return
+				}
+				let params={
+					name:member.name,
+					phone:member.tel
+				}
+				let res=await this.$http.getHouseUserCondition(params)
+				let list=res.data.data
+				if (this.$isEmpty(list)) {
+					this.url="../auth/auth"
+					return
+				}
+				uni.setStorageSync('houseList',list)
+				this.url="../bindRoom/bindRoom"
 			}
-		},
-		methods: {
-			
 		}
 	}
 </script>

+ 42 - 59
pages/index/index.vue

@@ -57,11 +57,11 @@
 
 				<!-- 设备列表 -->
 				<view v-if="modalShow" class="flex justify-around margin-top-10">
-					<view @click="open(item.id)" v-for="(item,index) in device_list" :key="index"
+					<view @click="open(item)" v-for="(item,index) in device_list" :key="index"
 						style="flex-direction: column;" class="flex justify-center align-center">
 						<image style="width: 60rpx;height: 60rpx;" src="/static/kaimen.png" />
 						<view class="text-center padding-top-20 text-cut-1" style="font-size: 24rpx;">
-							{{item.name}}
+							{{item.deviceName}}
 						</view>
 					</view>
 				</view>
@@ -239,7 +239,7 @@
 			if (this.isFirst) {
 				this.isFirst = false
 			} else {
-				this.getRoomByMemberId()
+				this.getResidentialListByMember()
 			}
 		},
 		onLoad(options) {
@@ -298,9 +298,9 @@
 
 				}
 			},
-			open(id) {
+			open(item) {
 				//直接开门
-				that.openDoor(id)
+				that.openDoor(item)
 				//进度条加载模式开门
 				// this.isloading=true
 				// let that=this
@@ -309,16 +309,17 @@
 				// },500)
 			},
 			//立即开门
-			openDoor: function(id) {
-				let device_id = id
-				let that = this;
-				let params = {};
-				params['member_id'] = app.globalData.member.id;
-				params['device_id'] = device_id;
-				// let operation = 'member/openDoor';
-				that.$http.openDoor(params).then(res => {
-					that.isloading = false
-					if (res.data.result_code == 1) {
+			openDoor(item) {
+				let params = {
+					memberId: app.globalData.member.id,
+					serialNum: item.deviceSerialNum,
+					deviceFactory: item.deviceFactory,
+					residentialId: item.residentialId,
+					userType: 'ZH_'
+				}
+				this.$http.openDoor(params).then(res => {
+					this.isloading = false
+					if (res.data.success) {
 						this.$u.toast('开门成功')
 					} else {
 						this.$u.toast('开门失败')
@@ -328,31 +329,19 @@
 			getAuthDevice: function() {
 				let that = this;
 				let params = {};
-				if (this.$isEmpty(app.globalData.member)) {
+				let member=app.globalData.member
+				if (this.$isEmpty(member) 
+					|| member.state !=2
+					|| this.$isEmpty(uni.getStorageSync("residentialId"))) {
 					return
 				}
 				params['id'] = app.globalData.member.id;
 				params['residentialId'] = uni.getStorageSync("residentialId");
 				that.$http.getAuthDeviceByMemberId(params).then(res => {
-					if (res.data.result_code == 1) {
-						let list = [];
-						if (uni.getStorageSync('plotName')) {
-							res.data.list.map(item => {
-								let residentialId = item.residentialId + ''
-								if (residentialId.indexOf(uni.getStorageSync('residentialId')) >=
-									0) {
-									list.push(item);
-								}
-							});
-						} else {
-							list = res.data.list;
-						}
-						that.setData({
-							device_list: list
-						});
-						app.globalData.device_list = list;
+					if (res.data.success) {
+						this.device_list = res.data.data
+						app.globalData.device_list = this.device_list
 					}
-
 				});
 			},
 			async loadData(options) {
@@ -449,7 +438,7 @@
 			//改变小区
 			typeChange: function(e) {
 				let _this = this;
-				Promise.all([_this.getRoomByMemberId()]).then(result => {
+				Promise.all([_this.getResidentialListByMember()]).then(result => {
 					let value = _this.plotArray[e.detail.value];
 					let residentialId = _this.residentialIdList[e.detail.value];
 					_this.fetchNoticeList(residentialId);
@@ -571,10 +560,10 @@
 				let res = await this.$http.getMemberByOpenid(params)
 				if (res.data.result_code == 1) {
 					app.globalData.member = res.data.member;
-					uni.setStorageSync("myPhone", res.data.member.tel);
+					uni.setStorageSync("myPhone", res.data.member.phone);
 					that.$u.vuex('vuex_member', res.data.member)
 					app.globalData.anyHousePass = res.data.anyHousePass; //获取房屋列表
-					_this.getRoomByMemberId();
+					_this.getResidentialListByMember();
 					_this.getAuthDevice()
 					_this.fetchAuthRecordNum()
 				}
@@ -594,16 +583,15 @@
 				}
 			},
 			//根据会员id获取我的房屋列表
-			getRoomByMemberId: function() {
+			getResidentialListByMember: function() {
 				let that = this;
 				let params = {};
 				if (this.$isEmpty(app.globalData.member)) {
 					return
 				}
-				params['member_id'] = app.globalData.member.id;
-				// let operation = 'estate/getRoomByMemberId';
-				this.$http.getRoomByMemberId(params).then(res => {
-					if (this.$isEmpty(res.data.list)) {
+				params['id'] = app.globalData.member.id;
+				this.$http.getResidentialListByMember(params).then(res => {
+					if (this.$isEmpty(res.data.data)) {
 						return
 					}
 					let list = [];
@@ -611,18 +599,16 @@
 					let residentialIdList = [];
 					let personTelList = []
 
-					if (res.data.result_code == 1) {
-						that.fetchNoticeList(res.data.list[0].residentialId);
-						app.globalData.userId = res.data.list[0].userId
-
-						res.data.list.map(item => {
-							if (list.indexOf(item.residentialName) == -1) {
-								list.push(item.residentialName);
-								doorNeedAuditList.push(item.doorNeedAudit)
-								residentialIdList.push(item.residentialId);
-								personTelList.push(item.personTel)
-							}
-						});
+					if (res.data.success) {
+						that.fetchNoticeList(res.data.data[0].residentialId);
+						app.globalData.userId = res.data.data[0].userId
+						
+						res.data.data.forEach(item=>{
+							list.push(item.name);
+							doorNeedAuditList.push(item.doorNeedAudit)
+							residentialIdList.push(item.id);
+							personTelList.push(item.personPhone)
+						})
 						if (list.length < 1) {
 							uni.removeStorageSync("personTel");
 							uni.removeStorageSync("plotName");
@@ -660,13 +646,11 @@
 							key: "residentialList",
 							data: residentialList
 						})
-
 						//为 小区 picker 设置默认项
 						let defaultPlotId = uni.getStorageSync("residentialId")
 						if (!that.$isEmpty(defaultPlotId)) {
 							that.plotIndex = residentialIdList.indexOf(defaultPlotId)
 						}
-
 						that.setData({
 							plotArray: list,
 							residentialIdList: residentialIdList
@@ -702,7 +686,6 @@
 
 				var that = this;
 				var member = app.globalData.member;
-				console.log(member,"member");
 				var anyHousePass = app.globalData.anyHousePass; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
 				if (this.$isEmpty(member)) {
 					//去注册
@@ -749,7 +732,7 @@
 								return
 							}
 							if (this.device_list.length == 1) {
-								this.open(this.device_list[0].id)
+								this.open(this.device_list[0])
 							} else {
 								this.modalShow = !this.modalShow
 							}
@@ -817,7 +800,7 @@
 							app.globalData.oneFailHint('亲,你的信息正在审核,请耐心等待');
 						} else if (member.state == 2) {
 							app.globalData.oneFailHint('亲,你的信息已审核通过');
-							that.getRoomByMemberId()
+							that.getResidentialListByMember()
 						}
 						app.globalData.member = member;
 						app.globalData.anyHousePass = res.data.anyHousePass;

+ 21 - 22
pages/myFamily/add/add.vue

@@ -17,6 +17,9 @@
 					<u-input :border="true" type="select" :select-open="typeShow" v-model="typeLabel"
 						placeholder="请选择住户类型" @click="typeShow = true"></u-input>
 				</u-form-item>
+				<view class="flex justify-end">
+					<text class="text-sm text-orange">*住户类型不是业主时,不需要等待管理员审核</text>
+				</view>
 				<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>
@@ -25,7 +28,7 @@
 					<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
 				</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"
+					<u-input :border="true" placeholder="请输入身份证号" :trim="true" maxlength="18" v-model="id_card"
 						type="text"></u-input>
 				</u-form-item>
 				<u-form-item :required="true" label="性别" prop="sex" label-width="150">
@@ -362,7 +365,7 @@
 				})
 			},
 			//添加家人
-			addApplyUser: function() {
+			async addApplyUser() {
 				let that = this;
 				let params = {};
 				let name = that.name;
@@ -380,7 +383,7 @@
 					app.globalData.autoFailHint("请填写正确手机号");
 					return;
 				}
-				params['tel'] = tel;
+				params['phone'] = tel;
 				let room_id = that.own_room_list[that.own_room_list_index].id;
 
 				if (!room_id) {
@@ -393,10 +396,7 @@
 				let id_card = that.id_card;
 				params['id_card'] = id_card; //业主身份时,身份证必填
 
-				if (type == 0 && !id_card) {
-					app.globalData.autoFailHint("住户类型是业主时,证件号码必填");
-					return;
-				} //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
+				//0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
 				if (!this.$isEmpty(id_card)) {
 					//如果身份证号不为空,就校验身份证号
 					if (!this.$u.test.idCard(id_card)) {
@@ -434,7 +434,8 @@
 					this.$u.toast('请上传人脸')
 					return
 				}
-				params['image_uri'] = that.image_uri;
+				
+				params['face_url'] = that.image_uri;
 				let face_code = that.face_code;
 				params['face_code'] = that.face_code; //性别
 				params['oper_user_type'] = 0 //操作类型,业主操作
@@ -445,21 +446,19 @@
 
 				params['record_type'] = '1'; ///申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
 				// let operation = 'member/authentication';
-				console.log(params)
-				that.$http.authentication(params).then(res => {
-					//添加成功
-					if (res.data.result_code == 1) {
-						app.globalData.oneFailHint(res.data.result_msg, function() {
-							uni.navigateBack({
-								delta: 1 // 返回上一级页面。
-
-							});
+				this.$dialog.showLoading('请等待...')
+				let res=await that.$http.authentication(params)
+				uni.hideLoading()
+				//添加成功
+				if (res.data.result_code == 1) {
+					app.globalData.oneFailHint(res.data.result_msg, function() {
+						uni.navigateBack({
+							delta: 1 // 返回上一级页面。
 						});
-					} else {
-						app.globalData.oneFailHint(res.data.result_msg);
-					}
-
-				});
+					});
+				} else {
+					app.globalData.oneFailHint(res.data.result_msg);
+				}
 			}
 
 		}

+ 11 - 7
pages/myFamily/comps/item.vue

@@ -132,9 +132,12 @@
 			getUserListByMemberId(mescroll) {
 				let that = this;
 				let params = {
-					"pageNum": mescroll.num,
-					"pageSize": mescroll.size,
-					"member_id": getApp().globalData.member.id
+					query:{
+						current:mescroll.num,
+						size:mescroll.size,
+					},
+					"residentialId":uni.getStorageSync('residentialId'),
+					"id": getApp().globalData.member.id
 				};
 				if (!this.$isEmpty(this.roomId)) {
 					params.roomId = this.roomId
@@ -142,9 +145,10 @@
 				// let operation = 'user/getAllUserByMemberId';
 				try {
 					that.$http.getAllUserByMemberId(params).then(res => {
-						if (res.data.result_code == 1) {
-							let data = res.data.list
-							mescroll.endByPage(data.length, res.data.pages);
+						if (res.data.success) {
+							let data = res.data.data.records
+							let total=res.data.data.total
+							mescroll.endBySize(data.length, total);
 							if (mescroll.num == 1) that.userList = [];
 							that.userList = that.userList.concat(data); //追加新数据
 						} else {
@@ -173,7 +177,7 @@
 				// let operation = 'applyUser/getAllApplyUserByMemberId';
 				try {
 					that.$http.getAllApplyUserByMemberId(params).then(res => {
-						if (res.data.result_code == 1) {
+						if (res.data.success) {
 							let data = res.data.list
 							mescroll.endByPage(data.length, res.data.pages);
 							if (mescroll.num == 1) that.applyList = [];

+ 8 - 4
pages/myFamily/comps/user-card.vue

@@ -42,14 +42,18 @@
 		</view>
 		
 		<!-- 有自己房屋的人才可以显示添加家人的功能按钮 -->
-		<view v-if="!$isEmpty(vuex_own_room_list)" @click="onTap('add/add')" class=" footer-fixed" >
+		<view  @click="onTap('add/add')" class=" footer-fixed" >
 			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
 				添加家人
 			</view>
 		</view>
-<!-- 		<navigator url="add/add" v-if="!$isEmpty(vuex_own_room_list)" class="cuIcon cu-btn round base-bg-color" style="position: fixed;bottom: 20%;left: 20rpx;width: 88rpx;height: 88rpx;">
-			<text class="cuIcon-add" style="font-size: 60rpx;"></text>
-		</navigator> -->
+		
+<!-- 		<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>
 

+ 19 - 27
pages/myFamily/myFamily.vue

@@ -28,8 +28,7 @@
 			</swiper>
 		</view>
 		
-		<u-picker mode="selector" v-model="roomShow"   :range="realRoomList" range-key="fullRoomName" @confirm="roomChange"></u-picker>
-		<!-- <u-select z-index="9999999"  mode="single-column"  value-name="id" label-name="name" v-model="roomShow" :list="roomList" @confirm="roomChange"></u-select> -->
+		<u-picker mode="selector" v-model="roomShow"   :range="roomList" range-key="fullRoomName" @confirm="roomChange"></u-picker>
 	</view>
 </template>
 <script>
@@ -41,8 +40,8 @@
 		data() {
 			return {
 				roomShow:false,
-				realRoomList:[],
 				roomList:[],
+				
 				roomName:'',
 				roomId:'',
 				
@@ -76,40 +75,33 @@
 			getRoomByMemberId(){
 				let that=this
 				let params={
-					residential_id:uni.getStorageSync('residentialId'),
-					member_id:getApp().globalData.member.id
+					residentialId:uni.getStorageSync('residentialId'),
+					id:getApp().globalData.member.id
 				}
 				// let operation = 'estate/getRoomByMemberId';
 				that.$http.getRoomByMemberId(params).then(res =>{
-					if (res.data.result_code == 1) {
-						this.realRoomList=res.data.roomList
-						that.roomList=res.data.list
-						
-						let own_room_list=[]
-						that.roomList.forEach(item=>{
-							if (item.relationshipType==0) {
-								// own_room_list.push(item)
-							}
-							item.fullRoomName=item.buildingName+"-"+item.unitName+"-"+item.name
-							
-						})
-						that.realRoomList.forEach(item=>{
-							item.fullRoomName=item.buildingName+"-"+item.unitName+"-"+item.name
-							own_room_list.push(item)
+					if (res.data.success) {
+						that.roomList=res.data.data
+						this.roomList.forEach(item=>{
+							item.fullRoomName=item.residentialName+"-"+item.buildingName+"-"+item.unitName+"-"+item.name
 						})
-						//业主自己的房子
-						getApp().globalData.own_room_list = own_room_list;
-						that.$u.vuex('vuex_own_room_list',own_room_list)
+						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)
+						// that.roomName=that.roomList[0].name
+						// that.roomId=that.roomList[0].id
+						// that.$u.vuex('vuex_relationshipType', that.roomList[0].relationshipType)
 					}
 					
 				})
 			},
 			roomChange(e){
-				console.log(e,"1222");
 				this.roomName=this.realRoomList[e[0]].name
 				this.roomId=this.realRoomList[e[0]].id
 				// this.$u.vuex('vuex_relationshipType', this.roomList[e[0]].relationshipType)

+ 4 - 19
pages/myhome/myhome.vue

@@ -102,33 +102,18 @@ export default {
 		upCallback(mescroll){
 			let that = this
 			let parmas={
-				member_id:getApp().globalData.member.id,
-				pageNum:mescroll.num,
-				pageSize:20
+				id:getApp().globalData.member.id,
+				residentialId:uni.getStorageSync('residentialId')
 			}
-			// let operation = 'estate/getRoomByMemberId'
 			try{
 				this.$http.getRoomByMemberId(parmas).then(res =>{
-					if (res.data.result_code!=1) {
+					if (!res.data.success) {
 						mescroll.endErr()
 						return
 					}
-					let data=[]
-					if (uni.getStorageSync('plotName')) {
-						//如果选择了当前小区,就只把当前小区的房屋列表展示出来
-						  res.data.roomList.map(item => {
-							if (item.residentialName == uni.getStorageSync('plotName')) {
-							  data.push(item);
-							}
-						  })
-					} else {
-						// 如果没有选择到小区,就把所有的房屋列表展示出来
-					  data = res.data.roomList;
-					}
+					let data=res.data.data
 					//不推荐
 					mescroll.endSuccess(data.length)
-					//推荐用下面这个,但是后台没有给我返回total
-					// this.mescroll.endBySize(data.length, total)
 					if(mescroll.num == 1) that.room_list = []
 					that.room_list = that.room_list.concat(data)
 					getApp().globalData.room_list = that.room_list

+ 40 - 33
pages/register/register.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container edit_wrap">
-		<view class="flex justify-between " style="padding: 40rpx 30rpx;;box-sizing: border-box;">
+		<view class="flex justify-between	" style="padding: 40rpx 30rpx;;box-sizing: border-box;">
 			<view class="" style="font-size: 38rpx;">
 				<text class="text-bold text-black">注册认证</text>
 			</view>
@@ -159,7 +159,7 @@
 				;
 			},
 			//确认
-			showDialogBtn: function(e) {
+			async showDialogBtn(e) {
 				console.log(e);
 				app.globalData.totalStep = 3
 				let that = this;
@@ -201,40 +201,47 @@
 				params['create_type'] = 0;
 				params['openid'] = uni.getStorageSync("openid");
 				// let operation = 'miniprogram/memberRegister';
-				this.$http.memberRegister(params).then(res => {
-					//注册成功
-					if (res.data.result_code == 1) {
-						this.$dialog.showModal("注册成功",false).then(()=>{
-							//注册成功之后重新拉取一次会员信息
-							let params = {};
-							params['openid'] = uni.getStorageSync("openid");
-							// let operation = 'miniprogram/getMemberByOpenid';
-							that.$http.getMemberByOpenid(params).then(res => {
-								console.info("getMemberByOpenid==" + res.data
-								.result_msg); //获取成功
-								if (res.data.result_code == 1) {
-									let member = res.data.member;
-									app.globalData.member = member; //未认证状态--提示去认证
-									if (this.$isEmpty(member.state)) {
-										uni.redirectTo({
-											url: "../auth/auth"
-										})
-									} else {
-										uni.reLaunch({
-											url: '/pages/index/index'
-										});
-									}
-								} else {
-									app.globalData.oneFailHint(res.data.result_msg);
-								}
-							
-							});
+				let res = await this.$http.memberRegister(params)
+				if (res.data.result_code == 0) {
+					app.globalData.oneFailHint(res.data.result_msg);
+					return
+				}
+				let houseList=res.data.result_data
+				//注册成功
+				this.$dialog.showModal("注册成功", false).then(async () => {
+					//注册成功之后重新拉取一次会员信息
+					let params = {
+						openid: uni.getStorageSync("openid")
+					};
+					let resp = await that.$http.getMemberByOpenid(params)
+					 console.log(resp,"resp");
+					if (resp.data.result_code == 0) {
+						app.globalData.oneFailHint(resp.data.result_msg);
+						return
+					}
+					let member = resp.data.member;
+					app.globalData.member = member;
+					if (member.state == 1 || member.state == 2) {
+						uni.reLaunch({
+							url: '/pages/index/index',
+						})
+						return
+					}
+					//去认证
+					if (this.$isNotEmpty(houseList)) {
+						uni.setStorageSync("houseList",houseList)
+						uni.redirectTo({
+							url: "/pages/bindRoom/bindRoom",
+							fail: (err) => {
+								console.log(err);
+							}
 						})
-	
 					} else {
-						app.globalData.oneFailHint(res.data.result_msg);
+						uni.redirectTo({
+							url: "../auth/auth",
+						})
 					}
-				});
+				})
 			},
 			//申请短信验证码
 			sendMessage: function() {

+ 7 - 7
pages/services/property/list/card.vue

@@ -9,10 +9,10 @@
 					</view>
 				</view>
 				<view class="right">
-					<text class="text-red" v-if="item.jobStatus==-1">已取消</text>
-					<text class="text-orange" v-if="item.jobStatus==0">待处理</text>
-					<text class="" v-if="item.jobStatus==1">已完成</text>
-					<text class="text-orange" v-if="item.jobStatus==2">待评价</text>
+					<text class="text-red" v-if="item.handleStatus==-1">已取消</text>
+					<text class="text-orange" v-if="item.handleStatus==0">待处理</text>
+					<text class="" v-if="item.handleStatus==1">已完成</text>
+					<text class="text-orange" v-if="item.handleStatus==2">待评价</text>
 				</view>
 			</view>
 			<view class="item">
@@ -38,15 +38,15 @@
 					联系物业
 				</button>
 				<!-- 待处理,显示取消工单 -->
-				<view v-if="item.jobStatus==0" class="cu-btn  sm round bg-blue" @click.stop="cancel(item)">
+				<view v-if="item.handleStatus==0" class="cu-btn  sm round bg-blue" @click.stop="cancel(item)">
 					取消工单
 				</view>
 				<!-- 已取消,显示删除订单 -->
-				<view v-if="item.jobStatus==-1" class="cu-btn  sm round bg-blue" @click.stop="deleteItem(item)">
+				<view v-if="item.handleStatus==-1" class="cu-btn  sm round bg-blue" @click.stop="deleteItem(item)">
 					删除工单
 				</view>
 				<!-- 已完成,显示写评价 -->
-				<view v-if="item.jobStatus==1" class="cu-btn  sm round bg-blue" @click.stop="comment(item)">
+				<view v-if="item.handleStatus==1" class="cu-btn  sm round bg-blue" @click.stop="comment(item)">
 					写评价
 				</view>
 			</view>

+ 11 - 19
pages/services/property/list/item.vue

@@ -60,9 +60,9 @@
 			 */
 			deleteItem(item){
 				let that=this
-				app.globalData.twoFailHint("确定要取消该工单?",function(){
+				app.globalData.twoFailHint("确定要删除该工单?",function(){
 					//删除状态
-					item.status=-1
+					item.isDeleted=1
 					// let operation='estateRepair/addEstateRepair'
 					that.$http.addEstateRepair(item).then(res =>{
 						if (res.data.add_result==true) {
@@ -82,10 +82,11 @@
 			cancel(item){
 				let that=this
 				app.globalData.twoFailHint("确定要取消该工单?",function(){
-					item.jobStatus=-1
+					item.handleStatus=-1
 					// let operation='estateRepair/addEstateRepair'
 					that.$http.addEstateRepair(item).then (res =>{
-						if (res.data.add_result==true) {
+						console.log(res,"ress");
+						if (res.data.success) {
 							app.globalData.oneFailHint("取消成功");
 							that.mescroll.resetUpScroll()
 						}else{
@@ -112,25 +113,16 @@
 						size:mescroll.size,
 					},
 					memberId:getApp().globalData.member.id,
-					jobStatus:this.item.value
+					handleStatus:this.item.value
 				}
-				//已处理,待评价
-				if (this.item.value==2) {
-					//已处理
-					data.jobStatus=1
-					//待评价
-					data.estimateStatus=0
-				}
-				// let operation='estateRepair/estateRepairList'
 				try{
 					that.$http.estateRepairList(data).then (res=>{
-						let estateRepairList=res.data.estateRepairList
-						let length=estateRepairList.records.length
-						let data=estateRepairList.records
-						mescroll.endBySize(length, estateRepairList.total);
+						let data=res.data.data
+						let records=data.records
+						let length=records.length
+						mescroll.endBySize(length, data.total);
 						if(mescroll.num == 1) that.list = []; //如果是第一页需手动制空列表
-						that.list=that.list.concat(data); //追加新数据
-						
+						that.list=that.list.concat(records); //追加新数据
 					});
 				}catch(e){
 					mescroll.endErr();

+ 40 - 71
pages/services/property/property.vue

@@ -25,7 +25,7 @@
 					<view>联系方式</view>
 				</view>
 				<view class="bg-gray padding-20 ">
-					<input maxlength="11" type="number" placeholder="请输入您的联系方式" v-model="data.phone" />
+					<input maxlength="11" type="number" placeholder="请输入您的联系方式" v-model="data.reportorPhone" />
 				</view>
 			</view>
 			<view class="form">
@@ -37,14 +37,22 @@
 					<input disabled type="number" placeholder="请选择预约时间" v-model="dateTimeStr" />
 				</view>
 			</view>
+			<view class="form">
+				<view class="flex">
+					<view class="need">*</view>
+					<view>故障简述</view>
+				</view>
+				<view class="bg-gray padding-20 ">
+					<input type="text" placeholder="请输入故障简述" v-model="data.repairName" />
+				</view>
+			</view>
 		</view>
 
 		<view class="card ">
 			<view class="form" style="height: 320rpx;">
 				<view class="bg-gray padding-10">
 					<u-input v-model="data.reportDetail" type="textarea" maxlength="100" height="240"
-						placeholder="请填写故障描述" style="width: 100%;line-height: 50rpx;" />
-					<!-- <textarea @click="showMask"   v-model="data.reportDetail" maxlength="100" style="width: 100%;height: 270rpx;line-height: 50rpx;"  placeholder="请填写故障描述"></textarea> -->
+						placeholder="故障详细描述" style="width: 100%;line-height: 50rpx;" />
 					<view class="text-right text-df text-gray padding-top-10">
 						{{data.reportDetail.length}} / 100
 					</view>
@@ -71,12 +79,13 @@
 				</view>
 			</view>
 		</view>
-		<view style="height: 110rpx;"></view>
-		<view style="z-index: 999;" class=" footer-fixed " @click="submit">
+		<view style="height: 160rpx;"></view>
+		<view style="z-index: 999;" class="footer-fixed" :style="{'margin-bottom': safeAreaBottom+'rpx'}" @click="submit">
 			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
 				确定提交
 			</view>
 		</view>
+		
 		<u-mask z-index="99999" :show="maskShow" @click="maskShow = false">
 			<view style="margin: 20rpx;" @click.stop="">
 				<textarea @confirm="confirm" @keyboardheightchange="keyboardheightchange" v-model="data.reportDetail"
@@ -113,27 +122,26 @@
 				//图片回显
 				imgList: [],
 				data: {
+					//上报人
+					reportor:'',
+					//保修电话
+					reportorPhone:'',
+					repairName:'',
+					//故障详情描述
+					reportDetail: '',
+					//报事来源,1:小程序,2:后台
+					reportSource:1,
+					//故障位置
+					reportPosition: '',	
 					//处理状态:待处理
 					handleStatus: 0,
-					//报修用户的memberId
-					memberId: '',
-					//userId
-					userId: '',
 					//小区id
 					residentialId: '',
-					//小区名字
-					residentialName: '',
-					//故障位置
-					reportPosition: '',
+					//图片描述
+					pic: '',
 					//预约时间区间
 					beginTime: '',
 					endTime: '',
-					//联系方式
-					phone: '',
-					//故障详情描述
-					reportDetail: '',
-					//图片描述
-					pic: ''
 				},
 				base64_image: [],
 				residentialShow: false,
@@ -146,31 +154,22 @@
 			this.initData()
 		},
 		onShow() {
-			this.data.phone = getApp().globalData.member.tel
+			this.data.reportorPhone = getApp().globalData.member.phone
 		},
 		methods: {
 			initData() {
 				that = this
 				//判断是ios还是安卓,ios键盘上移会挤压遮挡层
 				this.platform = this.$u.os() || "android"
-				//获取用户的userid
-				this.data.userId = app.globalData.userId
-				//获取用户的memberId
-				try {
-					that.data.memberId = app.globalData.member.id
-				} catch (e) {
-					console.log(e);
-				}
+				this.data.memberId=app.globalData.member.id
 				if (this.$isEmpty(this.data.memberId)) {
-					app.globalData.oneFailHint("系统异常", function() {
-						uni.navigateBack({
-							delta: 1
-						})
-					})
+					this.$dialog.showModalAndBack('系统异常')
 					return
 				}
+				//获取用户的userid
+				this.data.reportor = app.globalData.member?app.globalData.member.name:'未知' 
 				//从缓存中获取房屋列表
-				this.residentialList = uni.getStorageSync("residentialList")
+				this.residentialList = uni.getStorageSync("residentialList")//从缓存中获取默认的小区名字和小区id
 				//从缓存中获取默认的小区名字和小区id
 				this.data.residentialName = uni.getStorageSync("plotName")
 				this.data.residentialId = uni.getStorageSync("residentialId")
@@ -183,7 +182,7 @@
 				})
 			},
 			submit() {
-				if (this.$isEmpty(this.data.residentialName)) {
+				if (this.$isEmpty(this.data.residentialId)) {
 					this.$u.toast("请选择小区")
 					return
 				}
@@ -191,11 +190,11 @@
 					this.$u.toast("请填写具体位置")
 					return
 				}
-				if (this.$isEmpty(this.data.phone)) {
+				if (this.$isEmpty(this.data.reportorPhone)) {
 					this.$u.toast("请输入联系方式")
 					return
 				}
-				if (!this.$u.test.mobile(this.data.phone)) {
+				if (!this.$u.test.mobile(this.data.reportorPhone)) {
 					this.$u.toast("请输入正确的联系方式")
 					return
 				}
@@ -208,14 +207,13 @@
 					this.$u.toast("开始时间不能小于结束时间")
 					return
 				}
-				if (this.$isEmpty(this.data.reportDetail)) {
-					this.$u.toast("请输入故障述")
+				if (this.$isEmpty(this.data.repairName)) {
+					this.$u.toast("请输入故障述")
 					return
 				}
-				this.data.pic = JSON.stringify(this.base64_image)
-				// let operation='estateRepair/addEstateRepair'
+				this.data.pic = this.base64_image.join(",")
 				that.$http.addEstateRepair(this.data).then(res => {
-					if (res.data.add_result) {
+					if (res.data.success) {
 						app.globalData.oneFailHint("提交成功");
 					} else {
 						app.globalData.oneFailHint("提交失败");
@@ -259,35 +257,6 @@
 					this.base64_image.push(url)
 					this.imgList.push(url)
 				}
-				return
-
-
-				let that = this
-				uni.chooseImage({
-					count: 4 - this.imgList.length,
-					sizeType: ['original', 'compressed'],
-					sourceType: ['album'],
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						for (let index in tempFilePaths) {
-							//图片回显
-							that.imgList.push(tempFilePaths[index])
-							//图片转为base64的图片
-							uni.getFileSystemManager().readFile({
-								filePath: tempFilePaths[index],
-								//选择图片返回的相对路径
-								encoding: 'base64',
-								//编码格式
-								success: res => {
-									//成功的回调
-									that.base64_image.push('data:image/jpeg;base64,' + res
-										.data)
-								}
-							});
-						}
-
-					}
-				});
 			},
 			/*预览图片*/
 			viewImage(index) {