浏览代码

多租户登录注册

zouling 2 月之前
父节点
当前提交
efc15a50d7

+ 46 - 13
property_ui/api/login.js

@@ -1,15 +1,19 @@
 import request from '@/utils/request'
 
 // 登录方法
-export function login(username, password, code, uuid) {
+export function login(username, password, code, uuid,tenantId,clientId,grantType,phonenumber,smsCode) {
   const data = {
     username,
     password,
     code,
-    uuid
+    uuid,
+	tenantId,
+	clientId,
+	grantType,
+	phonenumber,smsCode
   }
-  return request({
-    'url': '/login',
+  return request({//
+    'url': '/auth/login',
     headers: {
       isToken: false
     },
@@ -17,11 +21,40 @@ export function login(username, password, code, uuid) {
     'data': data
   })
 }
-
+// 解码接口
+export function getweChatOpenid(data) {
+  return request({
+    'url': '/weChatOpenid',
+    'method': 'post',
+	'data':data
+  })
+}
+// 微信登录
+export function getweChatLogin(data) {
+  return request({
+    'url': '/auth/weChatLogin',
+    'method': 'post',
+	'data':data
+  })
+}
+// 获取用户详细信息
+export function getInfo() {//
+  return request({
+    'url': '/system/user/getInfo',
+    'method': 'get'
+  })
+}
+// 获取用户详细信息
+export function gettenantList() {
+  return request({
+    'url': '/auth/tenant/list',
+    'method': 'get'
+  })
+}
 // 注册方法
 export function register(data) {
   return request({
-    url: '/register',
+    url: '/auth/register',
     headers: {
       isToken: false
     },
@@ -44,18 +77,18 @@ export function sendSmszcOnly(data) {
 	data:data
   })
 }
-// 获取用户详细信息
-export function getInfo() {
+
+export function sendSmsCode(data) {
   return request({
-    'url': '/getInfo',
-    'method': 'get'
+    'url': '/wuYe/resource/sms/code',
+    'method': 'get',
+	data:data
   })
 }
-
 // 退出方法
 export function logout() {
   return request({
-    'url': '/logout',
+    'url': '/auth/logout',
     'method': 'post'
   })
 }
@@ -63,7 +96,7 @@ export function logout() {
 // 获取验证码
 export function getCodeImg() {
   return request({
-    'url': '/captchaImage',
+    'url': '/auth/code',
     headers: {
       isToken: false
     },

+ 1 - 1
property_ui/api/system/user.js

@@ -22,7 +22,7 @@ export function getappForgetPW(data) {
 // 重置密码
 export function getappCheck(data) {
   return request({
-    url: '/wuYe/applet/appCheck',
+    url: '/system/user/profile/appCheck',
     method: 'get',
 	'data':data
   })

+ 105 - 0
property_ui/components/box/popup.vue

@@ -0,0 +1,105 @@
+<template>
+	<view>
+		<!-- 信息弹窗 -->
+		<view class="bgbox" style="z-index: 100;" v-if="initFace=='N'"></view>
+		<view class="fixedbox" style="z-index: 101;" v-if="initFace=='N'">
+			<image :src="tiptit" class="imga"></image>
+			<view  class="boxs">
+				<view class="ztit">您的信息暂未完善,请前去完善</view>
+				<view class="ztit">解锁更多内容</view>
+			</view>
+			<view class="fixedbtn flexcj">
+				<view class="btns btn2 flex1" @click="getXxwsFn">去完善</view>
+			</view>
+			<image :src="closeimg" class="closeimg" @click="getClose"></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import { getToken } from '@/utils/auth'
+	import {uploadmore} from '@/utils/common.js'
+	export default{
+		components:{},
+		props:{
+			type: {
+				type: String,
+				default () {
+					return ''
+				}
+			},
+			initFace:{
+				type: [String,Number],
+				default () {
+					return 'N'
+				}
+			},
+			phoneList:{
+				type: Array,
+				default () {
+					return []
+				}
+			}
+		},
+		data(){
+			return{
+				baseUrl:config.baseUrl,
+				closeimg:require("@/static/images/close.png"),
+				tiptit:require("@/static/images/tiptit.png"),
+				// rimg: require('@/work/static/people/rimg.png'),
+				// headbg: require('@/work/static/service/headbg.png'),
+				datainfo:{
+					iszc:""
+				},
+				tabval:0,
+
+			}
+		},
+		mounted() {
+			this.baseUrl=baseUrl
+		},
+		watch:{
+			type(val){
+				// this.filelist=[];
+				// this.shtext='';
+				// this.isty='2';
+				// this.phofile=[];
+			}
+		},
+		methods:{
+			
+			getClose(){
+				this.$emit('getClose')
+			},
+			getSure(){
+				this.$emit('getSure')
+			},
+			getXxwsFn(){
+				this.$emit('getXxwsFn')
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>	
+.closeimg{width: 34rpx;height: 34rpx;position: absolute;bottom: -52rpx;left: 50%;margin-left: -16rpx;}
+.fixedbox{position: fixed;left: 160rpx;right: 160rpx;background: #fff;border-radius: 20rpx;top: 50%;transform: translateY(-50%);z-index: 10;padding: 32rpx 28rpx 40rpx;box-sizing: border-box;background: linear-gradient(0deg, #FFFFFF, #DAF3FF);
+	.imga{width: 230rpx;height: 70rpx;display: block;margin: 0 auto 36rpx;}
+	.boxs{
+		.ztit{font-weight: 500;font-size: 26rpx;color: #343434;text-align: center;line-height: 48rpx;text-align: center;
+		}
+}
+	.fixedbtn{margin: 36rpx 2rpx 0;
+		.btns{width: 192rpx;height: 70rpx;border-radius: 36rpx;font-weight: bold;
+font-size: 26rpx;display: flex;align-items: center;justify-content: center;box-sizing: border-box;
+			// &.btn1{color: #00A9F0;border: 2rpx solid #00A9F0;margin-right: 24rpx;}
+			&.btn2{background: #DAF3FF;color: #5f94fb;border: 2rpx solid #5f94fb;}
+		}
+		
+	}
+	.closeimg{bottom: -58rpx;}
+}
+</style>

+ 5 - 3
property_ui/config.js

@@ -1,13 +1,15 @@
 // 应用全局配置
 module.exports = {
   // baseUrl: 'https://zhsq.qs163.cn/prod-api',
-  baseUrl: 'http://47.99.82.249:5011/prod-api',
-  // baseUrl: 'http://192.168.101.245:8065',
-  // baseUrl: 'http://192.168.101.168:8065',
+  // baseUrl: 'http://47.99.82.249:5011/prod-api',
+  baseUrl: 'http://192.168.101.245:8077',
+  // baseUrl: 'http://192.168.101.86:8077',
   // baseUrl: 'http://10.90.90.52:8065',
   // baseUrl: 'http://10.90.90.53:8065',
   // baseUrlimg: 'http://114.99.127.243:2001',
   baseName:'智慧社区物管端',
+  Clientid:'428a8310cd442757ae699df5d894f051',//
+  grantType:'password',//
   // 应用信息
   appInfo: {
     // 应用名称

+ 2 - 0
property_ui/manage/pages/community/newsaddvideo.vue

@@ -56,6 +56,7 @@
 <script>
 	import config from '@/config'
 	const baseUrl = config.baseUrl
+	const Clientid = config.Clientid
 	import { getToken } from '@/utils/auth'
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
 	import {manualAdd,manualPut,manualDet} from "@/api/work/manage.js"
@@ -74,6 +75,7 @@
 				    header: {
 				        // 示例参数可删除
 				        'Authorization':  'Bearer ' + getToken(),
+						'Clientid':  Clientid,
 				    },
 				    // 根据你接口需求自定义body参数
 				    formData: {

+ 4 - 2
property_ui/manifest.json

@@ -18,7 +18,8 @@
             "delay" : 0
         },
         "modules" : {
-            "Maps" : {}
+            "Maps" : {},
+            "OAuth" : {}
         },
         "distribute" : {
             "android" : {
@@ -63,7 +64,8 @@
                         "apikey" : "MuVtMTc6EHaLbrr38WEhqjml",
                         "secretkey" : "rPGCiA3L41VwuTCBHkwkmcOt0IPTsi8z"
                     }
-                }
+                },
+                "oauth" : {}
             },
             "icons" : {
                 "android" : {

+ 7 - 3
property_ui/mine/pages/pwd/forgetpwd.vue

@@ -16,8 +16,8 @@
 </template>
 
 <script>
-  import { getappForgetPW } from "@/api/system/user"
-
+  // import { getappForgetPW } from "@/api/system/user"
+import {sendSmsCode} from "@/api/login.js"
   export default {
     data() {
       return {
@@ -43,7 +43,11 @@
 				that.$toast("请输入正确的手机号")
 				return
 			}
-			getappForgetPW(this.phonenumber).then(res=>{
+			var params={
+				phonenumber:this.phonenumber,
+				type:3,//1:登录 2:注册 3:修改密码
+			}
+			sendSmsCode(params).then(res=>{
 				if (res.code == 200) {
 					// 发送验证码
 					that.$toast("发送成功")

+ 9 - 0
property_ui/pages.json

@@ -118,6 +118,15 @@
 					}
 				}
 			},
+			{
+				"path": "pages/manage/housedetail",
+				"style": {
+					"navigationBarTitleText": "房屋详情",
+					"h5":{
+						"titleNView":false
+					}
+				}
+			},
 			{
 				"path": "pages/manage/houseadd",
 				"style": {

+ 69 - 4
property_ui/pages/index/index.vue

@@ -1,12 +1,23 @@
 <template>
   <view :style="'padding-top:'+nvaHeight+'px;'">
 		<view class="navbox">
-			<uni-nav-bar  color="#ffffff" leftWidth='400rpx'  :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
+			<uni-nav-bar  color="#ffffff" leftWidth='520rpx'  :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
 				<block slot="left">
+					<view class="flexc">
 					<view class="topl flexc">
 						<image :src="adrimg" ></image>
 						<view class="over">{{city}}</view>
 					</view>
+					<view style="flex: 0 1 auto;overflow: hidden;">
+						<picker range-key='dictLabel' :value="voindex" :range="xxList"	@change='bindDateChangeb'>
+							<view class="pay_btn flexcc" >
+								<view class="tit over">
+									{{companyName||"请选择物业"}}</view>
+								<image :src="aupimg" class="rimgs"></image>
+							</view>
+						</picker>
+					</view>
+					</view>
 				</block>
 			</uni-nav-bar>
 		</view>
@@ -165,7 +176,13 @@
 						<view class="txt">物业报修</view>
 					</view>
 					<view class="list bimga" @click="getStaffFn"  v-if="checkPermi(['wuYe:staffManage:list'])">
-						<view class="imgs"><image :src="htabk" class="imgb"></image></view>
+						<view class="imgs"><image :src="htabk" class="imgb"></image>
+							<view class="tips">
+								<block>aa</block>
+								<!-- <block v-if="countTips.complaintSuggestion>98">99+</block>
+								<block v-else>{{countTips.complaintSuggestion||0}}</block> -->
+							</view>
+						</view>
 						<view class="txt">员工管理</view>
 					</view>
 					<view class="list bimga" @click="getComplaintFn" v-if="checkPermi(['wuYe:suggestion:list'])">
@@ -206,6 +223,7 @@
 			</view>
 		</view>
 	<loading></loading>
+	<pop-up  @getClose="getClose"  :initFace='initFace' @getXxwsFn="getXxwsFn"></pop-up>
 	 <footers v-if="isfootflag"  :footerindex="footerindex"></footers>
   </view>
 </template>
@@ -213,13 +231,14 @@
 <script>
 import footers from '@/components/footer/footer.vue'
 import notice from '@/components/swiper/notice.vue'
+import popUp from "@/components/box/popup.vue"
 import {getUserProfile} from "@/api/system/user.js"
 import {repairList} from "@/api/work/service.js"
 import self from '@/utils/location.js';
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 import {getCount,getCountTips} from "@/api/work/index.js"
   export default {
-	components:{footers,notice},
+	components:{footers,notice,popUp},
 	data(){
 		return{
 			footerindex:'home',
@@ -253,12 +272,16 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 			htabo:require("@/static/images/home/htabo.png"),
 			htabp:require("@/static/images/home/htabp.png"),
 			upimg:require("@/static/images/home/up.png"),
+			aupimg: require('@/static/images/aup.png'),
 			city:'合肥市',
+			initFace:'N',//initFace Y不需要,N需要人脸认证
 			deptName:this.$store.state.user.deptName,
 			nickName:this.$store.state.user.nickName,
 			postGroup:'',//岗位
 			autoplay:false,
 			zhanflag:true,
+			xxList:[],
+			companyName:'',
 			count:"",//统计
 			countTips:'',//红点
 			userId:this.$store.state.user.userId,
@@ -301,6 +324,43 @@ import {getCount,getCountTips} from "@/api/work/index.js"
     },
 	methods:{
 		checkPermi, checkRole,
+		getXxwsFn(){
+			// this.$tab.navigateTo(`/mine/pages/house/addhouse`) 
+		},
+		getClose(){
+			this.initFace='Y';
+		},
+		bindDateChangeb(e){
+			var that=this;
+			var val=e.detail.value;
+			var id=this.xxList[val].dictValue
+			this.companyName=this.xxList[val].dictLabel;
+			// if(id!=this.tenantId){
+				this.tenantId=id;
+				var params={
+					tenantId:id,
+					clientId:Clientid,
+					grantType:'password'
+				}
+				gettenantCheck(params).then(res=>{
+					var data=res.data;
+					// 切换token
+					this.$store.dispatch('checkToken', data.access_token).then(() => {
+						that.getClassFn('GetInfo');
+						// 刷新其余的页面
+						var newArr=[false,true,true,true,true]
+						that.$store.dispatch('checkRefresh', newArr).then(() => {
+							
+						}).catch(() => {
+						 
+						})
+					}).catch(() => {
+		 
+					})
+					
+				})
+			// }	
+		},
 		getNoticeDet(data){
 			this.$tab.navigateTo(`/service/pages/service/warrantydetail?id=`+data) 
 		},
@@ -401,7 +461,7 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;	}
 .navbg{width: 100%;height: 782rpx;}
 .wymain{z-index: 2;position: relative;padding: 0 24rpx;}
-.topl{overflow: hidden;padding-left: 16rpx;
+.topl{overflow: hidden;padding-left: 16rpx;max-width: 200rpx;flex: 0 0 auto;
 	image{width: 18rpx;height: 22rpx;margin-right: 14rpx;flex: 0 0 auto;}
 	view{font-weight: bold;font-size: 26rpx;color: #272727;}
 }
@@ -456,4 +516,9 @@ height: 20rpx;padding: 0 4rpx;display: flex;align-items: center;justify-content:
 		view{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
 	}
 }
+.pay_btn{min-width: 240rpx;height: 66rpx;flex: 0 1 auto;margin-left: 20rpx;max-width: 320rpx;
+	
+	.tit{font-size: 26rpx;font-weight: 500;color: #333432;overflow: hidden;}
+	image{width: 18rpx;height: 10rpx;margin-left: 20rpx;flex:0 0 auto;}
+}
 </style>

+ 43 - 77
property_ui/pages/indexs.vue

@@ -1,88 +1,54 @@
 <template>
-	<view>
-		
-	<loading></loading>	
-	</view>
+  <view class="regbox pregbox flexdc pr"  id="regbox" style="padding-top: 120rpx;">
+	  <image :src="headimg" class="headimg flex0"></image> 
+	  <view class="rbtn btn2" @click="getDown">立即下载</view>
+  </view>
 </template>
 
 <script>
 	import config from '@/config'
 	const baseUrl = config.baseUrl
-	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
-	export default{
-		components:{},
-		data(){
-			return{
-				hrimg:require('@/static/logo.png'),
-				list:[],
-				pageSize: 10,
-				pageNum: 1,
-				reachflag: true,
-				wtdt:'',
-			}
-		},
-		onLoad: function() {
-		
-		},
-		onPageScroll(e) {
-			var scrollTop = Number(e.scrollTop);
-			// var listTop=Number(this.listTop)-Number(this.nvaHeight)
-			if(scrollTop>2){
-				this.scroflag=true
-			}else{
-				this.scroflag=false
-			}
+  export default {
+	data(){
+		return{
+			headimg:require('@/static/logo.png'),
+		}
+	},
+	
+	methods:{
+		isWechat() {
+		    return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
 		},
-		// 上拉触底加载更多触发事件
-		onReachBottom() {
-			if (this.reachflag) {
-				this.pageNum++
-				this.getDataFn()
+
+		getDown(){
+			if (this.isWechat()) {
+			    uni.showToast({
+			        title: '点击右上角在浏览器中打开后下载',
+			        icon: 'none',
+			        duration: 3000
+			    })
+			    return
 			}
-		},
-		methods:{
-			checkPermi, checkRole,
-			// getNextFn(){
-			// 	this.$tab.navigateTo("/work/pages/business/add")
-			// },
-			getDataFn(){
-				var params={
-					pageSize:this.pageSize,
-					pageNum: this.pageNum,
-				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
-					if(res.code==200){
-						if (res.rows.length < this.pageSize) {
-							this.reachflag = false
-							this.wtdt = '到底了~';
-						} else {
-							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
-							if (num < res.total) {
-								this.reachflag = true
-								this.wtdt = ''
-							} else {
-								this.reachflag = false
-								this.wtdt = '到底了~';
-							}
-						}
-						if (this.pageNum == 1) {
-							this.list = res.rows;
-						} else {
-							this.list = this.list.concat(res.rows)
-						}
-					}else{
-						this.$toast(res.msg)
-					}
-				})
-				
-			},
+			var url=baseUrl+"/profile/upload/2024/12/13/__UNI__FA20DEF__20241213104242_20241213110828A036.apk";
+			let a = document.createElement('a');
+			a.setAttribute('href', url);
+			a.setAttribute('download', 'downapp');
+			a.innerHTML = "立即下载";
+			document.body.appendChild(a);
+			a.click();
+			a.remove()
 		}
-	}
+	},
+	onLoad: function() {
+			
+    },
+  }
 </script>
-<style>
-	page{background: #F3F3F0;}
-</style>
-<style lang="scss" scoped>
 
-</style>
+<style lang="scss" scoped>
+.headimg{width: 200rpx;height: 200rpx;margin:0 auto 40rpx;}
+.rbtn {font-size: 30rpx;
+		&.btn{background: #9a9c9e;color: #ffffff;}
+		&.btn2{background: $com-cd3;color: #ffffff;}
+      }
+</style>

+ 10 - 4
property_ui/pages/login.vue

@@ -11,12 +11,16 @@
 				<text class="btn-txt">微信一键登录</text>
 			</button>
 			<!-- #endif -->
-			<button type="primary" class=" rbtn" @click="getlogin">
+			<button type="primary" class=" rbtn" @click="getlogin(1)">
 				<image :src="zhtab" class="zhtab"></image>
 				<text class="btn-txt">账号密码登录</text>
 			</button>
+			<button type="primary" class=" rbtn" @click="getlogin(2)">
+				<image :src="yzmtab" class="yzmtab"></image>
+				<text class="btn-txt">短信验证码登录 </text>
+			</button>
 			<view class="line"></view>
-			<!-- <view class="rbtn btna" @click="getregister">还没账号?去注册</view> -->
+			<view class="rbtn btna" @click="getregister">还没账号?去注册</view>
 		</view>
 
 		
@@ -41,6 +45,7 @@
 				fbg: require('@/static/images/mine/fbg.png'),
 				vxtab: require('@/static/images/mine/vxtab.png'),
 				zhtab: require('@/static/images/mine/zhtab.png'),
+				yzmtab: require('@/static/images/mine/yzmtab.png'),
 				fbg: require('@/static/images/mine/fbg.png'),
 				headimg: require('@/static/logo.png'),
 				typeflag: false,
@@ -57,8 +62,8 @@
 			handlePrivacy() {
 				this.$tab.navigateTo(`/pages/agreement`)
 			},
-			getlogin(){
-				this.$tab.navigateTo(`/pages/tlogin`)
+			getlogin(e){
+				this.$tab.navigateTo(`/pages/tlogin?type=${e}`)
 			},
 			getregister(){
 				this.$tab.navigateTo(`/pages/register`)
@@ -147,6 +152,7 @@
 border-radius: 10rpx;
 	.vxtab{width: 38rpx;height: 32rpx;margin-right: 18rpx;}
 	.zhtab{width: 30rpx;height: 34rpx;margin-right: 22rpx;}
+	.yzmtab{width: 30rpx;height: 25rpx;margin-right: 22rpx;}
 	&.btna{background: #D9E6FF;color: #0156FE;}
 }
 .line{width: 60rpx;height: 6rpx;background: #CDCDCD;margin: 0 auto 60rpx;}

+ 26 - 21
property_ui/pages/register.vue

@@ -16,7 +16,7 @@
 		  	  		<view class="login_tit">账号</view>
 		  	  		<view class="login_box">
 		  	  			<!-- <view class="login_boxl">+86</view> -->
-		  	  			 <input  v-model="datainfo.username" class="input" type="text" placeholder="请输入登录账号" maxlength="30" />
+		  	  			 <input  v-model="datainfo.phonenumber" class="input" type="text" placeholder="请输入登录账号" maxlength="30" />
 		  	  		</view>
 		  	  	</view>
 				<view  class="input-item">
@@ -27,13 +27,13 @@
 						 <view v-else class="codess" @click="getsendCode">发送验证码</view>
 					 </view>
 				</view>
-		  	  	<view class="input-item" >
+		  	  	<!-- <view class="input-item" >
 		  	  		<view class="login_tit">密码</view>
 		  	  		 <view class="login_box">
 		  	  			 <uni-easyinput :inputBorder="false" type="password" v-model="datainfo.password" placeholder="请输入密码" />
 		  	  		 </view>
 		  	  	</view>
-				<view class="titico">*密码必须包含数字、大小写字母、特殊符号且大于8位</view>
+				<view class="titico">*密码必须包含数字、大小写字母、特殊符号且大于8位</view> -->
 		  	  	<!-- <view class="input-item flex align-center" style="width: 60%;margin: 0px;margin-bottom: 24rpx;" v-if="captchaEnabled">
 		  	  	  <input v-model="tucode" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
 		  	  	  <view class="login-code"> 
@@ -41,8 +41,8 @@
 		  	  	  </view  >
 		  	  	</view> -->
 		  	  	
-		  	    <button v-if="captchaEnabled"  type="primary" class=" rbtn " :class="tucode&&datainfo.username&&datainfo.password?'btn2':'btn'"  @click="getRegisterFn">注册</button>
-		  	    <button v-else type="primary" class=" rbtn" :class="datainfo.username&&datainfo.password?'btn2':'btn'"   @click="getRegisterFn">注册</button>
+		  	    <button v-if="captchaEnabled"  type="primary" class=" rbtn " :class="tucode&&datainfo.phonenumber?'btn2':'btn'"  @click="getRegisterFn">注册</button>
+		  	    <button v-else type="primary" class=" rbtn" :class="datainfo.phonenumber?'btn2':'btn'"   @click="getRegisterFn">注册</button>
 		  	  </view>
 		  	  
 		  	  <!-- 账号密码登录 -->
@@ -57,17 +57,19 @@
 		    </view>
 	  </view>
 	  <loading></loading>
-	  <!-- <view class="rtxt" @click="getregister">还没账号?去申请注册</view> -->
+	  <view class="rtxt" @click="getregister">还没账号?去申请注册</view>
   </view>
 </template>
 
 <script>
-	import {getRegisterFn,sendSmszcOnly} from "@/api/login.js"
+	import {register,sendSmsCode} from "@/api/login.js"
 	import { getToken } from '@/utils/auth'
+	import config from '@/config'
   export default {
 	  components:{
 		  
 	  },
+	  //5243
 	data(){
 		return{
 			lbg:require('@/static/images/mine/lbg.png'),
@@ -84,9 +86,12 @@
 			time:'',
 			timefalg:'',
 			datainfo: {
-				username: "",
+				phonenumber: "",
 				code: "",
-				password:'',
+				tenantId:'',
+				clientId:config.Clientid,
+				grantType:'sms',
+				userType:'app_user'
 			},
 			timer:""
 		}
@@ -102,23 +107,22 @@
 		// 获取短信验证码
 		getsendCode(){
 			var that=this;
-			if (!this.datainfo.username ) {
+			if (!this.datainfo.phonenumber ) {
 				that.$toast("请输入手机号")
 				return
 			}
 			let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
 			// 座机号
 			let reg1=/^(0\d{2,3})-?(\d{7,8})$/
-			if (this.datainfo.username && !regphone.test(this.datainfo.username)) {
+			if (this.datainfo.phonenumber && !regphone.test(this.datainfo.phonenumber)) {
 				that.$toast("请输入正确的手机号")
 				return
 			}
 			var params={
-				'username':this.datainfo.username
+				'phonenumber':this.datainfo.phonenumber,
+				'type':'2',//1:登录 2:注册 3:修改密码
 			}
-				// getSMS();
-				return
-			sendSmszcOnly(params).then(res=>{
+			sendSmsCode(params).then(res=>{
 				if (res.code == 200) {
 					// 发送验证码
 					that.$toast("发送成功")
@@ -160,12 +164,13 @@
 						this.$toast('请输入正确的手机号')
 						return
 					}
-					if(!params.password){
-						this.$toast("请输入密码")
-						return
-					}
-					params.userName=params.phonenumber;
-					getRegisterFn(params).then(res=>{
+					// if(!params.password){
+					// 	this.$toast("请输入密码")
+					// 	return
+					// }
+					params.code=this.duancode;
+					params.tenantId='';
+					register(params).then(res=>{
 						if(res.code==200){
 							that.$toast("注册成功")
 							setTimeout(function(){

+ 133 - 48
property_ui/pages/tlogin.vue

@@ -7,7 +7,7 @@
 		  <view class="head">
 		  	<view class="htit">你好,</view>
 		  	<view class="htit">欢迎登录智慧社区平台</view>
-		  	<!-- <view class="htxt" @click="getregister">还没有账号?<text>立即注册</text></view> -->
+		  	<view class="htxt" @click="getregister">还没有账号?<text>立即注册</text></view>
 		  </view>
 		    <view class="flex1" style="position: relative;">
 		  
@@ -19,16 +19,17 @@
 		  		 
 		  	  </view> -->
 		  	  <!-- 手机号登录 -->
-		  	  <view class="login-form-content" v-if="tabidx!=1">
+		  	  <view class="login-form-content">
 		  
-		  	  	<view class="input-item">
-		  	  		<view class="login_tit">账号</view>
-		  	  		<view class="login_box">
-		  	  			<!-- <view class="login_boxl">+86</view> -->
-		  	  			 <input  v-model="loginForm.username" class="input" type="text" placeholder="请输入登录账号" maxlength="30" />
-		  	  		</view>
-		  	  	</view>
-		  	  	<block v-if="tabidx==2">
+		  	  	
+		  	  	<block v-if="tabidx==1">
+					<view class="input-item">
+						<view class="login_tit">账号</view>
+						<view class="login_box">
+							<!-- <view class="login_boxl">+86</view> -->
+							 <input  v-model="loginForm.username" class="input" type="text" placeholder="请输入登录账号" maxlength="30" />
+						</view>
+					</view>
 		  	  		<view class="input-item" >
 		  				<view class="flexcj">
 		  					<view class="login_tit">密码</view>
@@ -53,25 +54,34 @@
 		  	  		    <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
 		  	  		  </view  >
 		  	  		</view>
-		  	  		 
+					<button v-if="captchaEnabled"  type="primary" class=" rbtn" :class="tucode&&loginForm.username&&loginForm.password?'btn2':'btn'"  @click="getLogin">登录</button>
+					<button v-else type="primary" class=" rbtn " :class="loginForm.username&&loginForm.password?'btn2':'btn'"   @click="getLogin">登录</button>
 		  	  	</block>
-		  	  	<!-- <view v-if="tabidx==0" class="input-item" style="margin-bottom: 24rpx;" >
-		  	  		<view class="login_tit">验证码</view>
-		  	  		 <view style="display: flex;align-items: center;">
-		  	  			 <input v-model="duancode" type="code" class="input" placeholder="请输入短信验证码" maxlength="20" />
-		  	  			 <view v-if="timefalg" class="codes">重新发送{{time}}s</view>
-		  	  			 <view v-else class="codess" @click="getsendCode">发送验证码</view>
-		  	  		 </view>
-		  	  	</view> -->
-		  	    <button v-if="captchaEnabled"  type="primary" class=" rbtn" :class="tucode&&loginForm.username&&loginForm.password?'btn2':'btn'"  @click="getLogin">登录</button>
-		  	    <button v-else type="primary" class=" rbtn " :class="loginForm.username&&loginForm.password?'btn2':'btn'"   @click="getLogin">登录</button>
+				<block v-if="tabidx==2">
+					<view class="input-item">
+						<view class="login_tit">手机号码</view>
+						<view class="login_box">
+							<!-- <view class="login_boxl">+86</view> -->
+							 <input  v-model="loginForm.username" class="input" type="text" placeholder="请输入手机号码" maxlength="30" />
+						</view>
+					</view>
+					<view  class="input-item" style="margin-bottom: 24rpx;" >
+						<view class="login_tit">验证码</view>
+						 <view style="display: flex;align-items: center;">
+							 <input v-model="duancode" type="code" class="input" placeholder="请输入短信验证码" maxlength="20" />
+							 <view v-if="timefalg" class="codes">重新发送{{time}}s</view>
+							 <view v-else class="codess" @click="getsendCode">发送验证码</view>
+						 </view>
+					</view>
+					<button  type="primary" class=" rbtn mb24 mt50" :class="loginForm.username&&duancode?'btn2':'btn'"   @click="getLogin">登录</button>
+				</block>
 		  	  </view>
 		  	  <!-- 微信登录 -->
-		  	  <block v-if="tabidx==1">
+		  	 <!-- <block v-if="tabidx==1">
 		  		  <button  type="primary" class="rbtn" open-type="getUserInfo" @getuserinfo="getuserinfo" >
 		  		  	<text class="btn-txt">快捷登录</text>
 		  		  </button>
-		  	  </block>
+		  	  </block> -->
 		  	  
 		  	  
 		  	  <!-- 账号密码登录 -->
@@ -93,10 +103,11 @@
 
 <script>
 	import * as base64 from "base-64"
-	import {getweChatLogin,getInfo,getweChatOpenid,getCodeImg,getCode,sendSmsOnly} from "@/api/login.js"
+	import {getweChatLogin,getInfo,getweChatOpenid,getCodeImg,getCode,sendSmsCode} from "@/api/login.js"
 	import {getUserProfile} from "@/api/system/user.js"
 	import { getToken } from '@/utils/auth'
 	import phoneBtn from "@/components/toptab/phonebtn.vue"
+	import config from '@/config'
   export default {
 	  components:{
 		  phoneBtn
@@ -121,13 +132,15 @@
 			codeUrl:'',
 			time:'',
 			timefalg:'',
-			tabidx:2,
-			tablist:[{tit:'微信登录',val:1},{tit:'密码登录',val:2},],
+			tabidx:1,
+			tablist:[{tit:'密码登录',val:1},{tit:'验证码登录',val:2},],
 			loginForm: {
 				username: "",
 				code: "",
 				password:'',
+				clientId:config.Clientid,
 			},
+			//sms
 			voList:[],
 			voindex:0,
 			jzflag:false
@@ -142,11 +155,18 @@
 		// 获取图形验证码
 		getCode() {
 		  getCodeImg().then(res => {
-		    this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
-		    if (this.captchaEnabled) {
-		      this.codeUrl = 'data:image/gif;base64,' + res.img
-		      this.loginForm.uuid = res.uuid
-		    }
+			  // 租户
+			this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled
+			if (this.captchaEnabled) {
+			  this.codeUrl = 'data:image/gif;base64,' + res.data.img
+			  this.loginForm.uuid = res.data.uuid
+			}
+			// 单个
+			// this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
+			// if (this.captchaEnabled) {
+			//   this.codeUrl = 'data:image/gif;base64,' + res.img
+			//   this.loginForm.uuid = res.uuid
+			// }
 		  })
 		},
 		getForget(){
@@ -158,9 +178,28 @@
 			 // this.$tab.navigateTo(`/mine/pages/mine/auth`)
 		 },
 		 getLogin(){
-			 if(!this.loginForm.username||!this.loginForm.password||(!this.tucode&& this.captchaEnabled)){
-			 	 return
-			 }
+			if(this.tabidx==1){
+				if(!this.loginForm.username||!this.loginForm.password||(!this.tucode&& this.captchaEnabled)){
+					return
+				}
+				this.loginForm.code=this.tucode;
+				this.loginForm.grantType='password';
+			}else{
+				let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
+				// 座机号
+				if (this.loginForm.username && !regphone.test(this.loginForm.username)) {
+					this.$toast("请输入正确的手机号")
+					return
+				}
+				if(!this.loginForm.username||!this.duancode){
+					 return
+				}
+				this.loginForm.password='';
+				this.loginForm.code=this.duancode;
+				this.loginForm.grantType='sms';
+				// this.loginForm.type=
+			}
+			 
 			// let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
 			// if(!regphone.test(this.loginForm.username)){
 			// 	this.$toast('请输入正确的手机号')
@@ -170,13 +209,14 @@
 			 // 	this.$toast("请同意用户协议")
 			 // 	return
 			 // }
-			 this.loginForm.code=this.tucode;
+			 console.log(this.loginForm)
 			 this.pwdLogin()
 		 },
 		 // 密码登录
 		 async pwdLogin() {
 		 	var that=this;
-			
+			console.log(this.loginForm)
+			// return
 		   this.$store.dispatch('Login', this.loginForm).then((res) => {
 			   // 判断是否记住密码
 			  if(that.jzflag){
@@ -197,7 +237,7 @@
 		     
 		   }).catch((error) => {
 		    setTimeout(function(){
-		 		if (that.captchaEnabled&&that.tabidx==2) {
+		 		if (that.captchaEnabled&&that.tabidx==1) {
 		 			that.getCode()
 				}
 		 	},1000)
@@ -211,6 +251,49 @@
 		 },
 		 btns() {
 		 	
+		 },
+		 // 获取短信验证码
+		 getsendCode(){
+		 	var that=this;
+		 	if (!this.loginForm.username ) {
+		 		that.$toast("请输入手机号")
+		 		return
+		 	}
+		 	let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
+		 	// 座机号
+		 	let reg1=/^(0\d{2,3})-?(\d{7,8})$/
+		 	if (this.loginForm.username && !regphone.test(this.loginForm.username)) {
+		 		that.$toast("请输入正确的手机号")
+		 		return
+		 	}
+		 	var params={
+		 		phonenumber:this.loginForm.username,
+				type:1,//1:登录 2:注册 3:修改密码
+		 	}
+		 	sendSmsCode(params).then(res=>{
+		 		if (res.code == 200) {
+		 			// 发送验证码
+		 			that.$toast("发送成功")
+		 			that.time=60;
+		 			that.timefalg=true;
+		 			that.setTimein()
+		 		} else {
+		 			that.$toast(res.msg)
+		 		}
+		 	})
+		 },
+		 // 验证码倒计时
+		 setTimein(){
+		 	var that=this;
+		 	clearInterval(that.timer)
+		 	that.timer=setInterval(()=>{
+		 		if(that.time<=1){
+		 			that.timefalg=false;
+		 			that.time=60;
+		 			clearInterval(that.timer)
+		 		}
+		 		that.time=that.time-1;
+		 	},1000)
 		 },
 		 getPhoneNumber(data){
 			 var that=this;
@@ -266,7 +349,8 @@
 		 },
 	},
 	
-	onLoad: function() {
+	onLoad: function(e) {
+		this.tabidx=e.type;
 		this.getCode()
 		if (getToken()) {
 			this.$tab.reLaunch('/pages/index/index') 
@@ -279,13 +363,14 @@
 			// }else{
 			// 	this.checkflag=false
 			// }
-		  if(uni.getStorageSync('account')){
-		  	var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('account')))
-		  	this.loginForm.username=newObj.username;
-		  	this.loginForm.password=base64.decode(newObj.password);
-		  	this.jzflag=true;
-		  }
-		  
+			if(this.tabidx==1){
+				if(uni.getStorageSync('account')){
+					var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('account')))
+					this.loginForm.username=newObj.username;
+					this.loginForm.password=base64.decode(newObj.password);
+					this.jzflag=true;
+				}
+			}
 		}	
     },
   }
@@ -375,12 +460,12 @@ color: $com-cd3;text-align: center;}
     }
 // .image{width: 30rpx;height: 30rpx;margin-right: 14rpx;}
 .input_ye image{width: 34rpx;height: 18rpx;}
-.codess{font-size: 34rpx;color: $com-cd3;flex: 0 0 auto;min-width: 200rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
-.codes{background: none;font-size: 28rpx;flex: 0 0 auto;width: 180rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
+.codess{font-size: 30rpx;color: $com-cd3;flex: 0 0 auto;min-width: 200rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
+.codes{background: none;font-size: 30rpx;flex: 0 0 auto;width: 180rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
 .login_box{display: flex;align-items: center;}
 .login_boxl{width:130rpx;font-size: 34rpx;color: #343434;border-right: 2rpx solid #CDCDCD;}
 .login_txt{text-align: right;flex: 0 0 auto; padding:0 24rpx;
-	text{font-size: 30rrpx;color:#666666;}
+	text{font-size: 30rpx;color:#666666;}
 }
 .line{width: 2rpx;height: 24rpx;background: #CDCDCD;margin: 0 10rpx;}
 .login_jz{display: flex;align-items: center;justify-content: flex-end;flex: 0 0 auto;

+ 12 - 1
property_ui/people/components/car/list.vue

@@ -134,6 +134,11 @@
 				<view class="stalist">
 					<view class="imgs"><image :src="sfz" class="sfz"></image></view>{{ite.hideflag?ite.idCarda:ite.idCard}}
 				</view>
+				<view style="height: 20rpx;"></view>
+				<view class="pshbox flexc">
+					<view class="btna">拒绝</view>
+					<view class="btnb">同意</view>
+				</view>
 			</view>
 		</view>
 		<!-- 来访管理 -->
@@ -505,7 +510,7 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
 	}
 }
 // 维修人员
-.stafflist{width: 344rpx;min-height: 256rpx;background: #FFFFFF;border-radius: 20rpx;margin:0 12rpx 24rpx 12rpx;padding-bottom: 20rpx;box-sizing: border-box;
+.stafflist{width: 344rpx;min-height: 256rpx;background: #FFFFFF;border-radius: 20rpx;margin:0 12rpx 24rpx 12rpx;box-sizing: border-box;
 	// &:nth-of-type(2n){margin-right: 0;}
 	.statop{border-bottom: 2rpx solid #E5E5E5;display: flex;padding: 24rpx 24rpx 22rpx;
 		.head{width: 80rpx;height: 82rpx;margin-right: 24rpx;flex: 0 0 auto;}
@@ -529,6 +534,12 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
 			.neye{width: 24rpx;height: 24rpx;}
 		}
 	}
+	.pshbox{border-top: 2rpx solid #E5E5E5;
+		view{width: 50%;text-align: center;height: 72rpx;line-height: 72rpx;text-align: center;
+			&.btna{color: #FF6969;border-right: 2rpx solid #E5E5E5;}
+			&.btnb{color: #3565ED;}
+		}
+	}
 }
 .watopcom{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;padding-bottom: 30rpx !important;
 	.watopcoma{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}

+ 14 - 1
property_ui/people/pages/people/staff.vue

@@ -16,6 +16,9 @@
 					<view class="btn" @click="getConfirm">搜索</view>
 				</view>
 			</view>
+			<view class="tablst flexc">
+				<view class="tabs" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+			</view>
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
@@ -57,6 +60,8 @@
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
+				tabval:0,
+				tablist:[{tit:'待审核',val:0},{tit:'已审核',val:1},]
 			}
 		},
 		onUnload() {
@@ -78,6 +83,9 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			getTabFn(val){
+				this.tabval=val
+			},
 			init(){
 				// 员工类别
 				getDictionaryFn('yaungong').then(res=>{
@@ -201,7 +209,7 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
-.car{padding: 140rpx 0 10rpx;}
+.car{padding: 212rpx 0 10rpx;}
 .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
 	.topa{padding: 20rpx 20rpx 32rpx;
 		.resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
@@ -217,6 +225,11 @@ font-size: 26rpx;
 color: #FFFFFF;}
 		}
 	}
+	.tablst{background: #F3F3F0;padding:24rpx 16rpx 26rpx 30rpx;overflow: auto;
+		.tabs{height: 48rpx;background: #DADADA;border-radius: 24rpx;margin-right: 30rpx;font-weight: 500;display: flex;align-items: center;justify-content: center;padding: 0 24rpx;font-size: 26rpx;box-sizing: border-box;flex: 0 0 auto;color: #666666;
+			&.act{border: 2rpx solid #0256FD;background: #FFFFFF;color: #0256FD;}
+		}
+	}
 
 }
 .carlists{padding: 0 6rpx;}

+ 2 - 0
property_ui/service/components/popup/popup.vue

@@ -85,6 +85,7 @@
 	import config from '@/config'
 	const baseUrl = config.baseUrl
 	const baseName = config.baseName
+	const Clientid = config.Clientid
 	import { getToken } from '@/utils/auth'
 	import {uploadmore} from '@/utils/common.js'
 	import {selectDictValue} from "@/utils/common.js"
@@ -147,6 +148,7 @@
 				    header: {
 				        // 示例参数可删除
 				        'Authorization':  'Bearer ' + getToken(),
+						'Clientid':  Clientid,
 				    },
 				    // 根据你接口需求自定义body参数
 				    formData: {

二进制
property_ui/static/images/aup.png


二进制
property_ui/static/images/close.png


二进制
property_ui/static/images/home/htabk.png


二进制
property_ui/static/images/mine/yzmtab.png


二进制
property_ui/static/images/tiptit.png


+ 1 - 0
property_ui/store/getters.js

@@ -13,5 +13,6 @@ const getters = {
   deptName: state => state.user.deptName,
   deptId: state => state.user.deptId,
   loading: state => state.user.loading,
+  tenantId: state => state.user.tenantId,
 }
 export default getters

+ 23 - 4
property_ui/store/modules/user.js

@@ -5,6 +5,8 @@ import { login, logout, getInfo } from '@/api/login'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 
 const baseUrl = config.baseUrl
+const Clientid = config.Clientid
+const grantType = config.grantType
 
 const user = {
   state: {
@@ -22,6 +24,7 @@ const user = {
 	deptId: storage.get(constant.deptId),
 	deptName: storage.get(constant.deptName),
 	loading: false,
+	tenantId:storage.get(constant.tenantId),
   },
 
   mutations: {
@@ -34,6 +37,10 @@ const user = {
 		} */
 		state.loading = tf;
 	},
+	SET_TENANID: (state, tenantId) => {
+	  state.tenantId = tenantId
+	  storage.set(constant.tenantId, tenantId)
+	},
     SET_TOKEN: (state, token) => {
       state.token = token
     },
@@ -99,10 +106,18 @@ const user = {
       const code = userInfo.code
       const uuid = userInfo.uuid
 	  const strfrom = userInfo.strfrom||""
+	  // const tenantId = '000000'
+	  const tenantId = ''
+	  const clientId = Clientid
+	  const grantType = userInfo.grantType
+	  const phonenumber=userInfo.username.trim()
+	  const smsCode=userInfo.code
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
+        login(username, password, code, uuid,tenantId,clientId,grantType,phonenumber,smsCode).then(res => {
+          setToken(res.data.access_token)
+          commit('SET_TOKEN', res.data.access_token)
+		  // setToken(res.token)
+		  // commit('SET_TOKEN', res.token)
 			commit('SET_AUTOLOGIN',true)
           resolve()
         }).catch(error => {
@@ -137,12 +152,15 @@ const user = {
     // 获取用户信息require("@/static/images/profile.jpg")
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
-        getInfo().then(res => {
+        getInfo().then(resd => {
+          const res = resd.data
+          // const res = resd;
           const user = res.user
           const avatar = (user == null || user.avatar == "" || user.avatar == null) ? '' :  user.avatar
           const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
 		  const nickName = (user == null || user.nickName == "" || user.nickName == null) ? "" : user.nickName
 		  const userId = (user == null || user.userId == "" || user.userId == null) ? "" : user.userId
+		   const tenantId = (user == null || user.tenantId == "" || user.tenantId == null) ? "" : user.tenantId
 		  const phonenumber = (user == null || user.phonenumber == "" || user.phonenumber == null) ? "" : user.phonenumber
 		  const deptId = (user == null || user.deptId == "" || user.deptId == null) ? "" : user.deptId
 		  const deptName = (user == null || user.dept == "" || user.dept == null||user.dept.deptName==''||user.dept.deptName==null) ? "" : user.dept.deptName
@@ -168,6 +186,7 @@ const user = {
 		  commit('SET_NICKNAME', nickName)
           commit('SET_AVATAR', avatar)
 		  commit('SET_USERID', userId)
+		  commit('SET_TENANID', tenantId)
 		  commit('SET_PHONENUMBER', phonenumber)
 		  commit('SET_DEPTID', deptId)
 		  commit('SET_DEPNAME', deptName)

+ 3 - 0
property_ui/utils/common.js

@@ -3,6 +3,7 @@ import { getToken } from '@/utils/auth'
 import errorCode from '@/utils/errorCode'
 let timeout = 10000
 const baseUrl = config.baseUrl
+const clientid = config.Clientid
 /**
 * 显示消息提示框
 * @param content 提示的标题
@@ -121,6 +122,7 @@ export function uploadIdentify(api, filePaths, successUp, failUp, i, length, fil
 	config.header = config.header || {}
 	if (getToken() && !isToken) {
 	  config.header['Authorization'] = 'Bearer ' + getToken()
+	  config.header['clientid']=clientid;
 	}
 	// get请求映射params参数
 	if (config.params) {
@@ -192,6 +194,7 @@ export function uploadmore(api, filePaths, successUp, failUp, i, length, files,
 	config.header = config.header || {}
 	if (getToken() && !isToken) {
 	  config.header['Authorization'] = 'Bearer ' + getToken()
+	  config.header['clientid']=clientid;
 	}
 	// get请求映射params参数
 	if (config.params) {

+ 2 - 0
property_ui/utils/request.js

@@ -7,6 +7,7 @@ import { toast, showConfirm, tansParams } from '@/utils/common'
 // import vues from '@/main.js'
 let timeout = 60000
 const baseUrl = config.baseUrl
+const Clientid = config.Clientid
 var confirmflag = config.confirmflag
 // 获取账号密码
 var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('account')))
@@ -22,6 +23,7 @@ const request = config => {
   config.header = config.header || {}
   if (getToken() && !isToken) {
     config.header['Authorization'] = 'Bearer ' + getToken()
+	config.header['Clientid'] = Clientid
   }
   // get请求映射params参数
   if (config.params) {

+ 77 - 26
property_ui/work/components/car/list.vue

@@ -11,36 +11,46 @@
 					<image :src="houseb" class="imgs" v-if="ite.houseStatus==2"></image>
 					<image :src="housec" class="imgs" v-if="ite.houseStatus==3"></image>
 					<view class="tit">{{ite.communityName}}{{ite.detailedAddress}}</view>
-					<!-- view class="btn btnbga">预约</view>
-					<view class="btn btnbgb">已来访</view>
-					<view class="btn btnbgc">待来访</view> -->
 					<view class="flex1"></view>
-					<view class="txt ca" v-if="ite.houseStatus==1">自住</view>
-					<view class="txt cb" v-if="ite.houseStatus==4">出租</view>
-					<view class="txt cc" v-if="ite.houseStatus==2">空闲</view>
-					<view class="txt co6" v-if="ite.houseStatus==3">代售</view>
+					<block v-if="tabval=='-1'">
+						<view class="shbtn btna" @click="getSh('3',ite)">拒绝</view>
+						<view class="shbtn btnb" @click="getSh('2',ite)">通过</view>
+					</block>
+					<block v-else>
+						<view class="txt ca" v-if="ite.houseStatus==1">自住</view>
+						<view class="txt cb" v-if="ite.houseStatus==4">出租</view>
+						<view class="txt cc" v-if="ite.houseStatus==2">空闲</view>
+						<view class="txt co6" v-if="ite.houseStatus==3">代售</view>
+					</block>
 				</view>
-				<view class="clists">
+				<view class="clists" v-if="tabval=='-1'">
 					<view class="clist"><view class="tit">房屋坐落</view>{{ite.location}}</view>
-					<view class="clist"><view class="tit">建筑面积</view>{{ite.area}}m²</view>
-					<!-- <view class="w50 flexc">
-						<view class="clist"><view class="tit">房屋所属</view>袁玥</view>
-						<view class="clist"><view class="tit">建筑面积</view>121.3m²</view>
-					</view>
 					<view class="w50 flexc">
-						<view class="clist"><view class="tit">房型</view>3室1厅</view>
-						<view class="clist"><view class="tit">居住人口</view>3口人</view>
+						<view class="clist"><view class="tit">房屋状态</view>
+							<view class="txtb ca" v-if="ite.houseStatus==1">自住</view>
+							<view class="txtb cb" v-if="ite.houseStatus==4">出租</view>
+							<view class="txtb cc" v-if="ite.houseStatus==2">空闲</view>
+							<view class="txtb co6" v-if="ite.houseStatus==3">代售</view>
+						</view>
+						<view class="clist"><view class="tit">房屋所属</view>{{ite.ownerName}}</view>
 					</view>
 					<view class="w50 flexc">
-						<view class="clist"><view class="tit">有无车位  </view>有</view>
-					</view> -->
-					<!-- <view class="clist"><view class="tit">手机号码</view>13656788668</view> -->
-				</view>
-				<view class="btns flexc">
-					<view class="bga" v-if="checkPermi(['wuYe:houseInfo:edit'])" @click.stop="getPut(ite.houseId)">编辑信息</view>
-					<view class="bgb" v-if="checkPermi(['wuYe:residentInfo:list'])" @click.stop="getJuzhu(ite.houseId)">居住信息</view>
-					<view class="bgc" v-if="checkPermi(['wuYe:car:list'])" @click.stop="getCar(ite.houseId)"> 车辆信息</view>
+						<view class="clist"><view class="tit">建筑面积</view>{{ite.area}}m²</view>
+						<view class="clist"><view class="tit">有无车位  </view>{{ite.hasParkingSpace=='Y'?'有':'无'}}</view>
+					</view>
 				</view>
+				<block v-else>
+					<view class="clists">
+						<view class="clist"><view class="tit">房屋坐落</view>{{ite.location}}</view>
+						<view class="clist"><view class="tit">建筑面积</view>{{ite.area}}m²</view>
+						<!-- <view class="clist"><view class="tit">手机号码</view>13656788668</view> -->
+					</view>
+					<view class="btns flexc">
+						<view class="bga" v-if="checkPermi(['wuYe:houseInfo:edit'])" @click.stop="getPut(ite.houseId)">编辑信息</view>
+						<view class="bgb" v-if="checkPermi(['wuYe:residentInfo:list'])" @click.stop="getJuzhu(ite.houseId)">居住信息</view>
+						<view class="bgc" v-if="checkPermi(['wuYe:car:list'])" @click.stop="getCar(ite.houseId)"> 车辆信息</view>
+					</view>
+				</block>
 			</view>
 		</block>
 		<block v-if="type=='mycar'">
@@ -209,10 +219,15 @@
 			type:{
 				type:String,
 				default () {
-					return 0
+					return ''
 				}
 			},
-				
+			tabval:{
+				type:String,
+				default () {
+					return ''
+				}
+			},	
 			clcxList:{
 				type:Array,
 				default () {
@@ -286,6 +301,32 @@
 				// this.datainfo.splice(idx,1,obj);
 				this.datainfo[idx].zhanflag=!this.datainfo[idx].zhanflag
 			},
+			getSh(type,ite){
+				var that=this;
+				var str="";
+				if(type=='2'){
+					str="通过"
+				}else if(type=='3'){
+					str="拒绝"
+				}
+				uni.showModal({
+					title: '确认'+str,
+					content: "是否确认"+str,
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							// var obj={
+							// 	status:type,
+							// 	contentId:ite.contentId,
+							// 	commentId:ite.commentId,
+							// }
+							// that.$emit('getSh',obj)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
 			getDelFn(id){
 				var that=this;
 				uni.showModal({
@@ -437,7 +478,17 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
 }
 .houselist{
 	.clists{padding-bottom: 2rpx !important;}
-	.clist{margin-bottom: 22rpx !important;}
+	.clist{margin-bottom: 22rpx !important;
+		.txtb{font-weight: 500;font-size:24rpx;
+			&.ca{color: #3565ED;}
+			&.cb{color: #FE5A0E;}	
+			&.cc{color: #28C529;}
+		}
+	}
+	.shbtn{border-radius: 20rpx;font-weight: 500;min-width: 92rpx;height: 40rpx;font-size: 26rpx;box-sizing: border-box;padding: 0 20rpx;line-height: 38rpx;margin-left: 24rpx;
+		&.btna{border: 2rpx solid #FF6969;background: #FFF8F8;color: #FF6969;}
+		&.btnb{border: 2rpx solid #28C529;background: #EEFCEE;color: #28C529;}
+	}
 	.btns{justify-content: flex-end;
 		view{min-width: 156rpx;font-weight: 500;font-size: 26rpx;margin-right: 24rpx;border-radius: 20rpx;padding: 6rpx 8rpx;box-sizing: border-box;text-align: center;margin-bottom: 26rpx;
 			&.bga{border: 2rpx solid #FE5A0E;background: #FFF8F5;color: #FE5A0E;}

+ 36 - 9
property_ui/work/pages/manage/house.vue

@@ -16,13 +16,18 @@
 					<view class="btn" @click="getConfirm">搜索</view>
 				</view>
 			</view>
-			<view class="tabtop flexc">
-				<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+			<view class="tabtopa">
+				<view class="tabtop flexc">
+					<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+					
+				<view class="tabbtn">未通过审核</view>
+			</view>
+			
 			</view>
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :wtdt="wtdt" type='comehouse' @getDetail="getDetail" @getPut="getPut" @getJuzhu="getJuzhu" @getCar="getCar"></car-list>
+			<car-list :datainfo="list" :wtdt="wtdt" :tabval="tabval" type='comehouse' @getDetail="getDetail" @getPut="getPut" @getJuzhu="getJuzhu" @getCar="getCar" @getSh="getSh"></car-list>
 		</view>
 		<view class="cdbtns">
 			<!-- <view class="btna" @click="getAddFn">单个添加</view>
@@ -56,7 +61,7 @@
 				reachflag: true,
 				wtdt:'',
 				tabval:'-1',
-				tablist:[{tit:"全部",val:'-1'},],
+				tablist:[{tit:"待审核",val:'-1'}],
 				fwztList:[],
 			}
 		},
@@ -101,7 +106,13 @@
 				this.$tab.navigateTo("/work/pages/manage/houseadd")
 			},
 			getDetail(e){
-				this.$tab.navigateTo("/work/pages/manage/addhouse?id="+e)
+				var tabval=this.tabval;
+				if(tabval=='-1'){
+					this.$tab.navigateTo(`/work/pages/manage/housedetail?id=${e}`)
+				}else{
+					this.$tab.navigateTo("/work/pages/manage/addhouse?id="+e)
+				}
+				
 			},
 			getPut(e){
 				this.$tab.navigateTo("/work/pages/manage/addhouse?id="+e)
@@ -109,6 +120,18 @@
 			getCar(e){
 				this.$tab.navigateTo("/work/pages/manage/car?id="+e)
 			},
+			getSh(e){
+				var that=this;
+				var params=JSON.parse(JSON.stringify(data))
+				// commentContentPut(params).then(res=>{
+				// 	if(res.code==200){
+				// 		this.$toast('审核成功')
+				// 		setTimeout(function() {
+				// 			that.getrefreshData()
+				// 		}, 1500);
+				// 	}
+				// })
+			},
 			getJuzhu(e){
 				var data={
 					id:e,
@@ -198,13 +221,17 @@ font-size: 26rpx;
 color: #FFFFFF;}
 		}
 	}
-	.tabtop{padding-bottom: 40rpx;
-		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;margin-right: 6rpx;
-			&.act{font-weight: bold;font-size: 32rpx;color: #272727;
-			&::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
+	.tabtopa{padding-right: 180rpx;position: relative;
+		.tabtop{padding-bottom: 40rpx;overflow: auto;
+			.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;margin-right: 6rpx;flex: 0 0 auto;
+				&.act{font-weight: bold;font-size: 32rpx;color: #272727;
+				&::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
+				}
 			}
 		}
+		.tabbtn{border-radius: 58rpx 0 0 58rpx;background: #E6E6E6;padding: 0 18rpx 0 26rpx;font-weight: 500;font-size: 26rpx;color: #3565ED;line-height: 58rpx;position: absolute;right: 0;top: 0;}
 	}
+	
 }
 .cdbtns{position: fixed;left: 0;right: 0;height: 98rpx;z-index: 2;display: flex;align-items: center;bottom: 0;
 	view{flex: 1;display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 26rpx;height: 98rpx;

+ 424 - 0
property_ui/work/pages/manage/housedetail.vue

@@ -0,0 +1,424 @@
+<template>
+	<view class="check">
+		<view class="cbox">
+			<view class="chtop flexc">
+				<view class="line"></view>
+				<view>房屋信息</view>
+			</view>
+			<view class="chmain">
+				<uni-forms ref="form" :model="datainfo" :rules="rules">
+				  <uni-forms-item label="房屋坐落" required name="location">
+					  <view class="flexc">
+					  	<uni-easyinput :disabled="isdisabled" v-model="datainfo.location" :inputBorder='false' placeholder="" />
+					  	<view class="rimg"></view>
+					  </view>
+				  </uni-forms-item>
+					<uni-forms-item label="权利人姓名" name="ownerName">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.ownerName" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="权利类型" name="rightType">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="qllxidx" :range="qllxList"   @change='bindDateChange'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.rightType&&!qllx">{{statusFormats(datainfo.rightType,qllxList,'qllx')}}</view>
+								<view class="flex1 txr f13" v-else :class="qllx?'co27':'coa'">{{qllx||""}}</view>
+								<view class="rimg"></view>
+								<!-- <image :src="rimg"></image> -->
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="建筑面积" required name="area">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.area" :inputBorder='false' placeholder="" />
+							<view class="tips">m²</view>
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="不动产单元号" name="propertyUnitNumber">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.propertyUnitNumber" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="相关的字第号" name="documentNumber">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.documentNumber" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="小区名称" name="communityName">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.communityName" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="门牌号" required name="detailedAddress">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.detailedAddress" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="使用期限" name="usagePeriod">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.usagePeriod" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="登记日期" name="registrationDate">
+						<view class="flexc">
+							<uni-datetime-picker  :disabled="isdisabled" :class="datainfo.registrationDate?'co27':'coa'" type="datetime" placeholder=" " :border="false"  v-model="datainfo.registrationDate" @change="changeLog" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					
+					<uni-forms-item label="共有姓名" name="coOwner">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.coOwner" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="共有情况" name="coOwnership">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.coOwnership" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="房屋状态" name="houseStatus">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="fwztidx" :range="fwztList"   @change='bindDateChangeb'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.houseStatus&&!fwzt">{{statusFormats(datainfo.houseStatus,fwztList,'fwzt')}}</view>
+								<view class="flex1 txr f13" v-else :class="fwzt?'co27':'coa'">{{fwzt||""}}</view>
+								<view class="rimg"></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="房屋用途" name="usageType">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="fwytidx" :range="fwytList"   @change='bindDateChangec'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.usageType&&!fwyt">{{statusFormats(datainfo.usageType,fwytList,'fwyt')}}</view>
+								<view class="flex1 txr f13" v-else :class="fwyt?'co27':'coa'">{{fwyt||""}}</view>
+								<view class="rimg"></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="有无车位" name="hasParkingSpace">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="ywcwidx" :range="ywcwList"   @change='bindDateChanged'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.hasParkingSpace&&!ywcw">{{statusFormats(datainfo.hasParkingSpace,ywcwList,'ywcw')}}</view>
+								<view class="flex1 txr f13" v-else :class="ywcw?'co27':'coa'">{{ywcw||""}}</view>
+								<view class="rimg"></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="车位号" name="parkingNumber">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.parkingNumber" :inputBorder='false' placeholder="" />
+							<view class="rimg"></view>
+						</view>
+					</uni-forms-item>
+				</uni-forms>
+				<view class="hfbtns flexcj">
+					<view class="btn btn1" >拒绝</view>
+					<view class="btn btn2" >通过</view>
+				</view>
+			</view>
+		</view>
+		<loading></loading>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {uploadIdentify,selectValueKey,geocodeAddress} from '@/utils/common.js'
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {houseInfoAdd,houseInfoPut,houseInfoDet} from "@/api/work/work.js"
+	export default{
+		components:{},
+		data(){
+			return{
+				rimg: require('@/mine/static/house/rimg.png'),
+				cmico:require('@/mine/static/house/cmico.png'),
+				baseUrl:config.baseUrl,
+				datainfo:{
+					 // "houseId":"",//房屋信息主键
+					 "ownerName":"",//权利人姓名
+					 "location":"",//房屋坐落位置
+					 "rightType":"",//权利类型,如所有权、使用权等
+					 "area":"",//房屋面积,单位为平方米
+					 "documentNumber":"",//房屋相关的字第号
+					 "propertyUnitNumber":"",//不动产单元号
+					 "coOwnership":"",//房屋的共有情况,如共有比例等
+					 "usageType":"",//房屋用途,如住宅、商业等
+					 "usagePeriod":"",//房屋使用期限
+					 "registrationDate":"",//房屋登记日期
+					 "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
+					 "detailedAddress":"",//房屋的详细门牌号
+					 "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
+					 "communityName":"",//房屋所在小区名称
+					 "houseStatus":"",//房屋状态:1-自住,2-出租,3-空闲,4-待售
+					 "parkingNumber":'',//车位号
+				},
+				rules: {
+				  location: {rules: [{required: true,errorMessage: '请输入房屋坐落位置' }]},
+				  detailedAddress: {rules: [{required: true,errorMessage: '请输入详细门牌号' }]},
+				  area: {rules: [{required: true,errorMessage: '请输入面积' }]},
+				},
+				id:'',
+				ptype:'add',
+				fwzt:'',
+				qllx:'',
+				fwyt:'',
+				ywcw:'',
+				fwztidx:'',
+				qllxidx:'',
+				fwytidx:'',
+				ywcwidx:'',
+				fwztList:[],
+				qllxList:[],
+				fwytList:[],
+				ywcwList:[{dictLabel:'有',dictValue:'Y'},{dictLabel:'无',dictValue:'N'},],
+				isdisabled:true,
+				latitude:'',
+				longitude:"",
+				starttime:'',
+			}
+		},
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.ptype="edit";
+				// this.isdisabled=true;
+				this.getDetail()
+			}
+			this.init()
+		},
+		methods:{
+			checkPermi, checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='qllx'){
+					this.qllxidx=aite.key;
+				}else if(type=='fwzt'){
+					this.fwztidx=aite.key;
+				}else if(type=='fwyt'){
+					this.fwytidx=aite.key;
+				}else if(type=='ywcw'){
+					this.ywcwidx=aite.key;
+				}
+				return aite.actions;
+			},
+			init(){
+				// 房屋状态
+				getDictionaryFn('house_status').then(res=>{
+					if(res.code==200){
+						this.fwztList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//权利类型
+				getDictionaryFn('types_rights').then(res=>{
+					if(res.code==200){
+						this.qllxList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//房屋用途
+				getDictionaryFn('use_remises').then(res=>{
+					if(res.code==200){
+						this.fwytList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			bindDateChange(e){
+				var val=e.detail.value;
+				this.datainfo.rightType=this.qllxList[val].dictValue;
+				this.qllx=this.qllxList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.registrationDate=val;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.houseStatus=this.fwztList[val].dictValue;
+				this.fwzt=this.fwztList[val].dictLabel;
+			},
+			bindDateChangec(e){
+				var val=e.detail.value;
+				this.datainfo.usageType=this.fwytList[val].dictValue;
+				this.fwyt=this.fwytList[val].dictLabel;
+			},
+			bindDateChanged(e){
+				var val=e.detail.value;
+				this.datainfo.hasParkingSpace=this.ywcwList[val].dictValue;
+				this.ywcw=this.ywcwList[val].dictLabel;
+			},
+			getDetail(){
+				houseInfoDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						
+					}
+				})
+			},
+			getSubmit(){
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					// if(!params.portalId){
+					// 	this.$toast("请选择来访门户")
+					// 	return
+					// }
+					// if(params.isCar=='Y'&&!params.plateNumber){
+					// 	this.$toast("请输入车牌号")
+					// 	return
+					// }
+					// if(!params.visitorTime){
+					// 	this.$toast("请选择来访时间")
+					// 	return
+					// }
+					if(this.ptype=='add'){
+						houseInfoAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("refHouseList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						houseInfoPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("refHouseList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+				})
+			},
+			getaddImage(e){
+				let that = this;
+				let file =[],count=9
+				uni.chooseImage({
+					count: 1,
+					success:function(res){
+						let img= res.tempFilePaths;
+						if(img.length + file.length > count){
+							uni.showToast({
+								title: '最多上传'+count+'张图片',
+								icon: 'none',
+								duration: 2000
+							})
+						}else{
+							let imglen = res.tempFilePaths.length;
+							var fuwufile = [];
+							uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+								// var resurl=rs[0];
+								// if(e=='front'){
+								// 	that.datainfo.front=resurl.fileName;
+								// }else{
+								// 	that.datainfo.back=resurl.fileName;
+								// }
+								// if(rs&&rs.length>0){
+								// 	var obj={
+								// 		type:e,
+								// 		url:resurl.urlOnline
+								// 	}
+								// 	that.getOcrIdCard(obj)
+								// }
+							})	
+						}
+					}
+				});
+			},
+			getOcrIdCard(obj){
+				var params={
+					image:obj.url,
+					idCardSide:obj.type
+				}
+				getOcrIdCard(params).then(res=>{
+					if(res.code==200){
+						var datainfo=res.data;
+						if(obj.type=='front'){
+							this.datainfo.realName=datainfo.realName;
+							this.datainfo.idCard=datainfo.idCard;
+							this.datainfo.address=datainfo.address;
+						}else{
+							this.datainfo.expirationDate=datainfo.expirationDate
+						}
+					}
+				})
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
+.check /deep/ .uni-date-editor--x__disabled{opacity: 1;}
+.check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
+.check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
+.check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
+.check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
+.check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
+.check /deep/ .uni-input-input{font-size: 26rpx;}
+.check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
+.check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
+.check /deep/ .uni-forms-item__label .is-required{width: auto;}
+.check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
+.check{min-height: 100vh;padding: 20rpx 18rpx 22rpx;box-sizing: border-box;display: flex;box-sizing: border-box;}
+.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 28rpx;
+	.chtop{padding-top: 32rpx;margin-bottom: 22rpx;
+		.line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
+		view{font-weight: bold;font-size: 32rpx;color: #272727;}
+	}
+	.chmain{
+		padding: 0 32rpx;
+		.upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 8rpx;overflow: auto;
+			.img{width: 100%;height: 100%;}
+			.addimg{width: 90rpx;height: 90rpx;margin-bottom: 8rpx;}
+			view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
+		}
+	}
+	.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
+		image{width: 100%;height: 100%;}
+	}
+}
+.tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
+
+.hfbtns{margin-top: 140rpx;
+	.btn{height: 88rpx;background: #FFF8F8;border-radius: 20rpx;width: 316rpx;display: flex;align-items: center;justify-content: center;font-weight: bold;
+font-size: 26rpx;box-sizing: border-box;
+		&.btn1{border: 2rpx solid #FF6969;background: #FFF8F8;color: #FF6969;}
+		&.btn2{background: #0256FD;color: #ffffff;}
+	}
+}
+</style>