huangmp преди 4 години
родител
ревизия
391af24746

+ 34 - 5
assets/http/api.js

@@ -14,6 +14,10 @@ const generateCode = p => http.post('/community-app-service/app/miniprogram/gene
 //获取accessToken
 const getAccessToken = p => http.post('/community-app-service/app/miniprogram/getAccessToken', p)
 
+
+//获取开放数据
+const getOpenData = p => http.post('/community-app-service/app/miniprogram/getOpenData', p)
+
 //getOpenid
 const getOpenid = p => http.post("/community-app-service/app/miniprogram/getOpenid", p)
 //通过openid获取会员信息
@@ -63,7 +67,7 @@ const getSmsCode = p => http.post('/community-app-service/app/member/getSmsCode'
 //会员注册接口
 const memberRegister = p => http.post('/community-app-service/app/member/memberRegister', p)
 
-const logout = p => http.post('/community-app-service/app/member/logout?memberId='+p)
+const logout = p => http.post('/community-app-service/app/member/logout?memberId=' + p)
 //会员注册用户/添加家人
 const authentication = p => http.post('/community-app-service/app/member/authentication', p)
 //编辑家
@@ -99,7 +103,7 @@ const getAllApplyUserByMemberId = p => http.get('/community-app-service/app/appl
 const getDictByCode = code => http.get('/blade-system/dict-biz/dictionary?code=' + code);
 
 //获取住户车辆列表
-const carPage = p => http.post('/community-app-service/app/car/page', p)
+const carPage = p => http.get('/community-app-service/app/car/page/member', {params:p})
 //新增或编辑车辆
 const saveOrUpdateCar = p => http.post('/community-app-service/app/car/saveOrUpdate', p)
 //根据memberId获取家人列表
@@ -112,11 +116,30 @@ const getAllApplyUserByRoomIds = p => http.post('/community-app-service/app/appl
 const updateCheckState = p => http.post('/community-app-service/app/applyuser/updateCheckState', p)
 
 //根据MemberId获取访客授权记录
-const getGuestAuthorizeList = p => http.post('/community-app-service/app/guestAuthorize/getListByMemberId', p)
+const getGuestAuthorizeList = p => http.post('/community-app-service/app/guestAuthorize/pageOfMonth', p)
 //新增授权记录
 const addGuestAuthorize = p => http.post('/community-app-service/app/guestAuthorize/addGuestAuthorize', p)
 //撤销授权记录
-const guestAuthorizeCancel = p => http.post('/community-app-service/app/guestAuthorize/cancel', p)
+const guestAuthorizeCancel = p => http.post('/community-app-service/app/guestAuthorize/cancel?id=' + p)
+
+// 详情
+const guestAuthorizeDetail = p => http.get('/community-app-service/app/guestAuthorize/detail', {
+	params: p
+})
+
+
+// 访客记录
+const guestRecordsList = p => http.get('/community-app-service/app/guestRecord/list', {
+	params: p
+})
+
+// 访客记录
+const guestRecordsPage = p => http.post('/community-app-service/app/guestRecord/page',p)
+const guestRecordsCount = p => http.get('/community-app-service/app/guestRecord/count', {
+	params: p
+})
+// 访客记录
+const guestRecordsSubmit = p => http.post('/community-app-service/app/guestRecord/submit', p)
 
 //新增物业报修工单
 const addEstateRepair = p => http.post('/community-app-service/app/estateRepair/addEstateRepair', p)
@@ -227,5 +250,11 @@ export const api = {
 	getAuditListByMemberId,
 	modifyFace,
 	accessRecords,
-	hasMember
+	hasMember,
+	guestAuthorizeDetail,
+	guestRecordsList,
+	guestRecordsPage,
+	guestRecordsCount,
+	guestRecordsSubmit,
+	getOpenData
 }

+ 15 - 15
comps/clear-user.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="">
-		<u-popup v-model="show" mode="center" width="80%" :border-radius="10"  negativeTop="200">
+		<u-popup v-model="show" mode="center" width="80%" :border-radius="10" negativeTop="200">
 			<view style="padding:30rpx 0rpx;display: flex;flex-direction: column;justify-content: space-between;">
 				<view class="center text-center padding-bottom-30">
 					<text>注销账户</text>
@@ -8,14 +8,14 @@
 				<view class="flex-sub" style="margin: 50rpx 30rpx;">
 					<text class=" text-red"
 						style="font-size: 28rpx;line-height: 56rpx;">您的个人信息,账户信息,认证信息将被清空/删除,确定进行此操作?</text>
-						<view class="margin-top " >
-							<text class="cuIcon-title text-red"></text>
-							<text class="text-sm ">业主角色请到【家人管理】处移除房间下的成员</text>
-						</view>
+					<view class="margin-top " v-if="hasMember">
+						<text class="cuIcon-title text-red"></text>
+						<text class="text-sm ">业主角色请到【家人管理】处移除房间下的成员</text>
+					</view>
 				</view>
 
 				<view class="text-sm" style="display: flex;padding: 5rpx 32rpx 38rpx">
-					<u-checkbox v-model="checked" size="26" name="checked" >
+					<u-checkbox v-model="checked" size="26" name="checked">
 						<text style="font-size: 28rpx;">确定注销账户</text>
 					</u-checkbox>
 				</view>
@@ -38,9 +38,9 @@
 		name: '',
 		data() {
 			return {
-				hasMember:false,
+				hasMember: false,
 				time: 8,
-				interval:null,
+				interval: null,
 				checked: false,
 				show: false,
 				roomList: [],
@@ -86,14 +86,14 @@
 		},
 		methods: {
 			async showModal() {
-				let res=await this.$http.hasMember(this.vuex_member.id)
-				this.hasMember=res.data.data
+				let res = await this.$http.hasMember(this.vuex_member.id)
+				this.hasMember = res.data.data
 				this.show = true
 			},
 			confirm() {
 				if (!this.checked) {
 					this.$u.toast('请先勾选确定注销账户操作')
-					this.show=true
+					this.show = true
 					return
 				}
 				if (this.hasMember) {
@@ -101,11 +101,11 @@
 					return
 				}
 				this.$http.logout(this.vuex_member.id)
-				this.show=false
-				this.$dialog.showModal("注销成功,请退出小程序",false).then(res=>{
+				this.show = false
+				this.$dialog.showModal("注销成功,请退出小程序", false).then(res => {
 					this.$store.commit('clear')
-					getApp().globalData.anyHousePass=false
-					getApp().globalData.member=null
+					getApp().globalData.anyHousePass = false
+					getApp().globalData.member = null
 					uni.clearStorage()
 					uni.reLaunch({
 						url: "/pages/index/index"

+ 40 - 0
comps/empty.vue

@@ -0,0 +1,40 @@
+<template>
+	<view class="">
+		<view class="empty-page" >
+			<image src="/static/common/empty.png" style=""></image>
+			<view>{{text || '暂无数据'}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: '',
+		props: ['text'],
+		data() {
+			return {
+
+			};
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.empty-page {
+		position: absolute;
+		left: 50%;
+		top: 35%;
+		transform: translate(-50%, -50%);
+
+		image {
+			width: 200rpx;
+			height: 200rpx;
+		}
+
+		view {
+			text-align: center;
+			color: #b3b7be;
+			font-size: 28rpx;
+		}
+	}
+</style>

+ 27 - 0
comps/loading.vue

@@ -0,0 +1,27 @@
+<template>
+	<view class="">
+		<view class="loading-page">
+			<u-loading mode="flower" size="80"></u-loading>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+
+			};
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.loading-page {
+		position: absolute;
+		top: 40%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+	}
+</style>

+ 268 - 0
comps/rattenking-dtpicker/GetDate.js

@@ -0,0 +1,268 @@
+const GetDate = {
+  withData: (num) => {
+		let param = parseInt(num);
+    return param < 10 ? '0' + param : '' + param;
+  },
+  getTimes(str){
+		var strs = str.split(' ');
+		var strs1 = strs[0] ? strs[0].split('-') : '2000-01-01'.split('-');
+		var strs2 = strs[1] ? strs[1].split(':') : '00:00:00'.split(':');
+		var year = strs1[0] ? strs1[0] : 2000;
+		var month = strs1[1] ? strs1[1] : 1;
+		var day = strs1[2] ? strs1[2] : 1;
+		var hour = strs2[0] ? strs2[0] : 0;
+		var minute = strs2[1] ? strs2[1] : 0;
+		var second = strs2[2] ? strs2[2] : 0;
+		var newstr = year +'/'+ month +'/'+ day +' '+ hour +':'+ minute +':'+ second;
+    return new Date(newstr.replace(/-/g,'/')).getTime();
+  },
+	getCurrentTimes(time = new Date()){
+		const date = new Date(time);
+		const year = date.getFullYear();
+		const month = date.getMonth() + 1;
+		const day = date.getDate();
+		const hour = date.getHours();
+		const minute = date.getMinutes();
+		const second = date.getSeconds();
+		return {
+			detail: {
+				year: year,
+				month: month,
+				day: day,
+				hour: hour,
+				minute: minute,
+				second: second
+			}
+		}
+	},
+  format(arr){
+    let curarr = [];
+    let curarr0 = [];
+    let str = '';
+    arr.forEach((cur,index) => {
+			let o = GetDate.withData(cur);
+      if(index > 2){
+        curarr.push(o);
+      }else{
+        curarr0.push(o);
+      }
+    })
+    if(arr.length < 4){
+      str = curarr0.join('-');
+    }else{
+      str = curarr0.join('-') + ' ' + curarr.join(':');
+    }
+    return str;
+  },
+	getCurrentStringValue(str){
+		let newstr = str.split(' ');
+		if(newstr && newstr[1]){
+			let arr = [...newstr[0].split('-'),...newstr[1].split(':')];
+			return arr;
+		}
+		return newstr[0].split('-');
+	},
+	getCompare(curp,startp,endp,timesp){
+		let cur = GetDate.getTimes(curp);
+		let start = GetDate.getTimes(startp);
+		let end = GetDate.getTimes(endp);
+		if(cur < start){
+			return GetDate.getTimeIndex(timesp,GetDate.getCurrentStringValue(startp));
+		}else if(cur > end){
+			return GetDate.getTimeIndex(timesp,GetDate.getCurrentStringValue(endp));
+		}else{
+			return GetDate.getTimeIndex(timesp,GetDate.getCurrentStringValue(curp));
+		}
+	},
+	getChooseArr(times,indexs){
+		let arr = [];
+		times.forEach((cur,index) => arr.push(cur[indexs[index]]));
+		return arr;
+	},
+	getNewArray(arr){
+		let newarr = [];
+		arr.forEach(cur => newarr.push(cur));
+		return newarr;
+	},
+  getLoopArray: (start, end) => {
+    var start = start || 0;
+    var end = end || 1;
+    var array = [];
+    for (var i = start; i <= end; i++) {
+      array.push(GetDate.withData(i));
+    }
+    return array;
+  },
+  getMonthDay: (year, month) => {
+    var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null;
+
+    switch (month) {
+      case '01':
+      case '03':
+      case '05':
+      case '07':
+      case '08':
+      case '10':
+      case '12':
+        array = GetDate.getLoopArray(1, 31)
+        break;
+      case '04':
+      case '06':
+      case '09':
+      case '11':
+        array = GetDate.getLoopArray(1, 30)
+        break;
+      case '02':
+        array = flag ? GetDate.getLoopArray(1, 29) : GetDate.getLoopArray(1, 28)
+        break;
+      default:
+        array = GetDate.getLoopArray(1, 31)
+    }
+    return array;
+  },
+	getIndependentTimes(opts){
+		var {
+			startTimes,
+			endTimes,
+			curTimes,
+			fields
+		} = opts;
+		var {
+			year:startyear = 2021,
+			month:startmonth = 1,
+			day:startday = 1,
+			hour:starthour = 0,
+			minute:startminute = 0,
+			second:startsecond = 0
+		} = startTimes;
+		var {
+			year:endyear = 2021,
+			month:endmonth = 1,
+			day:endday = 1,
+			hour:endhour = 0,
+			minute:endminute = 0,
+			second:endsecond = 0
+		} = endTimes;
+		var {
+			year:curyear = 2021,
+			month:curmonth = 1,
+			day:curday = 1,
+			hour:curhour = 0,
+			minute:curminute = 0,
+			second:cursecond = 0
+		} = curTimes;
+		return {
+			startyear, 
+			startmonth, 
+			startday, 
+			starthour, 
+			startminute, 
+			startsecond, 
+			endyear, 
+			endmonth, 
+			endday, 
+			endhour, 
+			endminute, 
+			endsecond, 
+			curyear, 
+			curmonth, 
+			curday, 
+			curhour, 
+			curminute, 
+			cursecond
+		}
+	},
+	getYears(opts){
+		var years = GetDate.getLoopArray(opts.startyear, opts.endyear);
+		return years;
+	},
+	getMonths(opts){
+		var months = GetDate.getLoopArray(1, 12);
+		if(opts.curyear == opts.startyear){
+			months = months.filter(cur => cur >= opts.startmonth);
+		}
+		if(opts.curyear == opts.endyear){
+			months = months.filter(cur => cur <= opts.endmonth);
+		}
+		return months;
+	},
+	getDays(opts){
+		var days = GetDate.getMonthDay(opts.curyear, GetDate.withData(opts.curmonth));
+		if(opts.curyear == opts.startyear && opts.curmonth == opts.startmonth){
+			days = days.filter(cur => cur >= opts.startday);
+		}
+		if(opts.curyear == opts.endyear && opts.curmonth == opts.endmonth){
+			days = days.filter(cur => cur <= opts.endday);
+		}
+		return days;
+	},
+	getHours(opts){
+		var hours = GetDate.getLoopArray(0, 23);
+		if(opts.curyear == opts.startyear && opts.curmonth == opts.startmonth && opts.curday == opts.startday){
+			hours = hours.filter(cur => cur >= opts.starthour);
+		}
+		if(opts.curyear == opts.endyear && opts.curmonth == opts.endmonth && opts.curday == opts.endday){
+			hours = hours.filter(cur => cur <= opts.endhour);
+		}
+		return hours;
+	},
+	getMinutes(opts){
+		var minutes = GetDate.getLoopArray(0, 59);
+		if(opts.curyear == opts.startyear && opts.curmonth == opts.startmonth && opts.curday == opts.startday && opts.curhour == opts.starthour){
+			minutes = minutes.filter(cur => cur >= opts.startminute);
+		}
+		if(opts.curyear == opts.endyear && opts.curmonth == opts.endmonth && opts.curday == opts.endday && opts.curhour == opts.endhour){
+			minutes = minutes.filter(cur => cur <= opts.endminute);
+		}
+		return minutes;
+	},
+	getSeconds(opts){
+		var seconds = GetDate.getLoopArray(0, 59);
+		if(opts.curyear == opts.startyear && opts.curmonth == opts.startmonth && opts.curday == opts.startday && opts.curhour == opts.starthour && opts.curminute == opts.startminute){
+			seconds = seconds.filter(cur => cur >= opts.startsecond);
+		}
+		if(opts.curyear == opts.endyear && opts.curmonth == opts.endmonth && opts.curday == opts.endday && opts.curhour == opts.endhour && opts.curminute == opts.endminute){
+			seconds = seconds.filter(cur => cur <= opts.endsecond);
+		}
+		return seconds;
+	},
+  getDateTimes: (opts) => {
+		var alltimes = GetDate.getIndependentTimes(opts);
+		var years = GetDate.getYears(alltimes);
+		var months = GetDate.getMonths(alltimes);
+		var days = GetDate.getDays(alltimes);
+		var hours = GetDate.getHours(alltimes);
+		var minutes = GetDate.getMinutes(alltimes);
+    var seconds = GetDate.getSeconds(alltimes);
+    var times = {
+			year: [years],
+			month: [years, months],
+			day: [years, months, days],
+			hour: [years, months, days, hours],
+			minute: [years, months, days, hours, minutes],
+			second: [years, months, days, hours, minutes, seconds]
+		};
+    return times[opts.fields] || times.second;
+  },
+  getIndex(arr,target){
+    let len = arr.length;
+    for(let i = 0; i < len; i++){
+      if(arr[i] == target){
+        return i;
+      }
+    }
+  },
+  getTimeIndex(arrs, targets){
+    let len = arrs.length;
+    let arr = [];
+    for(let i = 0; i < len; i++){
+      arr.push(GetDate.getIndex(arrs[i], targets[i]))
+    }
+    return arr;
+  },
+  error(str){
+	  console.error(str);
+  }
+}
+
+module.exports = GetDate; 

+ 181 - 0
comps/rattenking-dtpicker/rattenking-dtpicker.vue

@@ -0,0 +1,181 @@
+<template>
+	<picker class='rui-picker rui-class' mode="multiSelector" :range="times" :value="timesIndex" :disabled="curDisabled" @change='changeDate' @cancel="cancelDate" @columnchange="columnchangeDate">
+	  {{curValue}}
+	</picker>
+</template>
+
+<script>
+	import GetDate from './GetDate.js';
+	export default {
+		name: 'rattenking-dtpicker',
+		props: {
+			/**
+			 * picker允许选中的最小值
+			 */
+			start: {
+			  type: String,
+			  default: '2000-01-01'
+			},
+			/**
+			 * picker允许选中的最大值
+			 */
+			end: {
+			  type: String,
+			  default: '2100-12-31'
+			},
+			/**
+			 * picker默认展示的值
+			 */
+			value: {
+			  type: String,
+			  default: ''
+			},
+			/**
+			 * picker的时间粒度
+			 */
+			fields: {
+			  type: String,
+			  default: 'day'
+			},
+			/**
+			 * picker是否禁止
+			 */
+			disabled: {
+			  type: Boolean,
+			  default: false
+			},
+			/**
+			 * 是否显示中文
+			 */
+			isShowChinese: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				times:[],
+				timesIndex: [],
+				timesString: null,
+				curValue: null,
+				startValue: null,
+				endValue: null,
+				curDisabled: null,
+				cancel: null,
+				lens: {
+					year: 1,
+					month: 2,
+					day: 3,
+					hour: 4,
+					minute: 5,
+					second: 6
+				}
+			}
+		},
+		watch: {
+			curDisabled(val){
+				this.curDisabled = val;
+			},
+			curValue(val) {
+				this.curValue = val;
+				this.$emit('change', val);
+			},
+			times(val){
+				this.times = val;
+			},
+			timesIndex(val){
+				this.timesIndex = val;
+			},
+			cancel(val) {
+				this.$emit('cancel', val);
+			}
+		},
+		created() {
+			this.initData();
+			this.judgeTimeFields();
+			this.judgeStartEndTime();
+			this.updateTimesAndIndex();
+		},
+		methods: {
+			initData(){
+				// 初始化默认时间和是否禁止
+				this.curValue = this.value;
+				this.curDisabled = this.disabled;
+			},
+			judgeStartEndTime(){
+				// 判断开始和结束时间大小
+				let starttimestamp = GetDate.getTimes(this.start);
+				let endtimestamp = GetDate.getTimes(this.end);
+				if(endtimestamp <= starttimestamp){
+					this.curTimes = GetDate.getCurrentTimes(starttimestamp);
+					this.endTimes = GetDate.getCurrentTimes(starttimestamp);
+					this.startTimes = GetDate.getCurrentTimes(starttimestamp);
+					this.startValue = this.start;
+					this.endValue = this.start;
+				} else {
+					this.endTimes = GetDate.getCurrentTimes(endtimestamp);
+					this.startTimes = GetDate.getCurrentTimes(starttimestamp);
+					this.startValue = this.start;
+					this.endValue = this.end;
+				}
+			},
+			judgeTimeFields(){
+				// 处理默认显示时间
+				let fields = this.fields;
+				let curTimes = GetDate.getCurrentTimes();
+				let curtimestamp = +new Date(this.curValue);
+				if(curtimestamp === 0 || curtimestamp){
+					curTimes = GetDate.getCurrentTimes(curtimestamp);
+				}
+				this.curTimes = curTimes;
+			},
+			updateTimesAndIndex(){
+				// 更新times和index
+				let opts = {
+					startTimes: this.startTimes.detail,
+					endTimes: this.endTimes.detail,
+					curTimes: this.curTimes.detail,
+					fields: this.fields
+				}
+				let times = GetDate.getDateTimes(opts);
+				this.times = times;
+				let curtimes = Object.values(this.curTimes.detail);
+				this.timesIndex = times.map((cur,index) => {
+					var idn = cur.findIndex((cu,idx) => curtimes[index] == cu);
+					return idn > -1 ? idn : 0;
+				})
+			},
+			getRealCurValue(){
+				// 获取当前选中的时间字符串
+				var arr = this.timesIndex.map((cur, index) => {
+					return this.times[index][cur]
+				})
+				return GetDate.format(arr);
+			},
+			changeDate(e){
+				// 确认选中时间
+				let values = e.detail.value;
+				this.timesIndex = values;
+				this.curValue = this.getRealCurValue();
+			},
+			columnchangeDate(e){
+				// 滑动更新times和index
+				let column = e.detail.column;
+				let value = e.detail.value;
+				this.timesIndex[column] = value;
+				for(let i = 0; i < this.lens[this.fields]; i++){
+					let realvalue = this.getRealCurValue();
+					this.curTimes = GetDate.getCurrentTimes(GetDate.getTimes(realvalue));
+					this.updateTimesAndIndex();
+				}
+			},
+			cancelDate(e){
+				this.cancel = e
+			}
+		}
+	}
+</script>
+
+<style>
+	
+</style>

+ 83 - 0
comps/rattenking-dtpicker/readme.md

@@ -0,0 +1,83 @@
+### DatePicker 多粒度时间选择器
+
+可进行多粒度的时间选择器,组件名:``rattenking-dtpicker``,代码块: ruiDatePicker。
+
+**使用方式:**
+
+在 ``script`` 中引用组件 
+
+```javascript
+import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
+export default {
+    components: {ruiDatePicker}
+}
+```
+
+在 ``template`` 中使用组件
+
+```html
+<ruiDatePicker
+	fields="second"
+	start="2010-00-00 00:00:00"
+	end="2030-12-30 23:59:59"
+	:value="value"
+	@change="bindChange"
+	@cancel="bindCancel"
+></ruiDatePicker>
+```
+
+实际效果参考:[https://github.com/Rattenking/rui-uni-components](https://github.com/Rattenking/rui-uni-components)
+
+**DatePicker 属性说明:**
+
+|属性名		|类型	|默认值	                    |说明					|
+|---		|----	|---	                    |---					|
+|start		|String	|'1900-00-00 00:00:00'		|限制选择器选择的最小时间	|
+|end		|String	|'2500-12-30 23:59:59'		|限制选择器选择的最大时间	|
+|value		|String	|''	                        |当前时间选择器显示的时间	|
+|fields		|String	|'second'		            |时间选择器的粒度			|
+|disabled	|Boolean|false						|是否为禁用状态			|
+
+
+**fields 值说明:**
+
+|值 		|类型	|说明					|
+|---		|----	|---					|
+|year		|String	|选择器粒度为年			|
+|month		|String	|选择器粒度为月份			|
+|day		|String	|选择器粒度为天			|
+|hour		|String	|选择器粒度为小时			|
+|minute	    |String |选择器粒度为分钟			|
+|second	    |String |选择器粒度为秒			|
+
+**事件说明:**
+
+|事件名称	|说明		|
+|---|---|
+|change	|时间选择器点击【确定】按钮时时触发的事件,参数为picker的当前的 value|
+|cancel	|时间选择器点击【取消】按钮时时触发的事件|
+
+**修复BUG说明:**
+
+v1.0.3
+1. 修复获取分钟调用小时方法!
+2. 修复过滤分钟使用小时判断!
+
+v1.0.2
+1. 修复限制开始和结果只有年,全部时间的开始和结束!
+2. 修复默认value不传或汉字默认报错!
+
+v1.0.1
+1. 修复每个月都是 31 天的 bug !
+2. 修复 value 值做出改变,在外部赋值才改变的 bug ,当前版本只要 value 改变,显示值就会改变!
+3. 优化了默认显示值问题,如果用户不填写,直接默认当前设备的当前时间!
+4. 修复二月份能够选择 31 号的 bug!
+
+
+**感谢:**
+
+> 在这里特别感谢**AimerQAQ**、**icare**、**281245387@qq.com**、**椰子皮**、**2692032566@qq.com**等反馈的 bug 和给出的优化建议。有更多优化建议和需求,请联系作者。谢谢!
+
+**致歉:**
+
+> 由于个人的不认真,导致的1.0.3版本bug,给大家带来的不便,请谅解!

+ 922 - 922
pages.json

@@ -1,924 +1,924 @@
 {
-    "easycom" : {
-        "^u-(.*)" : "@/uview-ui/components/u-$1/u-$1.vue"
-    },
-    "pages" : [
-        {
-            "path" : "pages/index/index",
-            "style" : {
-                "enablePullDownRefresh" : false,
-                "navigationStyle" : "custom"
-            }
-        },
-        {
-            "path" : "pages/guide/guide",
-            "style" : {
-                "navigationStyle" : "custom",
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myhome/myhome",
-            "style" : {
-                "navigationBarTitleText" : "我家",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/life/life",
-            "style" : {
-                "navigationStyle" : "custom",
-                "navigationBarTitleText" : "周边",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/poster/poster",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/authorize_record/authorize_record",
-            "style" : {
-                "navigationBarTitleText" : "授权记录"
-            }
-        },
-        {
-            "path" : "pages/authorize_record/openPass/openPass",
-            "style" : {
-                "navigationBarTitleText" : "访客授权"
-            }
-        },
-        {
-            "path" : "pages/webview/webview",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/register/register",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/direction/direction",
-            "style" : {
-                "navigationBarTitleText" : "使用帮助",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/myInfo/myInfo",
-            "style" : {
-                "navigationBarTitleText" : "认证信息",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/news/news",
-            "style" : {
-                "navigationBarTitleText" : "我的消息",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/password/password",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myFamily/myFamily",
-            "style" : {
-                "navigationBarTitleText" : "家人管理"
-            }
-        },
-        {
-            "path" : "pages/myFamily/addFamily/addFamily",
-            "style" : {
-                "navigationBarTitleText" : "添加家人"
-            }
-        },
-        {
-            "path" : "pages/myFamily/editFamily/editFamily",
-            "style" : {
-                "navigationBarTitleText" : "编辑家人"
-            }
-        },
-        {
-            "path" : "pages/myFamily/editApplyFamily/editApplyFamily",
-            "style" : {
-                "navigationBarTitleText" : "编辑申请"
-            }
-        },
-        {
-            "path" : "pages/myFamily/activateFace/activateFace",
-            "style" : {
-                "navigationBarTitleText" : ""
-            }
-        },
-        {
-            "path" : "pages/bluetooth/bluetooth",
-            "style" : {
-                "navigationBarTitleText" : "蓝牙开门"
-            }
-        },
-        {
-            "path" : "pages/choosePlot/choosePlot",
-            "style" : {
-                "navigationBarTitleText" : "选择小区"
-            }
-        },
-        {
-            "path" : "pages/choosePlot/chooseUnit/chooseUnit",
-            "style" : {
-                "navigationBarTitleText" : "选择楼栋"
-            }
-        },
-        {
-            "path" : "pages/choosePlot/chooseRoom/chooseRoom",
-            "style" : {
-                "navigationBarTitleText" : "选择房间"
-            }
-        },
-        {
-            "path" : "pages/choosePlot/householdCert/householdCert",
-            "style" : {
-                "navigationBarTitleText" : "用户认证"
-            }
-        },
-        {
-            "path" : "pages/myPassword/myPassword",
-            "style" : {
-                "navigationBarTitleText" : "访客密码"
-            }
-        },
-        {
-            "path" : "pages/oneButton/oneButton",
-            "style" : {
-                "navigationBarTitleText" : "一键开门"
-            }
-        },
-        {
-            "path" : "pages/record/record",
-            "style" : {
-                "navigationBarTitleText" : "访客记录"
-            }
-        },
-        {
-            "path" : "pages/switchcity/switchcity",
-            "style" : {
-                "navigationBarTitleText" : "选择城市"
-            }
-        },
-        {
-            "path" : "pages/uploadFace/uploadFace",
-            "style" : {
-                "navigationBarTitleText" : ""
-            }
-        },
-        {
-            "path" : "pages/demo/myfamily",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/demo/demo1",
-            "style" : {
-                "navigationBarTitleText" : "添加家人",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myhome/familyList",
-            "style" : {
-                "navigationBarTitleText" : "我的家人",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/demo/demo2",
-            "style" : {
-                "navigationStyle" : "custom",
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/auth/auth",
-            "style" : {
-                "navigationBarTitleText" : "房屋认证",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/device/device",
-            "style" : {
-                "navigationBarTitleText" : "我家",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/wode",
-            "style" : {
-                "navigationStyle" : "custom",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/empty/empty",
-            "style" : {
-                "navigationBarTitleText" : "用户注册",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/empty/goauth",
-            "style" : {
-                "navigationBarTitleText" : "审核状态",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myFamily/add/add",
-            "style" : {
-                "navigationBarTitleText" : "添加家人",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/my-camera/my-camera",
-            "style" : {
-                // "navigationBarTextStyle": "white",
-                // "navigationBarBackgroundColor": "#000",
-                "navigationBarTitleText" : "相片拍摄"
-            }
-        },
-        {
-            "path" : "pages/demo/demo4",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/demand/list",
-            "style" : {
-                "navigationBarTitleText" : "需求大厅",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/demand/detail",
-            "style" : {
-                "navigationBarTitleText" : "需求详情",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/demand/publish",
-            "style" : {
-                "navigationBarTitleText" : "我的需求信息",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/delivery/delivery",
-            "style" : {
-                "navigationBarTitleText" : "代领快递",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/community/community",
-            "style" : {
-                "navigationBarTitleText" : "社区",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/feedback/feedback",
-            "style" : {
-                "navigationBarTitleText" : "用户反馈",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/notice/notice",
-            "style" : {
-                "navigationBarTitleText" : "通知公告"
-            }
-        },
-        {
-            "path" : "pages/notice/detail",
-            "style" : {
-                "navigationBarTitleText" : "公告详情",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/tool-list/epidemic-pass/epidemic-pass",
-            "style" : {
-                "navigationBarTitleText" : "防疫通行",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/tool-list/epidemic-pass/detail",
-            "style" : {
-                "navigationBarTitleText" : "出入通行证",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/tool-list/tool-list",
-            "style" : {
-                "navigationBarTitleText" : "功能列表",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/demo/demo5",
-            "style" : {
-                "navigationBarTitleText" : "访客开门",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/property/property",
-            "style" : {
-                "navigationBarTitleText" : "物业报修",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/property/detail",
-            "style" : {
-                "navigationBarTitleText" : "物业报修",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/property/list/list",
-            "style" : {
-                "navigationBarTitleText" : "我的报修",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/guide/guide_old",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/services/property/comment",
-            "style" : {
-                "navigationBarTitleText" : "物业评价",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/guest/guest",
-            "style" : {
-                "navigationBarTitleText" : "访客授权",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/guest/open_door",
-            "style" : {
-                "navigationBarTitleText" : "访客开门",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/demo/demo6",
-            "style" : {
-                "navigationBarTitleText" : "会员登陆",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/guest/guest_form",
-            "style" : {
-                "navigationBarTitleText" : "来访登记",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/community/detail/elderlyDetail",
-            "style" : {
-                "navigationBarTitleText" : "老人抓拍详情",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/community/detail/carDetail",
-            "style" : {
-                "navigationBarTitleText" : "车辆抓拍详情",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/develop/develop",
-            "style" : {
-                "navigationBarTitleText" : "即将开放",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/choosePlot/chooseBuilding/chooseBuilding",
-            "style" : {
-                "navigationBarTitleText" : "选择楼栋",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/tool-list/epidemic-pass/list",
-            "style" : {
-                "navigationBarTitleText" : "登记记录",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/healthCode/healthCode",
-            "style" : {
-                "navigationBarTitleText" : "防疫健康码",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myFamily/audit-detail/audit-detail",
-            "style" : {
-                "navigationBarTitleText" : "住户审核",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/wode/travelRecord/travelRecord",
-            "style" : {
-                "navigationBarTitleText" : "出入记录",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myCar/myCar",
-            "style" : {
-                "navigationBarTitleText" : "我的车辆",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/myCar/add",
-            "style" : {
-                "navigationBarTitleText" : "添加车辆",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/device/records",
-            "style" : {
-                "navigationBarTitleText" : "设备告警记录",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/test4/test4",
-            "style" : {
-                "navigationBarTitleText" : "",
-                "enablePullDownRefresh" : false
-            }
-        },
-        {
-            "path" : "pages/bindRoom/bindRoom",
-            "style" : {
-                "navigationBarTitleText" : "绑定房间",
-                "enablePullDownRefresh" : false
-            }
-        }
-    ],
-    "subPackages" : [
-        {
-            "root" : "pagesM/",
-            "pages" : [
-                {
-                    "path" : "pages/goods_des",
-                    "style" : {
-                        "navigationBarTitleText" : "商品详情",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/search",
-                    "style" : {
-                        "navigationBarTitleText" : "搜索商品",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/category",
-                    "style" : {
-                        "navigationBarTitleText" : "分类",
-                        "navigationBarTextStyle" : "#FFFFFF",
-                        "navigationBarBackgroundColor" : "#E42F2F"
-                    }
-                },
-                {
-                    "path" : "pages/shop_car",
-                    "style" : {
-                        "navigationBarTitleText" : "购物车"
-                    }
-                },
-                {
-                    "path" : "pages/mine",
-                    "style" : {
-                        // "navigationBarTitleText": "我的",
-                        // "navigationBarTextStyle": "white",
-                        // "navigationBarBackgroundColor": "#E42F2F",
-                        // "backgroundColorTop":"#E42F2F",
-                        "enablePullDownRefresh" : true,
-                        "navigationStyle" : "custom"
-                    }
-                },
-                {
-                    "path" : "pages/mine_income",
-                    "style" : {
-                        "navigationBarTitleText" : "团长收益"
-                    }
-                },
-                {
-                    "path" : "pages/applyToPromotion",
-                    "style" : {
-                        "navigationBarTitleText" : "团长申请"
-                    }
-                },
-                {
-                    "path" : "pages/mine_collection",
-                    "style" : {
-                        "navigationBarTitleText" : "我的收藏"
-                    }
-                },
-                {
-                    "path" : "pages/address_list",
-                    "style" : {
-                        "navigationBarTitleText" : "我的地址"
-                    }
-                },
-                {
-                    "path" : "pages/address_edit",
-                    "style" : {
-                        "navigationBarTitleText" : "编辑地址"
-                    }
-                },
-                {
-                    "path" : "pages/coupon_list",
-                    "style" : {
-                        "navigationBarTitleText" : "我的优惠券"
-                    }
-                },
-                {
-                    "path" : "pages/coupon_select",
-                    "style" : {
-                        "navigationBarTitleText" : "选择优惠券"
-                    }
-                },
-                {
-                    "path" : "pages/coupon_center",
-                    "style" : {
-                        "navigationBarTitleText" : "领券中心"
-                    }
-                },
-                {
-                    "path" : "pages/integral",
-                    "style" : {
-                        "navigationBarTitleText" : "我的积分"
-                    }
-                },
-                {
-                    "path" : "pages/integral_list",
-                    "style" : {
-                        "navigationBarTitleText" : "积分明细"
-                    }
-                },
-                {
-                    "path" : "pages/integral_exchange",
-                    "style" : {
-                        "navigationBarTitleText" : "兑换详情"
-                    }
-                },
-                {
-                    "path" : "pages/mine_setting",
-                    "style" : {
-                        "navigationBarTitleText" : "系统设置"
-                    }
-                },
-                {
-                    "path" : "pages/mine_protocal",
-                    "style" : {
-                        "navigationBarTitleText" : "用户协议"
-                    }
-                },
-                {
-                    "path" : "pages/mine_info",
-                    "style" : {
-                        "navigationBarTitleText" : "个人信息"
-                    }
-                },
-                {
-                    "path" : "pages/mine_interest",
-                    "style" : {
-                        "navigationBarTitleText" : "会员权益"
-                    }
-                },
-                {
-                    "path" : "pages/mine_order_list",
-                    "style" : {
-                        "navigationBarTitleText" : "我的订单",
-                        "enablePullDownRefresh" : true
-                    }
-                },
-                {
-                    "path" : "pages/mine_sale_list",
-                    "style" : {
-                        "navigationBarTitleText" : "我的售后"
-                    }
-                },
-                {
-                    "path" : "pages/after_sale_choose",
-                    "style" : {
-                        "navigationBarTitleText" : "选择申请售后货物"
-                    }
-                },
-                {
-                    "path" : "pages/after_sale_apply",
-                    "style" : {
-                        "navigationBarTitleText" : "申请售后"
-                    }
-                },
-                {
-                    "path" : "pages/after_sale_submit",
-                    "style" : {
-                        "navigationBarTitleText" : "申请售后"
-                    }
-                },
-                {
-                    "path" : "pages/goods_manual",
-                    "style" : {
-                        "navigationBarTitleText" : "说明书",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/goods_comment_list",
-                    "style" : {
-                        "navigationBarTitleText" : "全部评价",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/goods_list",
-                    "style" : {
-                        "navigationBarTitleText" : "商品列表",
-                        "navigationBarBackgroundColor" : "#FFFFFF",
-                        "navigationStyle" : "custom"
-                    }
-                },
-                {
-                    "path" : "pages/order_confirm",
-                    "style" : {
-                        "navigationBarTitleText" : "确认下单",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/order_pay",
-                    "style" : {
-                        "navigationBarTitleText" : "在线支付",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/pay_success",
-                    "style" : {
-                        "navigationBarTitleText" : "支付成功",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/mention_store_list",
-                    "style" : {
-                        "navigationBarTitleText" : "选择提货门店",
-                        "backgroundColor" : "#F2F2F2"
-                    }
-                },
-                {
-                    "path" : "pages/order_appraise",
-                    "style" : {
-                        "navigationBarTitleText" : "填写评价"
-                    }
-                },
-                {
-                    "path" : "pages/order_detail",
-                    "style" : {
-                        "navigationBarTitleText" : "订单详情",
-                        "navigationBarTextStyle" : "white",
-                        "navigationBarBackgroundColor" : "#2f7ff5"
-                    }
-                },
-                {
-                    "path" : "pages/order_sale_detail",
-                    "style" : {
-                        "navigationBarTitleText" : "售后详情",
-                        "navigationBarTextStyle" : "white",
-                        "navigationBarBackgroundColor" : "#E42F2F"
-                    }
-                },
-                {
-                    "path" : "pages/common/webview",
-                    "style" : {}
-                },
-                {
-                    "path" : "pages/my_integral",
-                    "style" : {
-                        "navigationBarTitleText" : "我的积分"
-                    }
-                },
-                {
-                    "path" : "pages/share_team",
-                    "style" : {
-                        "navigationBarTitleText" : "我的分享团队"
-                    }
-                },
-                {
-                    "path" : "pages/my_earnings",
-                    "style" : {
-                        "navigationBarTitleText" : "我的分享团队"
-                    }
-                },
-                {
-                    "path" : "pages/share_team_goods",
-                    "style" : {
-                        "navigationBarTitleText" : "我的分享团队"
-                    }
-                },
-                {
-                    "path" : "pages/earn_records",
-                    "style" : {
-                        "navigationBarTitleText" : "收益记录"
-                    }
-                },
-                {
-                    "path" : "pages/earn_details",
-                    "style" : {
-                        "navigationBarTitleText" : "收益详情"
-                    }
-                },
-                {
-                    "path" : "pages/balance_records",
-                    "style" : {
-                        "navigationBarTitleText" : "结算记录"
-                    }
-                },
-                {
-                    "path" : "pages/my_invite",
-                    "style" : {
-                        "navigationBarTitleText" : "我邀请的人"
-                    }
-                },
-                {
-                    "path" : "pages/user_invite",
-                    "style" : {
-                        "navigationBarTitleText" : ""
-                    }
-                },
-                {
-                    "path" : "pages/discounts_goods",
-                    "style" : {
-                        "navigationBarTitleText" : "分销商品"
-                    }
-                },
-                {
-                    "path" : "pages/common/ad_textView",
-                    "style" : {}
-                },
-                {
-                    "path" : "comps/tki_qrcode",
-                    "style" : {}
-                },
-                {
-                    "path" : "pages/nearby_team",
-                    "style" : {
-                        "navigationBarTitleText" : "附近团长"
-                    }
-                },
-                {
-                    "path" : "comps/promotion_detail",
-                    "style" : {}
-                },
-                {
-                    "path" : "pages/claim_goods",
-                    "style" : {
-                        "navigationBarTitleText" : "快速取货"
-                    }
-                },
-                {
-                    "path" : "pages/nearby_team_map",
-                    "style" : {
-                        "navigationBarTitleText" : "附近团长"
-                    }
-                },
-                {
-                    "path" : "pages/about_us",
-                    "style" : {
-                        "navigationBarTitleText" : "关于新邻"
-                    }
-                },
-                {
-                    "path" : "pages/ad_apply_organ",
-                    "style" : {
-                        "navigationBarTitleText" : "申请团长"
-                    }
-                },
-                {
-                    "path" : "pages/browse_records",
-                    "style" : {
-                        "navigationBarTitleText" : "浏览记录"
-                    }
-                },
-                {
-                    "path" : "comps/dt_goods_list_home",
-                    "style" : {}
-                },
-                {
-                    "path" : "comps/dt_special",
-                    "style" : {}
-                }
-            ]
-        }
-    ],
-    "preloadRule" : {
-        "pages/life/life" : {
-            "network" : "all",
-            "packages" : [ "pagesM" ]
-        },
-        "pages/index/index" : {
-            "network" : "all",
-            "packages" : [ "pagesM" ]
-        }
-    },
-    "tabBar" : {
-        "color" : "#8a8a8a",
-        "backgroundColor" : "#FFFFFF",
-        "borderStyle" : "white",
-        "selectedColor" : "#59a5f0",
-        "list" : [
-            {
-                "pagePath" : "pages/index/index",
-                "text" : "小区",
-                "selectedIconPath" : "static/tarbar/home.png",
-                "iconPath" : "static/tarbar/home0.png"
-            },
-            {
-                "pagePath" : "pages/device/device",
-                "text" : "我家",
-                "selectedIconPath" : "static/tarbar/zhijia.png",
-                "iconPath" : "static/tarbar/zhijia0.png"
-            },
-            {
-                "pagePath" : "pages/wode/wode",
-                "text" : "我的",
-                "selectedIconPath" : "static/tarbar/my.png",
-                "iconPath" : "static/tarbar/my0.png"
-            }
-        ]
-    },
-    "globalStyle" : {
-        "navigationBarTitleText" : "新邻社区",
-        "backgroundColor" : "#FFFFFF",
-        "navigationBarBackgroundColor" : "#FFFFFF",
-        "navigationBarTextStyle" : "black"
-    },
-    "condition" : {
-        //模式配置,仅开发期间生效
-        "current" : 0, //当前激活的模式(list 的索引项)
-        "list" : [
-            {
-                "name" : "", //模式名称
-                "path" : "", //启动页面,必选
-                "query" : "" //启动参数,在页面的onLoad函数里面得到
-            }
-        ]
-    },
-    "navigateToMiniProgramAppIdList" : [ "wx90680ffd54c3b96c" ]
+	"easycom": {
+		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
+	},
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/guide/guide",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myhome/myhome",
+			"style": {
+				"navigationBarTitleText": "我家",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/life/life",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "周边",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/poster/poster",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/authorize_record/authorize_record",
+			"style": {
+				"navigationBarTitleText": "授权记录"
+			}
+		},
+		{
+			"path": "pages/authorize_record/openPass/openPass",
+			"style": {
+				"navigationBarTitleText": "访客授权"
+			}
+		},
+		{
+			"path": "pages/webview/webview",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/register/register",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/direction/direction",
+			"style": {
+				"navigationBarTitleText": "使用帮助",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/myInfo/myInfo",
+			"style": {
+				"navigationBarTitleText": "认证信息",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/news/news",
+			"style": {
+				"navigationBarTitleText": "我的消息",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/password/password",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myFamily/myFamily",
+			"style": {
+				"navigationBarTitleText": "家人管理"
+			}
+		},
+		{
+			"path": "pages/myFamily/addFamily/addFamily",
+			"style": {
+				"navigationBarTitleText": "添加家人"
+			}
+		},
+		{
+			"path": "pages/myFamily/editFamily/editFamily",
+			"style": {
+				"navigationBarTitleText": "编辑家人"
+			}
+		},
+		{
+			"path": "pages/myFamily/editApplyFamily/editApplyFamily",
+			"style": {
+				"navigationBarTitleText": "编辑申请"
+			}
+		},
+		{
+			"path": "pages/myFamily/activateFace/activateFace",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/bluetooth/bluetooth",
+			"style": {
+				"navigationBarTitleText": "蓝牙开门"
+			}
+		},
+		{
+			"path": "pages/choosePlot/choosePlot",
+			"style": {
+				"navigationBarTitleText": "选择小区"
+			}
+		},
+		{
+			"path": "pages/choosePlot/chooseUnit/chooseUnit",
+			"style": {
+				"navigationBarTitleText": "选择楼栋"
+			}
+		},
+		{
+			"path": "pages/choosePlot/chooseRoom/chooseRoom",
+			"style": {
+				"navigationBarTitleText": "选择房间"
+			}
+		},
+		{
+			"path": "pages/choosePlot/householdCert/householdCert",
+			"style": {
+				"navigationBarTitleText": "用户认证"
+			}
+		},
+		{
+			"path": "pages/myPassword/myPassword",
+			"style": {
+				"navigationBarTitleText": "访客密码"
+			}
+		},
+		{
+			"path": "pages/oneButton/oneButton",
+			"style": {
+				"navigationBarTitleText": "一键开门"
+			}
+		},
+		{
+			"path": "pages/record/record",
+			"style": {
+				"navigationBarTitleText": "访客记录"
+			}
+		},
+		{
+			"path": "pages/switchcity/switchcity",
+			"style": {
+				"navigationBarTitleText": "选择城市"
+			}
+		},
+		{
+			"path": "pages/uploadFace/uploadFace",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/demo/myfamily",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/demo/demo1",
+			"style": {
+				"navigationBarTitleText": "添加家人",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myhome/familyList",
+			"style": {
+				"navigationBarTitleText": "我的家人",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/demo/demo2",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/auth/auth",
+			"style": {
+				"navigationBarTitleText": "房屋认证",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/device/device",
+			"style": {
+				"navigationBarTitleText": "我家",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/wode",
+			"style": {
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/empty/empty",
+			"style": {
+				"navigationBarTitleText": "用户注册",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/empty/goauth",
+			"style": {
+				"navigationBarTitleText": "审核状态",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myFamily/add/add",
+			"style": {
+				"navigationBarTitleText": "添加家人",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/my-camera/my-camera",
+			"style": {
+				// "navigationBarTextStyle": "white",
+				// "navigationBarBackgroundColor": "#000",
+				"navigationBarTitleText": "相片拍摄"
+			}
+		},
+		{
+			"path": "pages/demo/demo4",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/demand/list",
+			"style": {
+				"navigationBarTitleText": "需求大厅",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/demand/detail",
+			"style": {
+				"navigationBarTitleText": "需求详情",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/demand/publish",
+			"style": {
+				"navigationBarTitleText": "我的需求信息",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/delivery/delivery",
+			"style": {
+				"navigationBarTitleText": "代领快递",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/community/community",
+			"style": {
+				"navigationBarTitleText": "社区",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/feedback/feedback",
+			"style": {
+				"navigationBarTitleText": "用户反馈",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/notice/notice",
+			"style": {
+				"navigationBarTitleText": "通知公告"
+			}
+		},
+		{
+			"path": "pages/notice/detail",
+			"style": {
+				"navigationBarTitleText": "公告详情",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/tool-list/epidemic-pass/epidemic-pass",
+			"style": {
+				"navigationBarTitleText": "防疫通行",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/tool-list/epidemic-pass/detail",
+			"style": {
+				"navigationBarTitleText": "出入通行证",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/tool-list/tool-list",
+			"style": {
+				"navigationBarTitleText": "功能列表",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/demo/demo5",
+			"style": {
+				"navigationBarTitleText": "访客开门",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/property/property",
+			"style": {
+				"navigationBarTitleText": "物业报修",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/property/detail",
+			"style": {
+				"navigationBarTitleText": "物业报修",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/property/list/list",
+			"style": {
+				"navigationBarTitleText": "我的报修",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/guide/guide_old",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/services/property/comment",
+			"style": {
+				"navigationBarTitleText": "物业评价",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/guest/guest",
+			"style": {
+				"navigationBarTitleText": "访客授权",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/guest/open_door",
+			"style": {
+				"navigationBarTitleText": "访客开门",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/demo/demo6",
+			"style": {
+				"navigationBarTitleText": "会员登陆",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/guest/guest_form",
+			"style": {
+				"navigationBarTitleText": "来访登记",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/community/detail/elderlyDetail",
+			"style": {
+				"navigationBarTitleText": "老人抓拍详情",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/community/detail/carDetail",
+			"style": {
+				"navigationBarTitleText": "车辆抓拍详情",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/develop/develop",
+			"style": {
+				"navigationBarTitleText": "即将开放",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/choosePlot/chooseBuilding/chooseBuilding",
+			"style": {
+				"navigationBarTitleText": "选择楼栋",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/tool-list/epidemic-pass/list",
+			"style": {
+				"navigationBarTitleText": "登记记录",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/healthCode/healthCode",
+			"style": {
+				"navigationBarTitleText": "防疫健康码",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myFamily/audit-detail/audit-detail",
+			"style": {
+				"navigationBarTitleText": "住户审核",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/wode/travelRecord/travelRecord",
+			"style": {
+				"navigationBarTitleText": "出入记录",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myCar/myCar",
+			"style": {
+				"navigationBarTitleText": "我的车辆",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/myCar/add",
+			"style": {
+				"navigationBarTitleText": "添加车辆",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/device/records",
+			"style": {
+				"navigationBarTitleText": "设备告警记录",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/test4/test4",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/bindRoom/bindRoom",
+			"style": {
+				"navigationBarTitleText": "绑定房间",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/open/open",
+			"style": {
+				"navigationBarTitleText": "门禁",
+				"enablePullDownRefresh": false
+			}
+
+		}
+	],
+	"subPackages": [{
+		"root": "pagesM/",
+		"pages": [{
+				"path": "pages/goods_des",
+				"style": {
+					"navigationBarTitleText": "商品详情",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/search",
+				"style": {
+					"navigationBarTitleText": "搜索商品",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/category",
+				"style": {
+					"navigationBarTitleText": "分类",
+					"navigationBarTextStyle": "#FFFFFF",
+					"navigationBarBackgroundColor": "#E42F2F"
+				}
+			},
+			{
+				"path": "pages/shop_car",
+				"style": {
+					"navigationBarTitleText": "购物车"
+				}
+			},
+			{
+				"path": "pages/mine",
+				"style": {
+					// "navigationBarTitleText": "我的",
+					// "navigationBarTextStyle": "white",
+					// "navigationBarBackgroundColor": "#E42F2F",
+					// "backgroundColorTop":"#E42F2F",
+					"enablePullDownRefresh": true,
+					"navigationStyle": "custom"
+				}
+			},
+			{
+				"path": "pages/mine_income",
+				"style": {
+					"navigationBarTitleText": "团长收益"
+				}
+			},
+			{
+				"path": "pages/applyToPromotion",
+				"style": {
+					"navigationBarTitleText": "团长申请"
+				}
+			},
+			{
+				"path": "pages/mine_collection",
+				"style": {
+					"navigationBarTitleText": "我的收藏"
+				}
+			},
+			{
+				"path": "pages/address_list",
+				"style": {
+					"navigationBarTitleText": "我的地址"
+				}
+			},
+			{
+				"path": "pages/address_edit",
+				"style": {
+					"navigationBarTitleText": "编辑地址"
+				}
+			},
+			{
+				"path": "pages/coupon_list",
+				"style": {
+					"navigationBarTitleText": "我的优惠券"
+				}
+			},
+			{
+				"path": "pages/coupon_select",
+				"style": {
+					"navigationBarTitleText": "选择优惠券"
+				}
+			},
+			{
+				"path": "pages/coupon_center",
+				"style": {
+					"navigationBarTitleText": "领券中心"
+				}
+			},
+			{
+				"path": "pages/integral",
+				"style": {
+					"navigationBarTitleText": "我的积分"
+				}
+			},
+			{
+				"path": "pages/integral_list",
+				"style": {
+					"navigationBarTitleText": "积分明细"
+				}
+			},
+			{
+				"path": "pages/integral_exchange",
+				"style": {
+					"navigationBarTitleText": "兑换详情"
+				}
+			},
+			{
+				"path": "pages/mine_setting",
+				"style": {
+					"navigationBarTitleText": "系统设置"
+				}
+			},
+			{
+				"path": "pages/mine_protocal",
+				"style": {
+					"navigationBarTitleText": "用户协议"
+				}
+			},
+			{
+				"path": "pages/mine_info",
+				"style": {
+					"navigationBarTitleText": "个人信息"
+				}
+			},
+			{
+				"path": "pages/mine_interest",
+				"style": {
+					"navigationBarTitleText": "会员权益"
+				}
+			},
+			{
+				"path": "pages/mine_order_list",
+				"style": {
+					"navigationBarTitleText": "我的订单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "pages/mine_sale_list",
+				"style": {
+					"navigationBarTitleText": "我的售后"
+				}
+			},
+			{
+				"path": "pages/after_sale_choose",
+				"style": {
+					"navigationBarTitleText": "选择申请售后货物"
+				}
+			},
+			{
+				"path": "pages/after_sale_apply",
+				"style": {
+					"navigationBarTitleText": "申请售后"
+				}
+			},
+			{
+				"path": "pages/after_sale_submit",
+				"style": {
+					"navigationBarTitleText": "申请售后"
+				}
+			},
+			{
+				"path": "pages/goods_manual",
+				"style": {
+					"navigationBarTitleText": "说明书",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/goods_comment_list",
+				"style": {
+					"navigationBarTitleText": "全部评价",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/goods_list",
+				"style": {
+					"navigationBarTitleText": "商品列表",
+					"navigationBarBackgroundColor": "#FFFFFF",
+					"navigationStyle": "custom"
+				}
+			},
+			{
+				"path": "pages/order_confirm",
+				"style": {
+					"navigationBarTitleText": "确认下单",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/order_pay",
+				"style": {
+					"navigationBarTitleText": "在线支付",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/pay_success",
+				"style": {
+					"navigationBarTitleText": "支付成功",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/mention_store_list",
+				"style": {
+					"navigationBarTitleText": "选择提货门店",
+					"backgroundColor": "#F2F2F2"
+				}
+			},
+			{
+				"path": "pages/order_appraise",
+				"style": {
+					"navigationBarTitleText": "填写评价"
+				}
+			},
+			{
+				"path": "pages/order_detail",
+				"style": {
+					"navigationBarTitleText": "订单详情",
+					"navigationBarTextStyle": "white",
+					"navigationBarBackgroundColor": "#2f7ff5"
+				}
+			},
+			{
+				"path": "pages/order_sale_detail",
+				"style": {
+					"navigationBarTitleText": "售后详情",
+					"navigationBarTextStyle": "white",
+					"navigationBarBackgroundColor": "#E42F2F"
+				}
+			},
+			{
+				"path": "pages/common/webview",
+				"style": {}
+			},
+			{
+				"path": "pages/my_integral",
+				"style": {
+					"navigationBarTitleText": "我的积分"
+				}
+			},
+			{
+				"path": "pages/share_team",
+				"style": {
+					"navigationBarTitleText": "我的分享团队"
+				}
+			},
+			{
+				"path": "pages/my_earnings",
+				"style": {
+					"navigationBarTitleText": "我的分享团队"
+				}
+			},
+			{
+				"path": "pages/share_team_goods",
+				"style": {
+					"navigationBarTitleText": "我的分享团队"
+				}
+			},
+			{
+				"path": "pages/earn_records",
+				"style": {
+					"navigationBarTitleText": "收益记录"
+				}
+			},
+			{
+				"path": "pages/earn_details",
+				"style": {
+					"navigationBarTitleText": "收益详情"
+				}
+			},
+			{
+				"path": "pages/balance_records",
+				"style": {
+					"navigationBarTitleText": "结算记录"
+				}
+			},
+			{
+				"path": "pages/my_invite",
+				"style": {
+					"navigationBarTitleText": "我邀请的人"
+				}
+			},
+			{
+				"path": "pages/user_invite",
+				"style": {
+					"navigationBarTitleText": ""
+				}
+			},
+			{
+				"path": "pages/discounts_goods",
+				"style": {
+					"navigationBarTitleText": "分销商品"
+				}
+			},
+			{
+				"path": "pages/common/ad_textView",
+				"style": {}
+			},
+			{
+				"path": "comps/tki_qrcode",
+				"style": {}
+			},
+			{
+				"path": "pages/nearby_team",
+				"style": {
+					"navigationBarTitleText": "附近团长"
+				}
+			},
+			{
+				"path": "comps/promotion_detail",
+				"style": {}
+			},
+			{
+				"path": "pages/claim_goods",
+				"style": {
+					"navigationBarTitleText": "快速取货"
+				}
+			},
+			{
+				"path": "pages/nearby_team_map",
+				"style": {
+					"navigationBarTitleText": "附近团长"
+				}
+			},
+			{
+				"path": "pages/about_us",
+				"style": {
+					"navigationBarTitleText": "关于新邻"
+				}
+			},
+			{
+				"path": "pages/ad_apply_organ",
+				"style": {
+					"navigationBarTitleText": "申请团长"
+				}
+			},
+			{
+				"path": "pages/browse_records",
+				"style": {
+					"navigationBarTitleText": "浏览记录"
+				}
+			},
+			{
+				"path": "comps/dt_goods_list_home",
+				"style": {}
+			},
+			{
+				"path": "comps/dt_special",
+				"style": {}
+			}
+		]
+	}],
+	"preloadRule": {
+		"pages/life/life": {
+			"network": "all",
+			"packages": ["pagesM"]
+		},
+		"pages/index/index": {
+			"network": "all",
+			"packages": ["pagesM"]
+		}
+	},
+	"tabBar": {
+		"color": "#8a8a8a",
+		"backgroundColor": "#FFFFFF",
+		"borderStyle": "white",
+		"selectedColor": "#59a5f0",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"text": "小区",
+				"selectedIconPath": "static/tarbar/home.png",
+				"iconPath": "static/tarbar/home0.png"
+			},
+			{
+				"pagePath": "pages/open/open",
+				"text": "门禁",
+				"selectedIconPath": "static/tarbar/zhijia.png",
+				"iconPath": "static/tarbar/zhijia0.png"
+			},
+			{
+				"pagePath": "pages/wode/wode",
+				"text": "我的",
+				"selectedIconPath": "static/tarbar/my.png",
+				"iconPath": "static/tarbar/my0.png"
+			}
+		]
+	},
+	"globalStyle": {
+		"navigationBarTitleText": "新邻社区",
+		"backgroundColor": "#FFFFFF",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"navigationBarTextStyle": "black"
+	},
+	"condition": {
+		//模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [{
+			"name": "", //模式名称
+			"path": "", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
+	},
+	"navigateToMiniProgramAppIdList": ["wx90680ffd54c3b96c"]
 }

+ 428 - 410
pages/authorize_record/authorize_record.vue

@@ -1,437 +1,455 @@
 <template>
-<view :class="$isEmpty(list)?'empty-wrap':''">
-<u-popup v-model="codeModelShow" mode="center"  width ="70%">
-	<view class="padding-bottom-50">
-		<view class="text-center text-df text-gray padding-50">
-			长按发送给好友
-		</view>
-		<view class="flex justify-center align-center">
-			<image :show-menu-by-longpress="true" :src="codeImg" style="width: 400rpx;height: 400rpx;" ></image>
-		</view>
-	</view>
-</u-popup>	
-
-<view class="bg-white padding-20 flex justify-between " style="box-sizing: border-box;position: fixed;top: 0;z-index: 999;">
-	<view class="text-sm text-gray padding-top-10">
-		<text>只显示最近一个月内的授权记录</text>
-	</view>
-	<navigator url="../record/record" class="cu-btn line-btn sm round">
-		<text class="cuIcon-footprint padding-right-sm"></text>
-		<text>访客记录</text>
-		<u-badge :is-center="true" type="error" :count="vuex_auth_audit_count"></u-badge>
-	</navigator>
-</view>
-<view style="height:88rpx;"></view>
-
-<view class="container " v-if="list.length>0">
-  <view class="record_content">
-	   <view class="data" v-for="(item, index) in list" :key="index"  style="border-bottom: 1rpx solid #b6b6b6;">
-	   	<view class="top">
-	   		<view class="left">
-	   			<u-icon name="map-fill" :size="30" color="#2f7ff5"></u-icon>
-				<view class="padding-left-sm" >
-					授权位置: {{item.residentialName}} {{item.buildingName}} {{item.unitName}} {{item.roomName}}
+	<view :class="$isEmpty(list)?'empty-wrap':''">
+		<u-popup v-model="codeModelShow" mode="center" width="70%">
+			<view class="padding-bottom-50">
+				<view class="text-center text-df text-gray padding-50">
+					长按发送给好友
+				</view>
+				<view class="flex justify-center align-center">
+					<image :show-menu-by-longpress="true" :src="codeImg" style="width: 400rpx;height: 400rpx;"></image>
 				</view>
-	   		</view>
-			<view class="right text-orange">
-				<text  v-if="item.guestType==0">朋友</text>
-				<text  v-if="item.guestType==1">外卖</text>
-				<text  v-if="item.guestType==2">快递</text>
-				<text  v-if="item.guestType==3">其他</text>
 			</view>
-	   	</view>
-	   	<view class="item">
-	   		<view class="left">
-	   			<view class="content" >
-					
-					<view class="">
-						<u-icon name="hourglass" :size="30" color="#2f7ff5"></u-icon>
-						<text class="padding-left-sm">授权时间:{{item.beginDate}}</text>
+		</u-popup>
+
+		<view class="bg-white padding-20 flex justify-between "
+			style="box-sizing: border-box;position: fixed;top: 0;z-index: 999;">
+			<view class="text-sm text-gray padding-top-10">
+				<text>只显示最近一个月内的授权记录</text>
+			</view>
+			<navigator url="../record/record" class="cu-btn line-btn sm round">
+				<text class="cuIcon-footprint padding-right-sm"></text>
+				<text>访客记录</text>
+				<u-badge :is-center="true" type="error" :count="vuex_auth_audit_count"></u-badge>
+			</navigator>
+		</view>
+		<view style="height:88rpx;"></view>
+
+		<view class="container " v-if="list.length>0">
+			<view class="record_content">
+				<view class="data" v-for="(item, index) in list" :key="index"
+					style="border-bottom: 1rpx solid #b6b6b6;">
+					<view class="top">
+						<view class="left">
+							<u-icon name="map-fill" :size="30" color="#2f7ff5"></u-icon>
+							<view class="padding-left-sm">
+								授权位置: {{item.residentialName}}-{{item.buildingName}}-{{item.unitName}}-{{item.roomName}}
+							</view>
+						</view>
+						<view class="right text-orange">
+							<text v-if="item.guestType==0">朋友</text>
+							<text v-if="item.guestType==1">外卖</text>
+							<text v-if="item.guestType==2">快递</text>
+							<text v-if="item.guestType==3">其他</text>
+						</view>
 					</view>
-					<view class="">
-						<u-icon name="clock" :size="30" color="#2f7ff5"></u-icon>
-						<text class="padding-left-sm">失效时间:{{item.endDate}}</text>
+					<view class="item">
+						<view class="left">
+							<view class="content">
+
+								<view class="">
+									<u-icon name="hourglass" :size="30" color="#2f7ff5"></u-icon>
+									<text class="padding-left-sm">授权时间:{{item.beginDate}}</text>
+								</view>
+								<view class="">
+									<u-icon name="clock" :size="30" color="#2f7ff5"></u-icon>
+									<text class="padding-left-sm">失效时间:{{item.endDate}}</text>
+								</view>
+							</view>
+						</view>
 					</view>
-	   			</view>
-	   		</view>
-	   	</view>
-	   	<view class="bottom" >
-	   		<button v-if="item.enableType != 1" @click="shareData=item;shareShow=true;" class="cu-btn line-btn sm round margin-right-sm"  >
-	   			分享
-	   		</button>
-	   		<view v-if="item.enableType != 1" @tap.stop="backout" :data-id="item.id" class="cu-btn bg-btn sm round">
-	   			撤销
-	   		</view>
-			<button v-if="item.enableType == 1" class="cu-btn line-btn sm round margin-right-sm"  >
-				已失效
-			</button>
-	   	</view>
-	   </view>
-  </view>
-</view>
-<view v-show="!showModal" @tap="addOpenPassword" class=" footer-fixed " style="z-index: 99;">
-	<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-		授权开门
-	</view>
-</view>
-<view class="default"  v-if="$isEmpty(list)">
-  <image src="/static/common/empty.png" mode="heightFix"></image>
-  <view>
-    <text>没有获取到相关记录</text>
-  </view>
-</view>
-<u-popup v-model="shareShow" mode="bottom" height="auto" >
-	<view class="flex flex-direction justify-between">
-		<view class="">
-			<button open-type="share" @click="shareShow=false" class="cu-btn flex bg-white " style="border-radius: 0;width: 100%;padding: 50rpx;border-bottom: 1rpx solid #ebebeb;">
-				分享给好友
-			</button>
-			<button @click="createQrcode" class="cu-btn flex bg-white " style="border-radius: 0;padding: 50rpx;border-bottom: 1rpx solid #ebebeb;">
-				生成二维码
-			</button>
+					<view class="bottom">
+						<button v-if="item.enableType != 1" @click="shareData=item;shareShow=true;"
+							class="cu-btn line-btn sm round margin-right-sm">
+							分享
+						</button>
+						<view v-if="item.enableType != 1" @tap.stop="backout" :data-id="item.id"
+							class="cu-btn bg-btn sm round">
+							撤销
+						</view>
+						<button v-if="item.enableType == 1" class="cu-btn line-red sm round margin-right-sm">
+							已失效
+						</button>
+					</view>
+				</view>
+			</view>
 		</view>
-		<button class="cu-btn flex bg-white " style="padding: 55rpx;">
-			取消
-		</button>
+		<view v-show="!showModal" @tap="addOpenPassword" class=" footer-fixed " style="z-index: 99;"
+			:style="{marginBottom:safeAreaBottom + 'rpx'}">
+			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+				授权开门
+			</view>
+		</view>
+		<view class="default" v-if="$isEmpty(list)">
+			<image src="/static/common/empty.png" mode="heightFix"></image>
+			<view>
+				<text>没有获取到相关记录</text>
+			</view>
+		</view>
+		<u-popup v-model="shareShow" mode="bottom" height="auto">
+			<view class="flex flex-direction justify-between">
+				<view class="">
+					<button open-type="share" @click="shareShow=false" class="cu-btn flex bg-white "
+						style="border-radius: 0;width: 100%;padding: 50rpx;border-bottom: 1rpx solid #ebebeb;">
+						分享给好友
+					</button>
+					<button @click="createQrcode" class="cu-btn flex bg-white "
+						style="border-radius: 0;padding: 50rpx;border-bottom: 1rpx solid #ebebeb;">
+						生成二维码
+					</button>
+				</view>
+				<button class="cu-btn flex bg-white " style="padding: 55rpx;">
+					取消
+				</button>
+			</view>
+		</u-popup>
+		<!-- <u-action-sheet :list="shareList" v-model="shareShow"></u-action-sheet> -->
 	</view>
-</u-popup>
-<!-- <u-action-sheet :list="shareList" v-model="shareShow"></u-action-sheet> -->
-</view>
 </template>
 
 <script>
-var util = require("../../utils/util.js"); //获取app实例
-//获取app实例
-var app = getApp();
-
-export default {
-  data() {
-    return {
-	  count:0,
-		
-	  codeModelShow:false,
-	  codeImg:'',
-	  
-	  accessToken:'',
-	  shareData:{},
-	  shareShow:false,
-	  shareList:[
-		  {
-			  text:'分享给好友',
-		  },
-		  {
-			  text:'生成二维码'
-		  }
-	  ],
-	  
-	  doorNeedAudit:0,
-      list: null,
-    };
-  },
-  components: {},
-  props: {},
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-	  this.doorNeedAudit=uni.getStorageSync("doorNeedAudit")
-      this.getRecord();
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-    //回退的时候刷新
-    let isFlush = uni.getStorageSync("isFlush");
-    if (isFlush) {
-      this.getRecord();
-      uni.setStorageSync("isFlush", false);
-    }
-  },
-  //转发
-  onShareAppMessage: function (ops) {
-	  let title ="访问房间:"+this.shareData.roomName+ "; 有效期:   " + this.shareData.beginDate + " 到 " + this.shareData.endDate
-	  let path="/pages/guest/guest_form?id="+this.shareData.id+"&doorNeedAudit="+this.doorNeedAudit+"&memberId="+app.globalData.member.id
-	  this.shareShow=false
-	  return {
-		title: title,
-		path:path,
-		imageUrl: "/static/clock.png"
-	  };
-  },
-  methods: {
-	  /**
-	   * 生成二维码
-	   */
-	createQrcode(){
-		this.shareShow=false
-		this.getAccessToken()
-	},
-	/**
-	 * 获取accessToken
-	 */
-	getAccessToken(){
-		let that=this
-		// let operation='miniprogram/getAccessToken'
-		let params={
-			appId:this.$wxData.APPID,
-			secret:this.$wxData.SECRET,
-			grantType:this.$wxData.GRANTTYPE
-		}
-		that.$http.getAccessToken(params).then(res =>{
-			that.getGenerateCode(res.data.access_token)
-			
-		})
-	},
-	/**
-	 * 获取微信小程序码
-	 */
-	getGenerateCode(accessToken){
-		uni.showLoading({
-			title:"二维码生成中.."
-		})
-		let that=this
-		let params={
-			access_token:accessToken,
-			//详情id+手机号
-			scene:this.shareData.id+","+this.doorNeedAudit+","+app.globalData.member.id,
-			page:'pages/guest/guest_form',
-			width:80
+	var util = require("../../utils/util.js"); //获取app实例
+	//获取app实例
+	var app = getApp();
+
+	export default {
+		data() {
+			return {
+				count: 0,
+
+				codeModelShow: false,
+				codeImg: '',
+
+				accessToken: '',
+				shareData: {},
+				shareShow: false,
+				shareList: [{
+						text: '分享给好友',
+					},
+					{
+						text: '生成二维码'
+					}
+				],
+
+				doorNeedAudit: 0,
+				list: null,
+			};
+		},
+		components: {},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			this.doorNeedAudit = uni.getStorageSync("doorNeedAudit")
+			this.getRecord();
+		},
+
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: function() {
+			//回退的时候刷新
+			let isFlush = uni.getStorageSync("isFlush");
+			if (isFlush) {
+				this.getRecord();
+				uni.setStorageSync("isFlush", false);
+			}
+		},
+		//转发
+		onShareAppMessage: function(ops) {
+			let title = "访问房间:" + this.shareData.roomName + "; 有效期:   " + this.shareData.beginDate + " 到 " + this
+				.shareData.endDate
+			let path = "/pages/guest/guest_form?id=" + this.shareData.id + "&doorNeedAudit=" + this.doorNeedAudit +
+				"&memberId=" + app.globalData.member.id
+			this.shareShow = false
+			return {
+				title: title,
+				path: path,
+				imageUrl: "/static/clock.png"
+			};
+		},
+		methods: {
+			/**
+			 * 生成二维码
+			 */
+			createQrcode() {
+				this.shareShow = false
+				this.getAccessToken()
+			},
+			/**
+			 * 获取accessToken
+			 */
+			getAccessToken() {
+				let that = this
+				// let operation='miniprogram/getAccessToken'
+				let params = {
+					appId: this.$wxData.APPID,
+					secret: this.$wxData.SECRET,
+					grantType: this.$wxData.GRANTTYPE
+				}
+				that.$http.getAccessToken(params).then(res => {
+					that.getGenerateCode(res.data.access_token)
+
+				})
+			},
+			/**
+			 * 获取微信小程序码
+			 */
+			getGenerateCode(accessToken) {
+				uni.showLoading({
+					title: "二维码生成中.."
+				})
+				let that = this
+				let params = {
+					access_token: accessToken,
+					//详情id+手机号
+					scene: this.shareData.id + "," + this.doorNeedAudit + "," + app.globalData.member.id,
+					page: 'pages/guest/guest_form',
+					width: 80
+				}
+				// let operation="miniprogram/generateCode"
+				setTimeout(() => {
+					that.$http.generateCode(params).then(res => {
+						that.codeImg = res.data
+						uni.hideLoading()
+						that.codeModelShow = true
+
+					})
+				}, 1000)
+			},
+			/**新增 */
+			addOpenPassword: function() {
+				uni.navigateTo({
+					url: '/pages/authorize_record/openPass/openPass'
+				});
+			},
+			//获取密码授权记录
+			getRecord: function() {
+				let params = {
+					memberId: this.vuex_member.id,
+					query: {
+						current: 1,
+						size: 500
+					}
+				}
+				this.$http.getGuestAuthorizeList(params).then(res => {
+					if (res.data.success) {
+						this.list = res.data.data.records
+						this.list.forEach(item=>{
+							let endDate=this.getTime(item.endDate)
+							let now=new Date().getTime()
+							if (now>endDate) {
+								item.enableType=1
+							}
+						})
+					}
+				})
+			},
+			getTime(value) {
+				let date = typeof(value) == 'string' ? value.replace(/\-/g, '/') : value
+				return new Date(date).getTime()
+			},
+			//撤销密码
+			backout: function(event) {
+				let id = event.currentTarget.dataset.id;
+				this.$http.guestAuthorizeCancel(id).then(res => {
+					if (res.data.success) {
+						this.$dialog.showModal('撤销成功', false).then(() => {
+							this.getRecord()
+						})
+					} else {
+						this.$u.toast('撤销失败')
+					}
+				});
+			}
 		}
-		// let operation="miniprogram/generateCode"
-		setTimeout(()=>{
-			that.$http.generateCode(params).then(res=>{
-				that.codeImg=res.data
-				uni.hideLoading()
-				that.codeModelShow=true
-				
-			})
-		},1000)
-	},
-    /**新增 */
-    addOpenPassword: function () {
-      uni.navigateTo({
-        url: '/pages/authorize_record/openPass/openPass'
-      });
-    },
-    //获取密码授权记录
-    getRecord: function () {
-      let that = this;
-      let params = {
-		  pageSize:50
-	  };
-      params['member_id'] = app.globalData.member.id;
-	  params['residential_id'] = uni.getStorageSync("residentialId");
-      ;
-      // let operation = 'guestAuthorize/getListByMemberId';
-      that.$http.getGuestAuthorizeList(params).then (res =>{
-		  console.info("获取数据结构" + res.data.result_msg); //获取成功
-		  if (res.data.result_code == 1) {
-		    let list = res.data.list;
-		  
-		    for (let i in list) {
-		      list[i].beginDate = util.formatTime(list[i].beginDate);
-		      list[i].endDate = util.formatTime(list[i].endDate);
-		    }
-		  
-		    that.setData({
-		      list: list
-		    });
-		  }
-        
-      });
-    },
-    //撤销密码
-    backout: function (event) {
-      let id = event.currentTarget.dataset.id;
-      let that = this;
-      let params = {};
-      params['guest_authorize_id'] = id;
-      params['member_id'] = app.globalData.member.id;
-      ;
-      // let operation = 'guestAuthorize/cancel';
-      that.$http.guestAuthorizeCancel(params).then (res =>{
-		  console.info("获取数据结构" + res.data.result_msg); //获取成功
-		  
-		  if (res.data.result_code == 1) {
-		    app.globalData.oneFailHint(res.data.result_msg, function () {
-		      that.getRecord();
-		    });
-		  } else {
-		    app.globalData.oneFailHint(res.data.result_msg);
-		  }
-        
-      });
-    }
-  }
-};
+	};
 </script>
 <style lang="scss" scoped>
+	.data {
+		background-color: #FFFFFF;
+		width: 720rpx;
+		margin: 10rpx auto;
+		border-radius: 6rpx;
+		box-sizing: border-box;
+		padding: 20rpx;
+		font-size: 28rpx;
 
-.data {
-	background-color: #FFFFFF;
-	width: 720rpx;
-	margin:10rpx auto;
-	border-radius: 6rpx;
-	box-sizing: border-box;
-	padding: 20rpx;
-	font-size: 28rpx;
-	.top {
-		display: flex;
-		justify-content: space-between;
-		.left {
+		.top {
 			display: flex;
-			align-items: center;
-			.title {
-				margin: 0 10rpx;
-				font-size: 32rpx;
-				font-weight: bold;
+			justify-content: space-between;
+
+			.left {
+				display: flex;
+				align-items: center;
+
+				.title {
+					margin: 0 10rpx;
+					font-size: 32rpx;
+					font-weight: bold;
+				}
 			}
 		}
-	}
-	.item {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		margin: 40rpx 0 20rpx 0;
-		.left {
+
+		.item {
 			display: flex;
-			.content {
-				padding-left: 30rpx;
-				view{
-					padding-bottom: 16rpx;
+			flex-direction: row;
+			justify-content: space-between;
+			margin: 40rpx 0 20rpx 0;
+
+			.left {
+				display: flex;
+
+				.content {
+					padding-left: 30rpx;
+
+					view {
+						padding-bottom: 16rpx;
+					}
 				}
 			}
 		}
+
+		.bottom {
+			display: flex;
+			margin-top: 20rpx;
+			justify-content: flex-end;
+			align-items: center;
+		}
+	}
+
+	page {
+		overflow-y: scroll;
 	}
-	.bottom {
+
+
+	.container {
+		height: 100%;
 		display: flex;
+		flex-direction: column;
+		box-sizing: border-box;
+	}
+
+	.nav {
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		border-bottom: 1rpx solid #c7c7c9;
+		background: #fff;
+		color: #c7c7c9;
+		font-size: 24rpx;
+	}
+
+	.record_content {
+		padding-bottom: 110rpx;
+	}
+
+	.list-item {
+		border-bottom: 1rpx solid #dddddd;
+		line-height: 60rpx;
+		padding: 20rpx;
+		color: #333;
+		position: relative;
+		box-sizing: border-box;
 		margin-top: 20rpx;
-		justify-content: flex-end;
-		align-items: center;
+		background: #fff;
 	}
-}
-	
-page{
-  overflow-y: scroll;
-}
-
-
-.container {
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  box-sizing: border-box;
-}
-
-.nav {
-  height: 80rpx;
-  line-height: 80rpx;
-  text-align: center;
-  border-bottom: 1rpx solid #c7c7c9;
-  background: #fff;
-  color: #c7c7c9;
-  font-size: 24rpx;
-}
-
-.record_content{
-  padding-bottom: 110rpx;
-}
-.list-item {
-	border-bottom: 1rpx solid #dddddd;
-  line-height: 60rpx;
-  padding: 20rpx;
-  color: #333;
-  position: relative;
-  box-sizing: border-box;
-  margin-top: 20rpx;
-  background: #fff;
-}
-
-.list-item .btn {
-  position: absolute;
-  right: 20rpx;
-  top: 50%;
-  transform: translate(0, -50%);
-}
-
-.list-item .btn .check_password, .list-item .btn .withdrawn {
-  width: 120rpx;
-  border-radius: 5000rpx;
-  padding: 0 24rpx;
-  height: 56rpx;
-  text-align: center;
-  margin: 14rpx;
-  color: $base-btn-color;
-  border:2rpx solid $base-btn-color;
-}
-.list-item .btn .check_password, .list-item .btn .states {
-
-  color: #999;
-  border:none;
-}
-
-.list-item .btn .withdrawn.state {
-  border: none;
-  color: #999;
-}
-.default {
-  text-align: center;
-  position: fixed;
-  left: 50%;
-  top: 40%;
-  transform: translate(-50%, -50%);
-}
-.default text{
-	color: #AAAAAA;
-}
-.default image {
-  height: 160rpx;
-  display: inline-block;
-}
-.empty-wrap{
-	background-color: #FFFFFF;
-	min-height: 100vh;
-}
-
-//分享
-.drawer_screen {
-	width: 100%;
-	height: 100%;
-	position: fixed;
-	top: 0;
-	left: 0;
-	z-index: 1000;
-	background: #000;
-	opacity: 0.2;
-	overflow: hidden;
-}
-.drawer_attr_box {
-	width: 100%;
-	overflow: hidden;
-	position: fixed;
-	bottom: 0;
-	left: 0;
-	z-index: 1001;
-	background: rgb(242, 242, 242);
-	.drawer_content {
-		overflow-y: scroll;
-		.btn {
-			background: #fff;
-			font-size: 30upx;
-			color: rgb(51, 51, 51);
-			border-bottom: 1px solid #e8e8e8;
-			border-radius: 0;
-			padding: 12upx 0;
-		}
-		.btn::after {
-			border: none;
-		}
-		.detail-cancel-btn {
-			margin-top: 10upx;
+
+	.list-item .btn {
+		position: absolute;
+		right: 20rpx;
+		top: 50%;
+		transform: translate(0, -50%);
+	}
+
+	.list-item .btn .check_password,
+	.list-item .btn .withdrawn {
+		width: 120rpx;
+		border-radius: 5000rpx;
+		padding: 0 24rpx;
+		height: 56rpx;
+		text-align: center;
+		margin: 14rpx;
+		color: $base-btn-color;
+		border: 2rpx solid $base-btn-color;
+	}
+
+	.list-item .btn .check_password,
+	.list-item .btn .states {
+
+		color: #999;
+		border: none;
+	}
+
+	.list-item .btn .withdrawn.state {
+		border: none;
+		color: #999;
+	}
+
+	.default {
+		text-align: center;
+		position: fixed;
+		left: 50%;
+		top: 40%;
+		transform: translate(-50%, -50%);
+	}
+
+	.default text {
+		color: #AAAAAA;
+	}
+
+	.default image {
+		height: 160rpx;
+		display: inline-block;
+	}
+
+	.empty-wrap {
+		background-color: #FFFFFF;
+		min-height: 100vh;
+	}
+
+	//分享
+	.drawer_screen {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+		background: #000;
+		opacity: 0.2;
+		overflow: hidden;
+	}
+
+	.drawer_attr_box {
+		width: 100%;
+		overflow: hidden;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index: 1001;
+		background: rgb(242, 242, 242);
+
+		.drawer_content {
+			overflow-y: scroll;
+
+			.btn {
+				background: #fff;
+				font-size: 30upx;
+				color: rgb(51, 51, 51);
+				border-bottom: 1px solid #e8e8e8;
+				border-radius: 0;
+				padding: 12upx 0;
+			}
+
+			.btn::after {
+				border: none;
+			}
+
+			.detail-cancel-btn {
+				margin-top: 10upx;
+			}
 		}
 	}
-}
-</style>
+</style>

+ 425 - 451
pages/authorize_record/openPass/openPass.vue

@@ -1,459 +1,433 @@
 <template>
-<view style="background-color: #FFFFFF;height: 100vh;">
-<!--pages/openPass/openPass.wxml-->
-<view class="container edit_wrap" >
-  <view class="form_group">
-    <text class="type">选择房间:</text>
-   <view class="ar_picker " style="background:#fff;border-bottom: 1rpx solid #ddd;" @click="roomSelectShow=true">
-      <view class="ar_picker_wrap">
-        <text>{{selectRoomName?selectRoomName:room_list[0].name}}</text>
-      </view>
-    </view>
-  </view>
-   <view class="form_group" >
-
-    <view class="tui-picker-content">
-      <text class="type">访客类型:</text>
-      <view class="flex between itemBox">
-        <view v-for="(item, index) in guestTypeArray" :key="index" :class="guestTypeIndex == index ? 'active':''" @tap="guestTypethis" :data-thisindex="index">
-          <text>{{item}}</text>
-        </view>
-      </view>
-
-    </view>
-
-  </view>
-  <view class="form_group" >
-    <view class="tui-picker-content">
-      <text class="type">授权有效时间:</text>
-      <view class="flex between itemBox">
-        <view v-for="(item, index) in numArray" :key="index" :class="activeIndex == index ? 'active':''" @tap="activethis" :data-thisindex="index">
-          <text>{{item}}小时</text>
-        </view>
-      </view>
-
-    </view>
-  </view>
-<!-- <view class="submit_btn">
- <button class="ar_btn" @tap="getGuestAuthorize">获取开门密码</button>
-</view> -->
-<view @tap="getGuestAuthorize" class=" footer-fixed " style="z-index: 99;">
-	<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-		确认授权
+	<view style="background-color: #FFFFFF;height: 100vh;">
+		<!--pages/openPass/openPass.wxml-->
+		<view class="container edit_wrap">
+			<view class="form_group">
+				<text class="type">选择房间:</text>
+				<view class="ar_picker " style="background:#fff;border-bottom: 1rpx solid #ddd;"
+					@click="roomSelectShow=true">
+					<view class="ar_picker_wrap">
+						<text>{{selectRoomName?selectRoomName:room_list[0].address}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="form_group">
+
+				<view class="tui-picker-content">
+					<text class="type">访客类型:</text>
+					<view class="flex between itemBox">
+						<view v-for="(item, index) in guestTypeArray" :key="index"
+							:class="guestTypeIndex == index ? 'active':''" @tap="guestTypethis" :data-thisindex="index">
+							<text>{{item}}</text>
+						</view>
+					</view>
+
+				</view>
+
+			</view>
+			<view class="form_group">
+				<view class="tui-picker-content">
+					<text class="type">授权有效时间:</text>
+					<view class="flex between itemBox">
+						<view v-for="(item, index) in numArray" :key="index" :class="activeIndex == index ? 'active':''"
+							@tap="activethis" :data-thisindex="index">
+							<text>{{item}}小时</text>
+						</view>
+					</view>
+
+				</view>
+			</view>
+			<view @tap="getGuestAuthorize" class=" footer-fixed " style="z-index: 99;"
+				:style="{marginBottom:safeAreaBottom + 'rpx'}">
+				<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+					确认授权
+				</view>
+			</view>
+		</view>
+
+
+		<!--弹窗-->
+		<view class="modal-mask" @tap="closeModal" catchtouchmove="preventTouchMove" v-if="showModal"></view>
+		<view class="modal-dialog" v-if="showModal">
+			<view class="modal-title">提示</view>
+			<view class="modal-content">
+				<view class="modal-input">
+					<text class="password">授权成功,请转发给好友填写表单</text>
+				</view>
+			</view>
+			<view class="modal-footer">
+				<button class="btn-confirm" @click="showModal=false" data-status="confirm">暂不转发</button>
+				<button class="btn-cancel" open-type="share" data-status="cancel">立即转发</button>
+			</view>
+		</view>
+		<u-select z-index="999" mode="single-column" value-name="id" label-name="address" v-model="roomSelectShow"
+			:list="room_list" @confirm="roomChange"></u-select>
 	</view>
-</view>
-</view>
-
-
-<!--弹窗-->
-<view class="modal-mask" @tap="closeModal" catchtouchmove="preventTouchMove" v-if="showModal"></view>
-<view class="modal-dialog" v-if="showModal">
-  <view class="modal-title">提示</view>
-    <view class="modal-content">
-      <view class="modal-input">
-        <text class="password">授权成功,请转发给好友填写表单</text>
-      </view>
-    </view>
-    <view class="modal-footer">
-      <button class="btn-confirm" @click="showModal=false" data-status="confirm">暂不转发</button>
-	  <button class="btn-cancel" open-type="share" data-status="cancel">立即转发</button>
-    </view>
-</view>
-<u-select z-index="999"  mode="single-column"  value-name="id" label-name="name" v-model="roomSelectShow" :list="room_list" @confirm="roomChange"></u-select>
-</view>
 </template>
 
 <script>
-// 访客授权
-//获取app实例
-var app = getApp();
-var util = require("../../../utils/util.js");
-
-export default {
-  data() {
-    return {
-	  //是否需要审核通过访客表单后才能开门
-	  doorNeedAudit:0,
-		
-	  roomSelectShow:false,
-	  selectRoomName:'',
-	  selectRoomId:0,
-	
-	//授权记录 的id
-	  id:'',
-		
-      room_list: null,
-      minusStatus: 'disable',
-      //获取开门密码
-      showModal: false,
-      //访客类型
-      guestTypeIndex: 0,
-      //默认选中第一个
-      guestTypeArray: ['朋友', '外卖', '快递', '其他'],
-      //密码有效期
-      activeIndex: 0,
-      //默认选中第一个
-      numArray: [1, 2, 5, 8, 24, 48],
-      begin_date: "",
-      end_date: ""
-    };
-  },
-
-  components: {},
-  props: {},
-
-  /**
-   * 监听页面加载
-   */
-  onLoad() {
-	this.doorNeedAudit=uni.getStorageSync("doorNeedAudit")
-    //禁用头部分享
-    uni.hideShareMenu({});
-    let room_list = app.globalData.room_list;
-    if (this.$isEmpty(room_list)) {
-		//获取房屋信息
-		this.geRoomByMemberId();
-    } else {
-		//当前选择的小区
-		let residentialId=uni.getStorageSync("residentialId")
-		let room_list_new=[]
-		room_list.forEach(item=>{
-			if (item.residentialId==residentialId) {
-				room_list_new.push(item)
+	// 访客授权
+	//获取app实例
+	var app = getApp();
+	var util = require("../../../utils/util.js");
+
+	export default {
+		data() {
+			return {
+				//是否需要审核通过访客表单后才能开门
+				doorNeedAudit: 0,
+
+				roomSelectShow: false,
+				selectRoomName: '',
+				selectRoomId: 0,
+
+				//授权记录 的id
+				id: '',
+
+				room_list: null,
+				minusStatus: 'disable',
+				//获取开门密码
+				showModal: false,
+				//访客类型
+				guestTypeIndex: 0,
+				//默认选中第一个
+				guestTypeArray: ['朋友', '外卖', '快递', '其他'],
+				//密码有效期
+				activeIndex: 0,
+				//默认选中第一个
+				numArray: [1, 2, 5, 8, 24, 48],
+				begin_date: "",
+				end_date: ""
+			};
+		},
+
+		components: {},
+		props: {},
+
+		/**
+		 * 监听页面加载
+		 */
+		onLoad() {
+			this.doorNeedAudit = uni.getStorageSync("doorNeedAudit")
+			//禁用头部分享
+			uni.hideShareMenu({});
+			//获取房屋信息
+			this.geRoomByMemberId();
+		},
+
+		onShareAppMessage: function(ops) {
+			this.showModal = false
+			let roomName = this.selectRoomName ? this.selectRoomName : this.room_list[0].name
+			let title = `访问房间:${roomName};
+					     开始日期:${this.begin_date};
+						 结束日期:${this.end_date}`
+			return {
+				title: title,
+				path: "/pages/guest/guest_form?id=" + this.id + "&doorNeedAudit=" + this.doorNeedAudit + "&memberId=" +
+					app.globalData.member.id,
+				imageUrl: "/static/clock.png"
+			};
+		},
+		methods: {
+			//选择房间
+			roomChange: function(e) {
+				console.log(e, "e");
+				this.selectRoomId = e[0].value
+				this.selectRoomName = e[0].label
+			},
+			//访客类型
+			guestTypethis: function(event) {
+				//点击选中事件
+				var thisindex = event.currentTarget.dataset.thisindex; //当前index
+
+				this.setData({
+					guestTypeIndex: thisindex
+				});
+			},
+			//密码有效时间
+			activethis: function(event) {
+				//点击选中事件
+				var thisindex = event.currentTarget.dataset.thisindex; //当前index
+
+				this.setData({
+					activeIndex: thisindex
+				});
+			},
+			//关闭弹窗
+			closeModal: function() {
+				this.setData({
+					showModal: false
+				});
+			},
+			//获取开门密码
+			getGuestAuthorize: function() {
+				let avalidTime = this.numArray[this.activeIndex]
+				let beginDate = new Date()
+				let endDate = new Date()
+				endDate.setHours(endDate.getHours() + avalidTime)
+				let params = {
+					roomId: this.selectRoomId,
+					beginDate: this.$u.timeFormat(beginDate, 'yyyy-mm-dd hh:MM:ss'),
+					endDate: this.$u.timeFormat(endDate, 'yyyy-mm-dd hh:MM:ss'),
+					memberId: this.vuex_member.id,
+					userName: this.vuex_member.name,
+					guestType: this.guestTypeIndex
+				}
+				this.$http.addGuestAuthorize(params).then(res => {
+					if (res.data.success) {
+						uni.setStorageSync("isFlush", true);
+						this.showModal = true,
+							this.id = res.data.data.id,
+							this.begin_date = res.data.data.beginDate,
+							this.end_date = res.data.data.endDate
+					} else {
+						app.globalData.oneFailHint(res.data.msg);
+					}
+				});
+			},
+			//根据会员id获取我的房屋列表
+			geRoomByMemberId: function() {
+				let params = {
+					id: getApp().globalData.member.id,
+					residentialId: uni.getStorageSync('residentialId')
+				}
+				this.$http.getRoomByMemberId(params).then(res => {
+					let records = res.data.data
+					if (this.$isNotEmpty(records)) {
+						records.forEach(item => {
+							item.address =
+								`${item.residentialName}-${item.buildingName}-${item.unitName}-${item.name}`
+						})
+						this.room_list = records
+						this.selectRoomId = this.room_list[0].id
+						this.selectRoomName = this.room_list[0].address
+						app.globalData.room_list = records
+					}
+				});
 			}
-		})
-		this.room_list=room_list_new
-		this.selectRoomId=room_list[0].id
-    }
- },
-
-  onShareAppMessage: function (ops) {
-	  
-	this.showModal=false
-		
-	let roomName=this.selectRoomName?this.selectRoomName:this.room_list[0].name
-	let title ="访问房间:"+roomName+ "; 有效期:   " + this.begin_date + " 到 " + this.end_date
-    return {
-      title: title,
-      path: "/pages/guest/guest_form?id="+this.id+"&doorNeedAudit="+this.doorNeedAudit+"&memberId="+app.globalData.member.id,
-      imageUrl: "/static/clock.png"
-    };
-  },
-  methods: {
-    //选择房间
-    roomChange: function (e) {
-		this.selectRoomId=e[0].value
-		this.selectRoomName=e[0].label
-    },
-    //访客类型
-    guestTypethis: function (event) {
-      //点击选中事件
-      var thisindex = event.currentTarget.dataset.thisindex; //当前index
-
-      this.setData({
-        guestTypeIndex: thisindex
-      });
-    },
-    //密码有效时间
-    activethis: function (event) {
-      //点击选中事件
-      var thisindex = event.currentTarget.dataset.thisindex; //当前index
-
-      this.setData({
-        activeIndex: thisindex
-      });
-    },
-    //关闭弹窗
-    closeModal: function () {
-      this.setData({
-        showModal: false
-      });
-    },
-    //获取开门密码
-    getGuestAuthorize: function () {
-      let that = this;
-      let params = {};
-      params['member_id'] = app.globalData.member.id;
-      params['room_id'] = that.selectRoomId;
-      params['guest_type'] = that.guestTypeIndex;
-
-      let avalid_num = that.numArray[that.activeIndex]; //有效开始时间
-
-      let begin_date = new Date();
-
-      // begin_date.setMinutes(begin_date.getMinutes() - 30);
-      params['begin_date'] = util.getTimestamp(begin_date); //有效结束时间
-
-      let end_date = new Date(); //小时累加
-
-      end_date.setHours(end_date.getHours() + avalid_num);
-      params['end_date'] = util.getTimestamp(end_date); //有效次数
-
-	  console.log(that.params);
-      // let operation = 'guestAuthorize/getGuestAuthorize';
-      that.$http.addGuestAuthorize(params).then(res=>{
-		  console.info("接口返回结果:" + res.data.result_msg); //获取成功
-		  
-		  if (res.data.result_code == 1) {
-		    uni.setStorageSync("isFlush", true);
-		    that.setData({
-		      //显示复制密码弹窗
-		      showModal: true,
-		      id: res.data.guestAuthorize.id,
-		      begin_date: util.formatTime(res.data.guestAuthorize.beginDate),
-		      end_date: util.formatTime(res.data.guestAuthorize.endDate)
-		    });
-		  } else {
-		    app.globalData.oneFailHint(res.data.result_msg);
-		  }
-       
-      });
-    },
-    //根据会员id获取我的房屋列表
-    geRoomByMemberId: function () {
-      let that = this;
-      let params = {};
-      params['member_id'] = app.globalData.member.id;
-      // let operation = 'estate/getRoomByMemberId';
-      this.$http.getRoomByMemberId(params).then (res=>{
-		  console.info("获取成功" + res.data.result_msg); //获取成功
-		  if (res.data.result_code == 1) {
-		  	let residentialId=uni.getStorageSync("residentialId")
-		  	let room_list_new=[]
-		  	res.data.list.forEach(item=>{
-		  		if (item.residentialId==residentialId) {
-		  			room_list_new.push(item)
-		  		}
-		  	})
-		     that.room_list=room_list_new
-		    that.selectRoomId=that.room_list[0].id
-		    app.globalData.room_list = res.data.list;
-		  }
-        
-      });
-    }
-  }
-};
+		}
+	};
 </script>
 <style lang="scss">
-.edit_wrap {
-  font-size: 30rpx;
-  color: #333;
-}
-
-.form_group {
-  margin:0 20rpx;
-  line-height: 60rpx;
-  background: #fff;
-  border-radius: 10rpx;
-  padding: 20rpx;
-}
-
-.form_group input, .form_group picker {
-  width: 100%;
-  border-bottom: 1px solid #ddd;
-   color: $base-btn-color;
-  height: 60rpx;
-  line-height: 60rpx;
-  padding: 0rpx 20rpx;
-}
-
-.ar_picker_wrap picker {
-  width: 100%;
-  box-sizing: border-box;
-}
-
-.tui-picker-content picker {
-  width: 260rpx;
-  display: inline-block;
-  padding: 0 10rpx;
-}
-
-.tui-picker-content .time_text {
-  margin: 0 20rpx;
-}
-
-/*主容器*/
-
-.stepper {
-  width: 214rpx;
-  height: 60rpx;
-  border: 2rpx solid #ddd;
-  border-radius: 10rpx;
-  background: #fff;
-  margin-top: 10rpx;
-}
-
-/*加号和减号*/
-
-.stepper text {
-  float: left;
-  width: 70rpx;
-  line-height: 52rpx;
-  text-align: center;
-}
-
-/*数值*/
-
-.stepper input {
-  width: 70rpx;
-  height: 60rpx;
-  float: left;
-  margin: 0 auto;
-  text-align: center;
-  font-size: 12px;
-  border: none;
-  border-left: 1px solid #ddd;
-  border-right: 1px solid #ddd;
-  padding: 0;
-  border-radius: 0;
-  color: $base-btn-color;
-}
-
-/*普通样式*/
-
-.stepper .normal {
-  color: black;
-}
-
-/*禁用样式*/
-
-.stepper .disable {
-  color: #ccc;
-}
-
-.get_code {
-  padding: 0rpx 60rpx;
-  position: fixed;
-  bottom: 20rpx;
-  width: 100%;
-  box-sizing: border-box;
-}
-
-.ar_book {
-  background: $base-btn-color;
-  font-size: 28rpx;
-  color: #fff;
-  border-radius: 10rpx;
-  margin: 40rpx 0rpx 10rpx;
-  padding: 0rpx 60rpx;
-}
-
-.show-btn {
-  margin-top: 100rpx;
-  color: #2c2;
-}
-
-.modal-mask {
-  width: 100%;
-  height: 100%;
-  position: fixed;
-  top: 0;
-  left: 0;
-  background: #000;
-  opacity: 0.5;
-  overflow: hidden;
-  z-index: 9000;
-  color: #fff;
-}
-
-.modal-dialog {
-  width: 540rpx;
-  overflow: hidden;
-  position: fixed;
-  top: 45%;
-  left: 0;
-  z-index: 9999;
-  background: #f9f9f9;
-  margin: -180rpx 105rpx;
-  border-radius: 36rpx;
-}
-
-.modal-title {
-  padding-top: 50rpx;
-  font-size: 36rpx;
-  color: #030303;
-  text-align: center;
-}
-
-.modal-content {
-  padding: 60rpx 0;
-}
-
-.modal-input {
-  display: flex;
-  font-size: 30rpx;
-}
-
-.password {
-  width: 100%;
-  height: 80rpx;
-  font-size: 30rpx;
-  line-height: 80rpx;
-  padding: 0 20rpx;
-  box-sizing: border-box;
-  color: #606266;
-  text-align: center;
-}
-
-input-holder {
-  color: #666;
-  font-size: 28rpx;
-}
-
-.modal-footer {
-  display: flex;
-  flex-direction: row;
-  height: 86rpx;
-  border-top: 1px solid #dedede;
-  font-size: 34rpx;
-  line-height: 86rpx;
-}
-.modal-footer button::after{
-   border: none;
-  
-}
-.modal-footer .btn-cancel {
-  width: 50%;
-  color: #2a7fff;
-  text-align: center;
-  border-right: 1px solid #dedede;
- border-radius: 0;
-}
-
-.modal-footer .btn-confirm {
-  width: 50%;
-  color: #666;
-  text-align: center;
-}
-
-/* 密码有效期 */
-
-.itemBox {
-  flex-flow: wrap;
-}
-
-.itemBox view {
-  width: 30%;
-  box-sizing: border-box;
-  margin: 10rpx;
-}
-
-.itemBox view.active text{
-  background: $base-btn-color;
-  color: #fff;
-}
-
-.itemBox view text {
-  text-align: center;
-  width: 100%;
-  background: #fff;
-  color: $base-btn-color;
-  font-size: 28rpx;
-  display: inline-block;
-  border: 2rpx solid $base-btn-color;
-  border-radius: 40rpx;
-}
-
-
-</style>
+	.edit_wrap {
+		font-size: 30rpx;
+		color: #333;
+	}
+
+	.form_group {
+		margin: 0 20rpx;
+		line-height: 60rpx;
+		background: #fff;
+		border-radius: 10rpx;
+		padding: 20rpx;
+	}
+
+	.form_group input,
+	.form_group picker {
+		width: 100%;
+		border-bottom: 1px solid #ddd;
+		color: $base-btn-color;
+		height: 60rpx;
+		line-height: 60rpx;
+		padding: 0rpx 20rpx;
+	}
+
+	.ar_picker_wrap picker {
+		width: 100%;
+		box-sizing: border-box;
+	}
+
+	.tui-picker-content picker {
+		width: 260rpx;
+		display: inline-block;
+		padding: 0 10rpx;
+	}
+
+	.tui-picker-content .time_text {
+		margin: 0 20rpx;
+	}
+
+	/*主容器*/
+
+	.stepper {
+		width: 214rpx;
+		height: 60rpx;
+		border: 2rpx solid #ddd;
+		border-radius: 10rpx;
+		background: #fff;
+		margin-top: 10rpx;
+	}
+
+	/*加号和减号*/
+
+	.stepper text {
+		float: left;
+		width: 70rpx;
+		line-height: 52rpx;
+		text-align: center;
+	}
+
+	/*数值*/
+
+	.stepper input {
+		width: 70rpx;
+		height: 60rpx;
+		float: left;
+		margin: 0 auto;
+		text-align: center;
+		font-size: 12px;
+		border: none;
+		border-left: 1px solid #ddd;
+		border-right: 1px solid #ddd;
+		padding: 0;
+		border-radius: 0;
+		color: $base-btn-color;
+	}
+
+	/*普通样式*/
+
+	.stepper .normal {
+		color: black;
+	}
+
+	/*禁用样式*/
+
+	.stepper .disable {
+		color: #ccc;
+	}
+
+	.get_code {
+		padding: 0rpx 60rpx;
+		position: fixed;
+		bottom: 20rpx;
+		width: 100%;
+		box-sizing: border-box;
+	}
+
+	.ar_book {
+		background: $base-btn-color;
+		font-size: 28rpx;
+		color: #fff;
+		border-radius: 10rpx;
+		margin: 40rpx 0rpx 10rpx;
+		padding: 0rpx 60rpx;
+	}
+
+	.show-btn {
+		margin-top: 100rpx;
+		color: #2c2;
+	}
+
+	.modal-mask {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: #000;
+		opacity: 0.5;
+		overflow: hidden;
+		z-index: 9000;
+		color: #fff;
+	}
+
+	.modal-dialog {
+		width: 540rpx;
+		overflow: hidden;
+		position: fixed;
+		top: 45%;
+		left: 0;
+		z-index: 9999;
+		background: #f9f9f9;
+		margin: -180rpx 105rpx;
+		border-radius: 36rpx;
+	}
+
+	.modal-title {
+		padding-top: 50rpx;
+		font-size: 36rpx;
+		color: #030303;
+		text-align: center;
+	}
+
+	.modal-content {
+		padding: 60rpx 0;
+	}
+
+	.modal-input {
+		display: flex;
+		font-size: 30rpx;
+	}
+
+	.password {
+		width: 100%;
+		height: 80rpx;
+		font-size: 30rpx;
+		line-height: 80rpx;
+		padding: 0 20rpx;
+		box-sizing: border-box;
+		color: #606266;
+		text-align: center;
+	}
+
+	input-holder {
+		color: #666;
+		font-size: 28rpx;
+	}
+
+	.modal-footer {
+		display: flex;
+		flex-direction: row;
+		height: 86rpx;
+		border-top: 1px solid #dedede;
+		font-size: 34rpx;
+		line-height: 86rpx;
+	}
+
+	.modal-footer button::after {
+		border: none;
+
+	}
+
+	.modal-footer .btn-cancel {
+		width: 50%;
+		color: #2a7fff;
+		text-align: center;
+		border-right: 1px solid #dedede;
+		border-radius: 0;
+	}
+
+	.modal-footer .btn-confirm {
+		width: 50%;
+		color: #666;
+		text-align: center;
+	}
+
+	/* 密码有效期 */
+
+	.itemBox {
+		flex-flow: wrap;
+	}
+
+	.itemBox view {
+		width: 30%;
+		box-sizing: border-box;
+		margin: 10rpx;
+	}
+
+	.itemBox view.active text {
+		background: $base-btn-color;
+		color: #fff;
+	}
+
+	.itemBox view text {
+		text-align: center;
+		width: 100%;
+		background: #fff;
+		color: $base-btn-color;
+		font-size: 28rpx;
+		display: inline-block;
+		border: 2rpx solid $base-btn-color;
+		border-radius: 40rpx;
+	}
+</style>

+ 22 - 120
pages/demo/demo6.vue

@@ -1,129 +1,31 @@
 <template>
-	<view style="background-color: #FFFFFF;min-height: 100vh;">
-		<!-- solt begin -->
-		<view class="flex  flex-direction  align-center " style="padding-top: 160rpx;">
-			<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>
-			<button class="cu-btn round wx-btn " open-type="getPhoneNumber" @getphonenumber="tapGetPhoneNumber">
-				<view class="text-center"  style="position: relative;left: -100rpx;">
-					<text class="cuIcon-weixin" style="font-size: 40rpx;color: #216a21;"></text>
-				</view>
-				<view style="position: relative;left: -16rpx;">
-					<text class="text-center" style="font-size: 28rpx;">微信立即登陆</text>
-				</view>
-			</button>
-			<view @click="hide" class="cu-btn round line-gray " style="font-size: 26rpx;width: 200rpx;margin-top: 80rpx;">
-				<text style="color: #333333;">暂不登陆</text>
-			</view>
+	<view class="">
+		<button @click="change">修改</button>
+		<view class="margin-left-50" v-for="(item,index) in list" :key="index">
+			<text>{{item.name}}</text>
 		</view>
-		<!-- solt end -->
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				respWx:{},
-				respLogin:{},
-				timer:null,
-				inviteCode:null,
-			}
-		},
-		beforeDestroy() {
-		  if(this.timer){
-		    clearTimeout(this.timer)
-		    this.timer = null
-		    console.log('clearTimeout')
-		  }
-		},
-		onReady() {
-			this.show()
-		},
-		methods:{
-			hide () {
-			  if(this.timer){
-			    clearTimeout(this.timer)
-			    this.timer = null
-			  }
-			},  
-			show(){
-				  let that=this
-				  this.inviteCode = this.$auth.getInviteCode() 
-				  this.$mpi.wxLogin().then(res => {
-					this.respWx = res
-					console.log("res",res);
-				  })
-				  this.setTimer()
-			},
-			async setTimer(){
-				this.respWx = await this.$mpi.wxLogin()
-				this.timer = setTimeout(()=>{
-					this.setTimer()
-				},240000) // 每隔4分钟重新请求 jscode
-			},
-			async tapGetPhoneNumber (e) {
-			  if(e.detail.errMsg != 'getPhoneNumber:ok') {
-			    return
-			  }
-			  this.login(e.detail)
-			},
-			async login(detail){
-			  console.log("2:login",detail);
-			  try{
-			    this.$dialog.showLoading()
-			    if(!this.respLogin.sessionKey){
-			      this.respLogin = await this.$api.loginByCode({
-			        _isReject:true,
-			        code:this.respWx.code
-			      })
-			    }
-				console.log(this.respLogin);
-			    let resp = await this.$api.loginByWxapp({
-			      _isReject:true,
-			      openId: this.respLogin.openId,
-			      sessionKey: this.respLogin.sessionKey,
-			      encryptedData: detail.encryptedData,
-			      iv: detail.iv,
-				  inviteCode: this.inviteCode
-			    })
-			    console.log(56,resp)
-			    resp.openId = this.respLogin.openId
-			    resp.sessionKey = this.respLogin.sessionKey
-			    let userType = this.$global.userType.member
-			    this.$auth.login(userType, resp.sessionId, resp.userId, resp)
-			    this.hide()
-			    this.$util.refreshPage(['/pagesM/pages/category','/pagesM/pages/shop_car'])
-				// this.$auth.setInviteCode(null);
-				this.$auth.removeInviteCode();
-				let a = this.$auth.getInviteCode();
-				if(this.inviteCode){
-					this.$emit('getDistributorCoupon')
-				}else{
-					this.$emit('signIn', resp)
-				}
-			  }catch(err){
-			    // console.log(72,err)
-			    this.$dialog.alert({
-			      content: err.errmsg || '服务繁忙~'
-			    })
-			  }finally{
-			    this.$dialog.hideLoading()
-			    if(this.timer){
-			      clearTimeout(this.timer)
-			      this.setTimer()
-			    }
-			  }
-			},
-		},
+export default {
+	name: '',
+	data() {
+		return {
+			list:[{
+				id:1,
+				name:'a'
+			}]
+		};
+	},
+	methods:{
+		change(){
+			this.list[0].name='b'
+		}
 	}
+};
 </script>
 
-<style lang="scss">
-.wx-btn{
-	background-color: #2ba246;
-	color: #FFFFFF;
-	width: 600rpx;
-	padding: 40rpx 0rpx;
-}
-</style>
+<style lang="scss" scoped>
+	
+</style>

+ 406 - 373
pages/guest/guest_form.vue

@@ -1,263 +1,304 @@
 <template>
-	<view>
-		<u-toast ref="uToast"></u-toast>
-		<view class="card" >
-			<view class="form">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>访问区域</view>
-				</view>
-				<view class="bg-gray padding-20 "  >
-					<input disabled type="text" v-model="data.guestPosition" />
-				</view>
+	<view class="bg-white" style="min-height: 100vh;">
+		<view class="content" v-if="!loading">
+			<view class="padding-20 bg-white" v-if="!this.islock&&description">
+				<u-alert-tips type="warning" :description="description"></u-alert-tips>
 			</view>
-			<view class="form">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>访问日期</view>
+
+			<view class="card">
+				<view class="form">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>访问区域</view>
+					</view>
+					<view class="bg-gray padding-20 ">
+						<input disabled type="text" v-model="data.guestPosition" />
+					</view>
 				</view>
-				<view class="bg-gray padding-20 "  >
-					<u-input  type="select" :select-open="timeShow" v-model="data.guestTime"  placeholder="请选择访问日期" @click="timeShow=true"></u-input>
+				<view class="form">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>访问日期</view>
+					</view>
+					<view class="bg-gray padding-20 ">
+						<ruiDatePicker v-if="$isNotEmpty(data.interviewTime)" :start="guestAuthorize.beginDate"
+							:end="guestAuthorize.endDate" fields="second" @change="timeConfirm"
+							:value="data.interviewTime">
+						</ruiDatePicker>
+					</view>
+					<view class="text-sm text-right text-orange" style="padding-top: 8rpx;">
+						<text>有效时间:{{guestAuthorize.beginDate}} 至 {{guestAuthorize.endDate}}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>接待人</view>
+				<view class="form">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>接待人</view>
+					</view>
+					<view class="bg-gray padding-20 ">
+						<input :disabled="isDisabled" type="text" placeholder="请填写接待人" v-model="data.userName" />
+					</view>
 				</view>
-				<view class="bg-gray padding-20 "  >
-					<input :disabled="isDisabled" type="text" placeholder="请填写接待人"  v-model="data.userName" />
+				<view class="form">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>您的姓名:</view>
+					</view>
+					<view class="bg-gray padding-20 ">
+						<input :disabled="isDisabled" type="text" placeholder="请填写您的姓名" v-model="data.guestName" />
+					</view>
 				</view>
-			</view>
-			<view class="form">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>您的姓名:</view>
+				<view class="form ">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>您的联系方式</view>
+					</view>
+					<view class="bg-gray padding-20  flex justify-between " style="box-sizing: border-box;">
+						<input maxlength="11" type="number" placeholder="请获取您的联系方式" v-model="data.guestTel" />
+						<button :disabled="isDisabled" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
+							class="light sm cu-btn bg-blue radius">
+							获取手机号
+						</button>
+					</view>
 				</view>
-				<view class="bg-gray padding-20 "  >
-					<input :disabled="isDisabled" type="text" placeholder="请填写您的姓名" v-model="data.guestName" />
+				<view class="form ">
+					<view class="flex">
+						<view>您的身份证号</view>
+					</view>
+					<view class="bg-gray padding-20 ">
+						<input :disabled="isDisabled" placeholder="请输入您的身份证号(选填)" v-model="data.guestIdcard" />
+					</view>
 				</view>
 			</view>
-			<view class="form ">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>您的联系方式</view>
-				</view>
-				<view class="bg-gray padding-20  flex justify-between " style="box-sizing: border-box;" >
-					<input disabled maxlength="11" type="number" placeholder="请获取您的联系方式" v-model="data.guestTel" />
-					<button :disabled="isDisabled" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="light sm cu-btn bg-blue radius">
-						获取手机号
-					</button>
+			<view class="card ">
+				<view class="form" style="height: 320rpx;">
+					<view class="flex">
+						<view class="need">*</view>
+						<view>来访目的</view>
+					</view>
+					<view class="bg-gray padding-10">
+						<textarea :disabled="isDisabled" v-model="data.guestReason" maxlength="100"
+							style="width: 100%;height: 270rpx;line-height: 50rpx;" placeholder="请填写来访原因"></textarea>
+						<view class="text-right text-df text-gray padding-top-10">
+							{{data.guestReason.length}} / 100
+						</view>
+					</view>
 				</view>
 			</view>
-			<view class="form ">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>您的身份证号</view>
-				</view>
-				<view class="bg-gray padding-20 " >
-					<input :disabled="isDisabled" placeholder="请输入您的身份证号" v-model="data.guestIdcard" />
+			<view class="bg-white" style="height: 160rpx;"></view>
+
+			<view v-if="!islock&&auditStatus==null" style="z-index: 999;" class=" footer-fixed" @click="submit">
+				<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+					确定提交
 				</view>
 			</view>
-		</view>
-		<view class="card ">
-			<view class="form" style="height: 320rpx;">
-				<view class="flex">
-					<view class="need" >*</view>
-					<view>来访目的</view>
-				</view>
-				<view  class="bg-gray padding-10">
-					<textarea :disabled="isDisabled"   v-model="data.guestReason" maxlength="100" style="width: 100%;height: 270rpx;line-height: 50rpx;"  placeholder="请填写来访原因"></textarea>
-					<view  class="text-right text-df text-gray padding-top-10">
-						{{data.guestReason.length}} / 100
-					</view>
+
+			<view @click="again" v-if="!islock&&auditStatus==2" style="z-index: 999;" class=" footer-fixed">
+				<view class="cu-btn  flex  text-lg bg-red" style="padding: 46rpx 0;">
+					重新填表
 				</view>
 			</view>
-		</view>
-		<view class="bg-white" style="height: 160rpx;"></view>
-		
-		<view v-if="!islock&&auditStatus==null"  style="z-index: 999;" class=" footer-fixed" @click="submit">
-			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-				确定提交
-			</view>
-		</view>
-		<button open-type="share" v-if="!islock&&auditStatus==0"  style="z-index: 999;" class=" footer-fixed" >
-			<view class="cu-btn  flex  text-lg bg-orange light" style="padding: 46rpx 0;">
-				待审核,通知被访者审核
-			</view>
-		</button>
-		<view @click="auditStatus=null;operaType=1;oldData=$u.deepClone(data)" v-if="!islock&&auditStatus==2"  style="z-index: 999;" class=" footer-fixed" >
-			<view class="cu-btn  flex  text-lg bg-red" style="padding: 46rpx 0;">
-				审核不通过,点击重新填表
+			<view v-if="islock" style="z-index: 999;" class=" footer-fixed">
+				<view class="cu-btn  flex  text-lg bg-gray" style="padding: 46rpx 0;">
+					已锁定
+				</view>
 			</view>
 		</view>
-		<view v-if="islock" style="z-index: 999;" class=" footer-fixed" >
-			<view class="cu-btn  flex  text-lg bg-gray" style="padding: 46rpx 0;">
-				已锁定
-			</view>
+
+
+		<view v-else style="position: absolute;top: 40%;left: 50%;transform: translate(-50%,-50%);">
+			<u-loading mode="flower" size="80"></u-loading>
 		</view>
-		<u-mask z-index="99999" :show="maskShow" @click="hideMask">
-			<view style="margin: 20rpx;" @click.stop="">
-				<textarea  @keyboardheightchange="keyboardheightchange" v-model="data.visitReason"  value="" style="background-color: #FFFFFF;width: 100%;padding: 20rpx;box-sizing: border-box;" placeholder="请填写来访原因" />
-				<view  class="bg-white text-right text-df text-gray padding-10">
-					{{data.visitReason.length}} / 100
-				</view>
-			</view>
-		</u-mask>
+
+
 		<!--弹窗-->
-		<view class="modal-mask"   v-if="showModal"></view>
+		<view class="modal-mask" v-if="showModal"></view>
 		<view class="modal-dialog" v-if="showModal">
-		  <view class="modal-title">提示</view>
-		    <view class="modal-content">
-		      <view class="modal-input">
-		        <text class="password">填写成功,请转发给好友审核</text>
-		      </view>
-		    </view>
-		    <view class="modal-footer">
-		      <button class="btn-confirm" @click="showModal=false;getAuthRecords()" data-status="confirm">暂不转发</button>
-			  <button class="btn-cancel" open-type="share"  data-status="cancel">立即转发</button>
-		    </view>
+			<view class="modal-title">提示</view>
+			<view class="modal-content">
+				<view class="modal-input">
+					<text class="password">填写成功,请转发给好友审核</text>
+				</view>
+			</view>
+			<view class="modal-footer">
+				<button class="btn-confirm" @click="showModal=false;getAuthRecords()"
+					data-status="confirm">暂不转发</button>
+				<button class="btn-cancel" open-type="share" data-status="cancel">立即转发</button>
+			</view>
 		</view>
-		
-		<view v-if="auditStatus==0" @click="getAuthRecords" class="cuIcon cu-btn" style="width: 88rpx;height: 88rpx;background-color: rgba(0,0,0,.2);color: #FFFFFF;position: fixed;bottom: 40%;right: 20rpx;">
-			<text class="cuIcon-refresh" style="font-size: 50rpx;"></text>
+
+		<!-- 刷新 -->
+		<view v-if="auditStatus==0" @click="reload" class="cuIcon cu-btn "
+			style="width: 80rpx;height: 80rpx;background-color: rgba(0,0,0,.2);color: #FFFFFF;position: fixed;bottom: 40%;right: 20rpx;z-index: 9;">
+			<u-loading mode="flower" size="50" color="#fff" :show="isReload"></u-loading>
+			<text class="cuIcon-refresh rotateCenter" v-if="!isReload" style="font-size: 50rpx;"></text>
 		</view>
-		
-		<u-picker @confirm="timeConfirm" :params="params" v-model="timeShow" mode="time"></u-picker>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
-	var app=getApp()
+	var app = getApp()
 	var that;
+	import ruiDatePicker from '@/comps/rattenking-dtpicker/rattenking-dtpicker.vue';
 	export default {
-		components:{
-			
+		components: {
+			ruiDatePicker
 		},
 		data() {
 			return {
-				//0新增表单操作,1修改表单操作
-				operaType:0,
-				
-				id:'',//授权记录的id
-				doorNeedAudit:0,//该授权开门是否需要审核
-				memberId:'',//业主的 memberId,用来获取设备列表
-				residentialId:'',//小区id,用来获取设备列表
-				openId:'',
-				sessionKey:'',
-				
-				showModal:false,
+				guestRecordId:'',
 				
+				loading: false,
+				isReload: false,
+				timeValue: '',
+				guestAuthorize: {},
+
+				//0新增表单操作,1修改表单操作
+				operaType: 0,
+
+				id: '', //授权记录的id
+				doorNeedAudit: 0, //该授权开门是否需要审核
+				memberId: '', //业主的 memberId,用来获取设备列表
+				residentialId: '', //小区id,用来获取设备列表
+				openId: '',
+				sessionKey: '',
+
+				showModal: false,
+
 				//查询出来的审核状态
-				auditStatus:null,
-				islock:false,
-				
-				//时间选择器
-				timeShow:false,
-				params: {
-					year: true,
-					month: true,
-					day: true,
-					hour: true,
-					minute: true,
-					second: true
-				},
+				auditStatus: null,
+				islock: false,
+
 				//审核不通过重新修改时的旧数据
-				oldData:{},
+				oldData: {},
 				//提交的数据
-				data:{
+				data: {
+					userId: '',
 					//授权记录的表id
-					guestAuthId:'',
+					guestAuthId: '',
 					//被访者区域
-					guestPosition:'',
+					guestPosition: '',
 					//来访日期
-					guestTime:this.$u.timeFormat(new Date(),'yyyy-mm-dd hh:MM:ss'),
+					interviewTime: '',
+					beginTime: '',
+					endTime: '',
 					//接待人
-					userName:'',
+					userName: '',
 					//来访者姓名
-					guestName:'',
+					guestName: '',
 					//来访者联系方式
-					guestTel:'',
+					guestTel: '',
 					//来访者身份证号
-					guestIdcard:'',
+					guestIdcard: '',
 					//来访原因
-					guestReason:'',
+					guestReason: '',
 					//审核状态
-					auditStatus:0
+					auditStatus: 0,
+					//登记来源小程序
+					registerSource: 1
 				},
 				//添加访客记录后,将访客记录id分享给好友审核
-				shareId:'',
+				shareId: '',
 			}
 		},
-		computed:{
-			isDisabled:{
-				get(){
-					if (this.auditStatus==null) {
+		computed: {
+			isDisabled: {
+				get() {
+					if (this.auditStatus == null) {
 						if (this.islock) {
 							return true
-						}else{
+						} else {
 							return false
 						}
-					}else{
+					} else {
 						return true
 					}
 				}
+			},
+			description() {
+				if (this.auditStatus == 0) {
+					return '待审核,请通知被访者进入小程序审核'
+				}
+				if (this.auditStatus == 2) {
+					if (this.$isNotEmpty(this.data.opinion)) {
+						return `审核失败:${this.data.opinion}`
+					} else {
+						return `审核失败:请点击重新填表`
+					}
+				}
+				return false
 			}
 		},
-		onShareAppMessage: function (ops) {
-		  this.showModal=false
-		  this.getAuthRecords()
-		  return {
-		    title: "我是"+this.data.guestName+",我正在填表申请开门,请审核",
-			path:"/pages/record/record?id="+this.shareId
-		  };
+		onShareAppMessage: function(ops) {
+			this.showModal = false
+			this.getAuthRecords()
+			return {
+				title: "我是" + this.data.guestName + ",我正在填表申请开门,请审核",
+				path: "/pages/record/record?id=" + this.shareId
+			};
 		},
-		onLoad(options) {
-			that=this
+		async onLoad(options) {
+			this.loading = true
+			that = this
 			if (!this.$isEmpty(options.scene)) {
-				let scene=decodeURIComponent(options.scene).split(",")
+				let scene = decodeURIComponent(options.scene).split(",")
 				//从小程序二维码进入
-				options.id=scene[0]
-				options.doorNeedAudit=scene[1]
-				options.memberId=scene[2]
+				options.id = scene[0]
+				options.doorNeedAudit = scene[1]
+				options.memberId = scene[2]
 			}
 			//附带的页面参数id为空,则锁定页面
 			if (this.$isEmpty(options.id)) {
 				uni.showModal({
-					showCancel:false,
-					content:"系统错误,已锁定",
+					showCancel: false,
+					content: "系统错误,已锁定",
 					success: (res) => {
 						if (res.confirm) {
-							that.islock=true
+							that.islock = true
 						}
 					}
 				})
+				this.loading = false
 				return
 			}
-			this.id=options.id
-			this.doorNeedAudit=options.doorNeedAudit
-			this.memberId=options.memberId
-			this.data.guestAuthId=this.id
-			this.getAuthRecords()
+			this.id = options.id
+			this.doorNeedAudit = options.doorNeedAudit
+			this.memberId = options.memberId
+			this.data.userId = this.memberId
+			this.data.guestAuthId = this.id
+			await this.getAuthRecords()
+			setTimeout(() => {
+				this.loading = false
+			}, 200)
 		},
 		methods: {
-			getPhoneNumber (e) {
-				let that=this
+			again() {
+				this.auditStatus = null;
+				this.operaType = 1;
+				this.oldData = this.$u.deepClone(this.data)
+				this.$forceUpdate()
+			},
+			async reload() {
+				this.isReload = true
+				await this.getAuthRecords()
+				this.isReload = false
+			},
+			getPhoneNumber(e) {
+				let that = this
 				if (e.detail.errMsg == "getPhoneNumber:ok") {
-					console.log(e);
-					let params={
-						sessionKey:that.sessionKey,
-						encryptedData:e.detail.encryptedData,
-						iv:e.detail.iv
+					let params = {
+						sessionKey: that.sessionKey,
+						encryptedData: e.detail.encryptedData,
+						iv: e.detail.iv
 					}
-					let operation = 'miniprogram/getOpenData';
-					getApp().globalData.postRequest(params,operation,function(res){
-						that.data.guestTel=res.data.purePhoneNumber
+					this.$http.getOpenData(params).then(res => {
+						this.data.guestTel = res.data.purePhoneNumber
 					})
-				}else{
+				} else {
 					this.$refs.uToast.show({
 						title: '获取手机号失败!',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
@@ -266,19 +307,23 @@
 			/**
 			 * 跳转到设备列表
 			 */
-			jumpOpenDoor(){
-				let params={
-					memberId:this.memberId,
-					residentialId:this.residentialId,
-					guestTel:this.data.guestTel
+			jumpOpenDoor() {
+				let params = {
+					memberId: this.memberId,
+					residentialId: this.residentialId,
+					guestTel: this.data.guestTel,
+					guestRecordId:this.guestRecordId
 				}
 				uni.redirectTo({
-					url:"/pages/guest/open_door"+this.$u.queryParams(params)
+					url: "/pages/guest/open_door" + this.$u.queryParams(params)
 				})
 			},
-			timeConfirm(e){
-				this.data.guestTime=e.year+"-"+e.month+"-"+e.day+" "+e.hour+":"+e.minute+":"+e.second
-				console.log(this.data.guestTime);
+			timeConfirm(e) {
+				this.data.interviewTime = e
+			},
+			getTime(value) {
+				let date = typeof(value) == 'string' ? value.replace(/\-/g, '/') : value
+				return new Date(date).getTime()
 			},
 			/**
 			 * 先通过id查询授权记录表查看该授权是否过期
@@ -287,40 +332,37 @@
 			 * 需要审核就通过授权记录的id和openid查询访客记录表,查询到记录就直接跳到设备列表
 			 * 查不到记录就填表
 			 */
-			async getAuthRecords(){
-				let that=this
-				let operation="guestAuthorize/getById/"+this.id
-				let params={}
-				let res=await app.globalData.postRequestAsync(params, operation);
-				if (res.data.result_code!=1) {
-					uni.showModal({
-						showCancel:false,
-						content:"没有该授权记录,或者授权记录已被撤销",
-						success: (res) => {
-							if (res.confirm) {
-								that.islock=true
-							}
-						}
+			async getAuthRecords() {
+				let params = {
+					id: this.id
+				}
+				let res = await this.$http.guestAuthorizeDetail(params)
+				if (this.$isEmpty(res.data.data)) {
+					this.$dialog.showModal('没有该授权记录,或者授权记录已被撤销', false).then(() => {
+						this.islock = true
 					})
 					return
 				}
 				//授权详情
-				let guestAuthorize=res.data.guestAuthorize
-				that.residentialId=guestAuthorize.residentialId
+				let guestAuthorize = res.data.data
+				this.guestAuthorize = guestAuthorize
+				this.data.beginTime = this.guestAuthorize.beginDate
+				this.data.interviewTime = this.guestAuthorize.beginDate
+				that.residentialId = guestAuthorize.residentialId
 				//授权结束时间
-				that.data.endTime=guestAuthorize.endDate
-				let endDate= that.$commonDate(guestAuthorize.endDate).getTime()
+				that.data.endTime = guestAuthorize.endDate
+				let endDate = that.$commonDate(guestAuthorize.endDate).getTime()
 				//当前时间
-				let now= new Date().getTime()
+				let now = new Date().getTime()
 				//判断授权是否过期
-				if (now>endDate) {
+				if (now > endDate) {
 					uni.showModal({
-						title:"提示",
-						content:"授权时间已过期,请联系被访者重新授权",
-						showCancel:false,
+						title: "提示",
+						content: "授权已过期,请联系被访者重新授权",
+						showCancel: false,
 						success: (res) => {
 							if (res.confirm) {
-								that.islock=true
+								that.islock = true
 							}
 						}
 					})
@@ -328,24 +370,25 @@
 				}
 				// 授权没有过期
 				//通过openid,授权记录id查询访客记录表
-				let guestRes=await this.getGuestRecords()
-				if (guestRes.data.result_code!=1) {
+				let guestRes = await this.getGuestRecords()
+
+				if (this.$isEmpty(guestRes.data.data)) {
+					that.data.guestPosition = guestAuthorize.residentialName + "," +
+						guestAuthorize.buildingName + "," + guestAuthorize.unitName + "," +
+						guestAuthorize.roomName
 					//没有记录,就填表
-					that.data.guestPosition=guestAuthorize.residentialName+","
-									+guestAuthorize.buildingName+","+guestAuthorize.unitName+","+
-									guestAuthorize.roomName
-					that.data.userName=guestAuthorize.userName
-					that.data.residentialId=guestAuthorize.residentialId
-					that.data.residentialName=guestAuthorize.residentialName
-					that.data.userId=guestAuthorize.userId
+					that.data.userName = guestAuthorize.userName
+					that.data.residentialId = guestAuthorize.residentialId
+					that.data.residentialName = guestAuthorize.residentialName
 					return
 				}
 				//有记录,就判断审核状态
-				let guestRecord=guestRes.data.guestRecords[0]
-				var {orgId,orgPosition,rootOrgId,createDate,...restData} = guestRecord
-				that.data=restData
-				that.auditStatus=guestRecord.auditStatus
-				if (that.auditStatus==1) {
+				that.data = guestRes.data.data[0]
+				this.data.guestPosition = that.data.residentialName + "," +
+					that.data.buildingName + "," + that.data.unitName + "," +
+					that.data.roomName
+				that.auditStatus = that.data.auditStatus
+				if (that.auditStatus == 1) {
 					//审核通过。跳转到设备列表
 					that.jumpOpenDoor()
 				}
@@ -353,64 +396,64 @@
 			/**
 			 * 通过openid和授权记录id和审核通过的状态查看访客记录表
 			 */
-			async getGuestRecords(){
-				let jsCode = await new Promise((resolve, reject) => {  
-					uni.login({  
-						provider: 'weixin',  
+			async getGuestRecords() {
+				let jsCode = await new Promise((resolve, reject) => {
+					uni.login({
+						provider: 'weixin',
 						success: res => {
-							resolve(res.code);  
-						},  
-						fail: err => {  
-							reject(err);  
-						}  
+							resolve(res.code);
+						},
+						fail: err => {
+							reject(err);
+						}
 					})
 				})
 				let params = {
-					js_code:jsCode,
-					name:'community',
+					js_code: jsCode,
+					name: 'community',
 					app_type: 1
 				};
 				// let operation = 'miniprogram/getOpenid'; //发起请求
-				let res= await this.$http.getOpenid(params);
-				that.sessionKey=res.data.session_key
-				this.openId=res.data.openid
+				let res = await this.$http.getOpenid(params);
+				that.sessionKey = res.data.session_key
+				this.openId = res.data.openid
 				//获取成功
-				let url='guestRecord/getByCondition'
-				let guestParams={
-					guestAuthId:this.id,
-					openId:this.openId
+				let guestParams = {
+					guestAuthId: this.id,
+					openId: this.openId
 				}
-				let guestRes=await app.globalData.postRequestAsync(guestParams,url)
+				let guestRes = await this.$http.guestRecordsList(guestParams)
+				this.guestRecordId=guestRes.data.data[0].id
 				return guestRes
 			},
-			submit(){
-				let that=this
+			submit() {
+				let that = this
 				if (this.$isEmpty(this.data.guestPosition)) {
 					uni.showModal({
-						title:"提示",
-						content:"系统错误",
-						showCancel:false,
+						title: "提示",
+						content: "系统错误",
+						showCancel: false,
 						success: (res) => {
 							if (res.confirm) {
-								that.islock=true
+								that.islock = true
 							}
 						}
 					})
 					return
 				}
-				if (this.$isEmpty(this.data.guestTime)) {
+				if (this.$isEmpty(this.data.interviewTime)) {
 					this.$refs.uToast.show({
 						title: '请选择访问日期',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
 				}
-				
+
 				if (this.$isEmpty(this.data.userName)) {
 					this.$refs.uToast.show({
 						title: '请填写接待人姓名',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
@@ -418,7 +461,7 @@
 				if (this.$isEmpty(this.data.guestName)) {
 					this.$refs.uToast.show({
 						title: '请填写您的姓名',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
@@ -426,7 +469,7 @@
 				if (this.$isEmpty(this.data.guestTel)) {
 					this.$refs.uToast.show({
 						title: '请填写联系方式',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
@@ -434,23 +477,15 @@
 				if (!this.$u.test.mobile(this.data.guestTel)) {
 					this.$refs.uToast.show({
 						title: '联系方式不正确',
-						position:"top",
-						type: 'error',
-					})
-					return
-				}
-				if (this.$isEmpty(this.data.guestIdcard)) {
-					this.$refs.uToast.show({
-						title: '请填写身份证号',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
 				}
-				if (!this.$u.test.idCard(this.data.guestIdcard)) {
+				if (this.$isNotEmpty(this.data.guestIdcard) && !this.$u.test.idCard(this.data.guestIdcard)) {
 					this.$refs.uToast.show({
 						title: '身份证号不正确',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
@@ -458,160 +493,158 @@
 				if (this.$isEmpty(this.data.guestReason)) {
 					this.$refs.uToast.show({
 						title: '请填写来访目的',
-						position:"top",
+						position: "top",
 						type: 'error',
 					})
 					return
 				}
-				if (JSON.stringify(this.oldData)==JSON.stringify(this.data)) {
-					this.$refs.uToast.show({
-						title: '无任何修改痕迹,请先修改后再提交',
-						position:"top",
-						type: 'error',
-						icon:false,
-						duration:2500
-					})
-					return
-				}
-				this.data.openId=this.openId
-				let operation=''
-				if (this.operaType==0) {
+				this.data.openId = this.openId
+				let operation = ''
+				if (this.operaType == 0) {
 					//新增
-					operation="guestRecord/addGuestRecord"
-					if (this.doorNeedAudit==0) {
+					if (this.doorNeedAudit == 0) {
 						//1不需要审核,直接审核通过
-						this.data.auditStatus=1
+						this.data.auditStatus = 1
 					}
-				}else{
+				} else {
 					//修改
-					operation="guestRecord/updateGuestRecord"
-					this.data.auditStatus=0
+					this.data.auditStatus = 0
 				}
-				app.globalData.postRequest(this.data, operation,function(res){
-					if (res.data.result_code==1) {
-						if (that.doorNeedAudit==0) {
+				this.$http.guestRecordsSubmit(this.data).then(res => {
+					if (res.data.success) {
+						if (this.doorNeedAudit == 0) {
 							//不需要审核,直接跳转到设备列表页
-							that.jumpOpenDoor()
-						}else{
-							that.shareId=res.data.guestRecordId
-							//需要审核,弹框分享给好友审核
-							that.showModal=true
+							this.jumpOpenDoor()
+						} else {
+							this.$dialog.showModal('提交成功,请通知被访者审核', false).then(() => {
+								this.getAuthRecords()
+							})
+							// this.shareId = res.data.guestRecordId
+							// this.showModal = true
 						}
-					}else{
-						that.$refs.uToast.show({
+					} else {
+						this.$refs.uToast.show({
 							title: '操作失败',
-							position:"top",
+							position: "top",
 							type: 'error',
 						})
 					}
 				})
-				
 			}
 		}
 	}
 </script>
 
-<style lang="scss">
-	.bg-gray{
+<style lang="scss" scoped>
+	.bg-gray {
 		background-color: #f7f7f7;
 	}
-	.card{
+
+	.card {
 		box-sizing: border-box;
 		background-color: #FFFFFF;
 	}
-	.card .form{
+
+	.bg-red {
+		background-color: #e54d42;
+		color: #FFFFFF;
+	}
+
+	.card .form {
 		padding: 20rpx 40rpx;
 	}
-	.need{
+
+	.need {
 		font-size: 38rpx;
 		font-weight: 800;
 		color: #ff0000;
 		padding-right: 10rpx;
 	}
-	
-	
-	
+
+
+
 	.modal-mask {
-	  width: 100%;
-	  height: 100%;
-	  position: fixed;
-	  top: 0;
-	  left: 0;
-	  background: #000;
-	  opacity: 0.5;
-	  overflow: hidden;
-	  z-index: 9000;
-	  color: #fff;
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: #000;
+		opacity: 0.5;
+		overflow: hidden;
+		z-index: 9000;
+		color: #fff;
 	}
-	
+
 	.modal-dialog {
-	  width: 540rpx;
-	  overflow: hidden;
-	  position: fixed;
-	  top: 45%;
-	  left: 0;
-	  z-index: 9999;
-	  background: #f9f9f9;
-	  margin: -180rpx 105rpx;
-	  border-radius: 36rpx;
+		width: 540rpx;
+		overflow: hidden;
+		position: fixed;
+		top: 45%;
+		left: 0;
+		z-index: 9999;
+		background: #f9f9f9;
+		margin: -180rpx 105rpx;
+		border-radius: 36rpx;
 	}
-	
+
 	.modal-title {
-	  padding-top: 50rpx;
-	  font-size: 36rpx;
-	  color: #030303;
-	  text-align: center;
+		padding-top: 50rpx;
+		font-size: 36rpx;
+		color: #030303;
+		text-align: center;
 	}
-	
+
 	.modal-content {
-	  padding: 60rpx 0;
+		padding: 60rpx 0;
 	}
-	
+
 	.modal-input {
-	  display: flex;
-	  font-size: 30rpx;
+		display: flex;
+		font-size: 30rpx;
 	}
-	
+
 	.password {
-	  width: 100%;
-	  height: 80rpx;
-	  font-size: 30rpx;
-	  line-height: 80rpx;
-	  padding: 0 20rpx;
-	  box-sizing: border-box;
-	  color: #606266;
-	  text-align: center;
+		width: 100%;
+		height: 80rpx;
+		font-size: 30rpx;
+		line-height: 80rpx;
+		padding: 0 20rpx;
+		box-sizing: border-box;
+		color: #606266;
+		text-align: center;
 	}
-	
+
 	input-holder {
-	  color: #666;
-	  font-size: 28rpx;
+		color: #666;
+		font-size: 28rpx;
 	}
-	
+
 	.modal-footer {
-	  display: flex;
-	  flex-direction: row;
-	  height: 86rpx;
-	  border-top: 1px solid #dedede;
-	  font-size: 34rpx;
-	  line-height: 86rpx;
+		display: flex;
+		flex-direction: row;
+		height: 86rpx;
+		border-top: 1px solid #dedede;
+		font-size: 34rpx;
+		line-height: 86rpx;
 	}
-	.modal-footer button::after{
-	   border: none;
-	  
+
+	.modal-footer button::after {
+		border: none;
+
 	}
+
 	.modal-footer .btn-cancel {
-	  width: 50%;
-	  color: #2a7fff;
-	  text-align: center;
-	 border-radius: 0;
+		width: 50%;
+		color: #2a7fff;
+		text-align: center;
+		border-radius: 0;
 	}
-	
+
 	.modal-footer .btn-confirm {
-	  width: 50%;
-	  color: #666;
-	  border-right: 1px solid #dedede;
-	  text-align: center;
+		width: 50%;
+		color: #666;
+		border-right: 1px solid #dedede;
+		text-align: center;
 	}
-	
 </style>

+ 82 - 96
pages/guest/open_door.vue

@@ -1,123 +1,109 @@
 <template>
 	<view class="page" style="position: relative;">
-		<loading  isFullScreen color="#59a5f0" :active="isloading" text="开门中..."></loading>
 		<radio-group class="block" @change="RadioChange">
 			<view class="cu-list menu text-left">
-				<view class="cu-item" v-for="(item,index) in device_list" :key="index">
+				<view class="cu-item" @click="activedIndex=index" v-for="(item,index) in device_list" :key="index">
 					<label class="flex justify-between align-center flex-sub">
-						<view class="flex-sub margin-left-sm">{{item.name}}</view>
-						<radio class="roundn blue" :class="doorValue==item.id?'checked':''" :checked="doorValue==item.id?true:false"
-						 :value="item.id"></radio>
+						<view class="flex-sub margin-left-sm">{{item.deviceName}}</view>
+						<u-icon size="36" name="checkmark-circle-fill" color="#2f7ff5" v-if="activedIndex==index"></u-icon>
 					</label>
 				</view>
 			</view>
 		</radio-group>
 		<view class="bottom">
-			<button @click="open" class="cu-btn cuIcon  round  bg-white shadow1" style="height: 150rpx;width: 150rpx;margin-bottom: 160rpx;border: 1rpx solid #c6c6c6;">
-				<text :class="isopen?'cuIcon-unlock':'cuIcon-lock'" :style="{'color':(isopen?'#55aa7f':'#989898')}" style="font-size: 60rpx;color: #989898;"></text>
+			<button @click="openDoor" class="cu-btn cuIcon  round  bg-white shadow1"
+				style="height: 150rpx;width: 150rpx;margin-bottom: 160rpx;border: 1rpx solid #c6c6c6;">
+				<text v-if="!isOpen" class="cuIcon-lock" style="font-size: 50rpx;color: #989898;"></text>
+				<u-loading mode="flower" size="40" v-else></u-loading>
 			</button>
 		</view>
 	</view>
 </template>
 
 <script>
-var app=getApp()
-var that;
-import loading from "@/comps/loading/loading.vue"
-export default {
-	components:{
-		loading
-	},
-	data() {
-		return {
-			guestTel:'',
-			
-			memberId:'',
-			residentialId:'',
-			
-			isopen:false,
-			isloading:false,
-			doorValue:'',
-			device_list:[]
-		};
-	},
-	onLoad(options) {
-		that=this
-		this.guestTel=options.guestTel
-		this.memberId=options.memberId
-		this.residentialId=options.residentialId
-		console.log(this.memberId);
-		this.getAuthDevice()
-	},
-	methods:{
-		RadioChange(e) {
-			this.doorValue = e.detail.value
+	var app = getApp()
+	var that;
+	export default {
+		data() {
+			return {
+				guestRecordId:'',
+				guestTel: '',
+				memberId: '',
+				residentialId: '',
+				activedIndex: 0,
+				device_list: [],
+				isOpen:false,
+			};
 		},
-		open(){
-			//进度条加载
-			this.isloading=true
-			setTimeout(()=>{
-				that.openDoor()
-			},2300)
+		onLoad(options) {
+			that = this
+			this.guestTel = options.guestTel
+			this.memberId = options.memberId
+			this.residentialId = options.residentialId
+			this.guestRecordId=options.guestRecordId
+			this.getAuthDevice()
 		},
-		/**
-		 * 立即开门
-		 */
-		openDoor() {
-			 let device_id=this.doorValue
-			 let params = {};
-			 params['member_id'] = this.memberId;
-			 params['device_id'] = device_id;
-			 params['phone']=this.guestTel
-			 params['is_guest']='1'
-			 // let operation = 'member/openDoor';
-			 this.$http.openDoor(params).then (res=>{
-				 that.isloading=false
-				 				 that.isopen=true
-				 app.globalData.oneFailHint(res.data.result_msg,function(){
-				 				   that.isopen=false
-				 });
-				 
-			 });
-		},
-		/**
-		 * 获取设备列表
-		 */
-		getAuthDevice: function () {
-		  let that = this;
-		  let params = {};
-		  params['member_id'] = this.memberId;
-		  // let operation = 'member/getAuthDeviceByMemberId';
-		  // app.globalData.postRequest(params, operation, function (res) {
-				// if (res.data.result_code == 1) {
-				// 	let list=[]
-				//     res.data.list.map(item => {
-				//     	if (item.residentialId.indexOf(that.residentialId)>=0) {
-				//     		list.push(item);
-				//     	}
-				//     });
-				// 	that.device_list=list
-				// 	that.doorValue=list[0].id
-				// }
-		  // });
-		},
-	}
-};
+		methods: {
+			/**
+			 * 立即开门
+			 */
+			openDoor() {
+				let item=this.device_list[this.activedIndex]
+				if (this.$isEmpty(item)) {
+					this.$dialog.showModal('设备不存在')
+					return
+				}
+				let params = {
+					guestId: this.guestRecordId,
+					serialNum: item.deviceSerialNum,
+					deviceFactory: item.deviceFactory,
+					residentialId: item.residentialId,
+					userType: 'FK_'
+				}
+				this.isOpen=true
+				this.$http.openDoor(params).then(res => {
+					this.isOpen=false
+					if (res.data.success) {
+						this.$u.toast('开门成功')
+					} else {
+						this.$u.toast('开门失败')
+					}
+				}).catch(err=>{
+					this.isOpen=false
+				})
+			},
+			/**
+			 * 获取设备列表
+			 */
+			getAuthDevice: function() {
+				let params = {
+					id: this.memberId,
+					residentialId: this.residentialId
+				}
+				this.$http.getAuthDeviceByMemberId(params).then(res => {
+					if (res.data.success) {
+						this.device_list = res.data.data
+					}
+				});
+			},
+		}
+	};
 </script>
 
 <style lang="scss" scoped>
-	.bottom{
+	.bottom {
 		position: fixed;
 		bottom: 0;
 		left: 40%;
 	}
-	.shadow1{
-		box-shadow: 0 0  20rpx #cbcbcb
-		
+
+	.shadow1 {
+		box-shadow: 0 0 20rpx #cbcbcb
 	}
-	button:active{
-		 box-shadow: 0 0  10rpx rgba(203, 203, 203, 0.2);
-		 position: relative;
-		 top: 2px;
+
+	button:active {
+		box-shadow: 0 0 10rpx rgba(203, 203, 203, 0.2);
+		position: relative;
+		top: 2px;
 	}
-</style>
+</style>

+ 39 - 139
pages/index/index.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="content bg-white" style="min-height: 100vh;">
 		<view class="">
-			<loading isFullScreen color="#2f7ff5" :active="isloading" text="开门中..."></loading>
 			<u-navbar :is-back="false" title=" ">
 				<view class="slot-wrap">
 					<view v-if="$isEmpty(plot)" class="padding-left-20" @click="$u.toast('暂无小区信息')">
@@ -36,49 +35,21 @@
 					<text class="text-bold text-lg">智慧社区</text>
 				</view>
 				<view style="padding: 40rpx 10rpx 0rpx;" class="cu-list grid col-5 no-border">
-					<view class="cu-item" :class="item.index==5?'img1-lg':''" @click="top(item.index)"
-						v-for="(item,index) in gridList" :key="index">
-						<block v-if="item.index==5">
+					<view class="cu-item" @click="top(item.index)" v-for="(item,index) in gridList" :key="index">
+						<block>
 							<view class="grid-icon">
-								<image style="width: 88rpx;height: 88rpx;"
-									:src="modalShow?'../../static/home/open4.png':'../../static/home/open4.png'" />
-							</view>
-							<text style="color: #333333;font-size: 30rpx;font-weight: 800;">{{item.title}}</text>
-						</block>
-						<block v-else>
-							<view class="grid-icon">
-								<image style="width: 48rpx;height: 48rpx;" :src="item.icon" />
+								<image style="width: 56rpx;height: 56rpx;" :src="item.icon" />
 							</view>
 							<text style="color: #333333;font-size: 26rpx;">{{item.title}}</text>
 						</block>
 						<view class="cu-tag bg-red badge" v-if="item.badge>0">{{item.badge}}</view>
 					</view>
 				</view>
-
-				<!-- 设备列表 -->
-				<view v-if="modalShow" class="flex justify-around margin-top-10">
-					<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.deviceName}}
-						</view>
-					</view>
-				</view>
-
-			</view>
-			<view class="nav-list bg-white padding-top-20">
-				<view hover-class="none" @click="top(item.index)" class="nav-li light" navigateTo
-					:style="{backgroundColor:item.color}" v-for="(item,index) in elements" :key="index">
-					<view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
-					<view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
-					<image :src="item.icon" mode=""></image>
-				</view>
 			</view>
 		</view>
-		<view class="bg-white">
+		<!-- <view class="bg-white">
 			<image src="/static/common/banner.png" style="width: 100%;" mode="widthFix"></image>
-		</view>
+		</view> -->
 		<view v-if="!this.$isEmpty(goodsList)">
 			<view class="tj-title">
 				<view class="">
@@ -107,7 +78,6 @@
 <script>
 	import bindHome from "@/comps/bindHome.vue"
 	import login from "@/comps/login.vue"
-	import loading from "@/comps/loading/loading.vue"
 	import hotConsult from "@/comps/hot-consult/hot-consult.vue"
 	import goods from "@/comps/goods/goods.vue"
 	var app = getApp();
@@ -118,20 +88,13 @@
 			login,
 			goods,
 			hotConsult,
-			loading
 		},
 		data() {
 			return {
-				isloading: false,
-				//开门设备列表
-				device_list: [],
 				background: {
 					backgroundColor: '#e54d42',
 				},
 				noticeList: [],
-
-				modalShow: false,
-
 				userInfo: {},
 				jsCode: '',
 				openid: '',
@@ -153,43 +116,6 @@
 					'videoType': 0,
 					'videoUri': "https://szsq.nxzhsq.cn/community/miniofile/app/banner.jpg"
 				}, ],
-				elements: [{
-						title: '防疫登记',
-						name: '在线防疫登记',
-						color: '#e3f5ff',
-						icon: '../../static/home/fanyi1.png',
-						index: 6
-					},
-					{
-						title: '健康码',
-						name: '通行防疫码',
-						color: '#e5eef9',
-						icon: '../../static/home/health.png',
-						index: 9
-					},
-
-					{
-						title: '物业报修',
-						name: '在线物业报修',
-						color: '#ffefef',
-						icon: '../../static/home/baoxiu1.png',
-						index: 8
-					},
-					{
-						title: '物业缴费',
-						name: '在线物业缴费',
-						color: '#e9f9f3',
-						icon: '../../static/home/jiaofei.png',
-						index: 7
-					},
-					// {
-					// 	title: '更多服务',
-					// 	name: '更多智慧服务',
-					// 	color: '#eeeeee',
-					// 	icon: '../../static/home/more.png',
-					// 	index:99
-					// }
-				],
 				gridList: [{
 						icon: '../../static/home/fangwu.png',
 						title: "我的房屋",
@@ -202,25 +128,30 @@
 						badge: 0,
 						index: 2
 					},
-					{
-						icon: '../../static/home/open4.png',
-						title: "开门",
-						badge: 0,
-						index: 5
-					},
 					{
 						icon: '../../static/home/cheliang.png',
 						title: "我的车辆",
 						badge: 0,
 						index: 3
 					},
+					{
+						icon: '/static/home/baoxiu1.png',
+						title: "物业报修",
+						badge: 0,
+						index: 8
+					},
 					{
 						icon: '../../static/home/fangke1.png',
 						title: "访客授权",
 						badge: this.vuex_auth_audit_count,
 						index: 4
 					},
-
+					{
+						icon: '/static/home/fanyi1.png',
+						title: "防疫登记",
+						badge: 0,
+						index: 6
+					},
 				]
 			}
 		},
@@ -240,16 +171,13 @@
 			// this.fetchGoodsList()
 		},
 		methods: {
-			onshow(){
+			onshow() {
 				this.login()
 				// this.fetchNoticeList()
 				//获取访客授权待审核的数量
 				if (this.canReset) this.fetchAuthRecordNum()
 				this.canReset = true
-				
-				//获取设备列表
-				this.getAuthDevice()
-				
+
 				//处理进入小程序的不同场景
 				this.execParam();
 				// this.loadData()
@@ -282,22 +210,16 @@
 					let residentialId = uni.getStorageSync("residentialId");
 					if (!this.$isEmpty(memberId)) {
 						let params = {
-							member_id: memberId,
-							residential_id: residentialId,
+							userId: memberId,
+							residentialId: uni.getStorageSync("residentialId"),
 							size: 99,
 							auditStatus: 0
 						}
-						this.$http.getGuestRecordsByMemberId(params).then(res => {
-							if (this.$isNotEmpty(res.data.list)) {
-								let length = res.data.list.length
-								that.$u.vuex('vuex_auth_audit_count', length)
-								that.gridList.forEach(item => {
-									if (item.index == 4) {
-										item.badge = length
-									}
-								})
-							}
-
+						this.$http.guestRecordsCount(params).then(res => {
+							let count = res.data.data
+							that.$u.vuex('vuex_auth_audit_count', count)
+							let item = this.gridList.find(item => item.title == '访客授权')
+							item.badge = count
 						})
 					}
 				} catch (e) {
@@ -332,24 +254,6 @@
 					}
 				});
 			},
-			getAuthDevice: function() {
-				let that = this;
-				let params = {};
-				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.success) {
-						this.device_list = res.data.data
-						app.globalData.device_list = this.device_list
-					}
-				});
-			},
 			async loadData(options) {
 				//进入小程序时进行游客登陆,
 				//以免直接进入商品详情时会提示用户未授权
@@ -460,10 +364,6 @@
 						plotIndex: e.detail.value,
 						plot: value
 					});
-
-					//更新设备列表
-					_this.getAuthDevice()
-
 				}).catch(error => {});
 			},
 			//一键开门
@@ -570,10 +470,9 @@
 					that.$u.vuex('vuex_member', res.data.member)
 					app.globalData.anyHousePass = res.data.anyHousePass; //获取房屋列表
 					_this.getResidentialListByMember();
-					_this.getAuthDevice()
 					_this.fetchAuthRecordNum()
 					_this.getOwnRoomList()
-				}else{
+				} else {
 					uni.removeStorageSync("personTel");
 					uni.removeStorageSync("plotName");
 					uni.removeStorageSync("residentialId");
@@ -582,17 +481,18 @@
 					uni.removeStorageSync("residentialList");
 				}
 			},
-			getOwnRoomList(){
-				let params={
-					memberId:this.vuex_member.id
+			getOwnRoomList() {
+				let params = {
+					memberId: this.vuex_member.id
 				}
-				this.$http.getHouseUserCondition(params).then(res=>{
-					let list=res.data.data
-					list.forEach(item=>{
-						item.address=item.residentialName+"-"+item.buildingName+"-"+item.unitName+"-"+item.roomName
+				this.$http.getHouseUserCondition(params).then(res => {
+					let list = res.data.data
+					list.forEach(item => {
+						item.address = item.residentialName + "-" + item.buildingName + "-" + item
+							.unitName + "-" + item.roomName
 					})
 					getApp().globalData.own_room_list = list;
-					this.$u.vuex('vuex_own_room_list',list)
+					this.$u.vuex('vuex_own_room_list', list)
 				})
 			},
 			/**
@@ -625,12 +525,12 @@
 					let doorNeedAuditList = []
 					let residentialIdList = [];
 					let personTelList = []
-					
+
 					if (res.data.success) {
 						that.fetchNoticeList(res.data.data[0].residentialId);
 						app.globalData.userId = res.data.data[0].userId
-						
-						res.data.data.forEach(item=>{
+
+						res.data.data.forEach(item => {
 							list.push(item.name);
 							doorNeedAuditList.push(item.doorNeedAudit)
 							residentialIdList.push(item.id);

+ 1 - 0
pages/myCar/add.vue

@@ -219,6 +219,7 @@
 				this.model.personId=this.vuex_member.id
 				this.model.personName=this.vuex_member.name
 				this.model.personPhone=this.vuex_member.phone
+				this.model.userIdCard=this.vuex_member.idcard
 				that.$http.saveOrUpdateCar(this.model).then (res=>{
 					if (res.data.result) {
 						that.$util.showModal('操作成功!',false).then(res=>{

+ 5 - 8
pages/myCar/myCar.vue

@@ -222,18 +222,15 @@
 			upCallback(mescroll) {
 				let that = this;
 				let params = {
-					page: {
-						current: mescroll.num,
-						size: 10,
-					},
-					// selectType: 3,//员工,我的车辆
+					current: mescroll.num,
+					size: 10,
 					residentialId:uni.getStorageSync("residentialId"),
-					personId:this.vuex_member.id
+					memberId:this.vuex_member.id
 				}
 				try {
 					that.$http.carPage(params).then (res=>{
-						let data = res.data.carPage.records
-						let total = res.data.carPage.total;
+						let data = res.data.data.records
+						let total = res.data.data.total;
 						mescroll.endBySize(data.length, total);
 						if (mescroll.num == 1) {
 							that.list = []; //如果是第一页需手动制空列表

+ 120 - 0
pages/open/open.vue

@@ -0,0 +1,120 @@
+<template>
+	<view class="page">
+		<view class="" v-if="!loading">
+			<view class="" v-if="$isNotEmpty(device_list)">
+				<view class="cu-list menu text-left">
+					<view class="cu-item" @click="activedIndex=index" v-for="(item,index) in device_list" :key="index">
+						<label class="flex justify-between align-center flex-sub">
+							<view class="flex-sub margin-left-sm">{{item.deviceName}}</view>
+							<u-icon size="36" name="checkmark-circle-fill" color="#2f7ff5" v-if="activedIndex==index">
+							</u-icon>
+						</label>
+					</view>
+				</view>
+				<view class="bottom">
+					<button @click="openDoor" class="cu-btn cuIcon  round  bg-white shadow1"
+						style="height: 150rpx;width: 150rpx;margin-bottom: 160rpx;border: 1rpx solid #c6c6c6;">
+						<text v-if="!isOpen" class="cuIcon-lock" style="font-size: 50rpx;color: #989898;"></text>
+						<u-loading mode="flower" size="40" v-else></u-loading>
+					</button>
+				</view>
+			</view>
+			<empty v-else></empty>
+		</view>
+		<loading v-else></loading>
+	</view>
+</template>
+
+<script>
+	import empty from "@/comps/empty.vue"
+	import loading from "@/comps/loading.vue"
+	var app = getApp()
+	var that;
+	export default {
+		components:{
+			empty,
+			loading
+		},
+		data() {
+			return {
+				activedIndex: 0,
+				device_list: [],
+				loading: true,
+				isOpen: false,
+			};
+		},
+		onShow() {
+			that = this
+			this.getAuthDevice()
+		},
+		methods: {
+			/**
+			 * 立即开门
+			 */
+			openDoor() {
+				let item = this.device_list[this.activedIndex]
+				if (this.$isEmpty(item)) {
+					this.$dialog.showModal('设备不存在')
+					return
+				}
+				let params = {
+					memberId: this.vuex_member.id,
+					serialNum: item.deviceSerialNum,
+					deviceFactory: item.deviceFactory,
+					residentialId: item.residentialId,
+					userType: 'ZH_'
+				}
+				this.isOpen = true
+				this.$http.openDoor(params).then(res => {
+					this.isOpen = false
+					if (res.data.success) {
+						this.$u.toast('开门成功')
+					} else {
+						this.$u.toast('开门失败')
+					}
+				}).catch(err => {
+					this.isOpen = false
+				})
+			},
+			/**
+			 * 获取设备列表
+			 */
+			getAuthDevice: function() {
+				let memberId = this.vuex_member ? this.vuex_member.id : ''
+				let residentialId = uni.getStorageSync("residentialId")
+				if (!memberId || !residentialId) {
+					this.loading=false
+					return
+				}
+				let params = {
+					id: memberId,
+					residentialId
+				}
+				this.$http.getAuthDeviceByMemberId(params).then(res => {
+					this.loading=false
+					if (res.data.success) {
+						this.device_list = res.data.data
+					}
+				});
+			},
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.bottom {
+		position: fixed;
+		bottom: 0;
+		left: 40%;
+	}
+
+	.shadow1 {
+		box-shadow: 0 0 20rpx #cbcbcb
+	}
+
+	button:active {
+		box-shadow: 0 0 10rpx rgba(203, 203, 203, 0.2);
+		position: relative;
+		top: 2px;
+	}
+</style>

+ 117 - 89
pages/record/card.vue

@@ -1,19 +1,26 @@
 <template>
 	<view class="">
-		<u-popup v-model="detailShow" mode="center" width="650" :closeable="true" border-radius="10">
+		<u-popup v-model="detailShow" mode="center" width="650" :closeable="true" border-radius="10" negative-top="300">
 			<view style="padding: 60rpx 5rpx 10rpx;">
-				<u-cell-group >
-					<u-cell-item :icon-style="iconStyle"  :border-top="false" :arrow="false"  icon="account-fill"  title="访客姓名:" :value="detailData.guestName"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="bookmark-fill"  title="身份证号:" :value="detailData.guestIdcard"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="phone-fill"  title="手机号:" :value="detailData.guestTel"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="map-fill"  title="访问区域:" :value="detailData.guestPosition"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="clock-fill"  title="访问时间:" :value="detailData.guestTime"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="plus-people-fill"  title="接待人:" :value="detailData.userName"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :border-bottom="false" :arrow="false"  icon="error-circle-fill"  title="访问目的:" :value="detailData.guestReason"></u-cell-item>
+				<u-cell-group>
+					<u-cell-item :icon-style="iconStyle" :border-top="false" :arrow="false" icon="account-fill"
+						title="访客姓名:" :value="detailData.guestName"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :arrow="false" icon="bookmark-fill" title="身份证号:"
+						:value="detailData.guestIdcard"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :arrow="false" icon="phone-fill" title="手机号:"
+						:value="detailData.guestTel"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :arrow="false" icon="map-fill" title="访问区域:"
+						:value="guestPosition(detailData)"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :arrow="false" icon="clock-fill" title="访问时间:"
+						:value="detailData.interviewTime"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :arrow="false" icon="plus-people-fill" title="接待人:"
+						:value="detailData.userName"></u-cell-item>
+					<u-cell-item :icon-style="iconStyle" :border-bottom="false" :arrow="false" icon="error-circle-fill"
+						title="访问目的:" :value="detailData.guestReason"></u-cell-item>
 				</u-cell-group>
 			</view>
 		</u-popup>
-		
+
 		<view @click="showDetail(item)" class="data" v-for="(item, index) in list" :key="index">
 			<view class="top">
 				<view class="left">
@@ -33,12 +40,12 @@
 					<view style="padding: 20rpx 30rpx 0;">
 						<view class="content">
 							<text class="padding-right-10">访问区域:</text>
-							<text >{{item.guestPosition}}</text>
+							<text>{{guestPosition(item)}}</text>
 						</view>
 						<view class="content">
 							<text class="padding-right-10">联系方式:</text>
 							<text>{{item.guestTel}}</text>
-							<image @click.stop="call(item.guestTel)" class="call" src="/static/call.png" ></image>
+							<image @click.stop="call(item.guestTel)" class="call" src="/static/call.png"></image>
 						</view>
 						<view class="content">
 							<text class="padding-right-10">来访目的:</text>
@@ -47,12 +54,13 @@
 					</view>
 				</view>
 			</view>
-			<view class="bottom" >
+			<view class="bottom">
 				<!-- 待审核,显示取消工单 -->
-				<view @click.stop="pass(item)" v-if="item.auditStatus==0" class="cu-btn  sm round bg-blue margin-right-20" >
+				<view @click.stop="pass(item)" v-if="item.auditStatus==0"
+					class="cu-btn  sm round bg-blue margin-right-20">
 					审核通过
 				</view>
-				<view @click.stop="fail(item)" v-if="item.auditStatus==0" class="cu-btn  sm round bg-blue" >
+				<view @click.stop="fail(item)" v-if="item.auditStatus==0" class="cu-btn  sm round bg-blue">
 					审核不通过
 				</view>
 			</view>
@@ -61,93 +69,113 @@
 </template>
 
 <script>
-export default {
-	name: 'card',
-	props:{
-		list:{
-			type:Array,
-			default:()=>{
-				[]
+	export default {
+		name: 'card',
+		props: {
+			list: {
+				type: Array,
+				default: () => {
+					[]
+				}
 			}
-		}
-	},
-	data() {
-		return {
-		};
-	},
-	onLoad() {
-		
-	},
-	methods:{
-		call(phone){
-			uni.makePhoneCall({
-				phoneNumber:phone
-			})
 		},
-		showDetail(item){
-			this.$emit('showDetail',item)
+		data() {
+			return {
+				detailShow:false,
+				detailData:{},
+				iconStyle:{
+					color:"#1887ff"
+				},
+			};
 		},
-		pass(item){
-			this.$emit('pass',item)
+		onLoad() {
+
 		},
-		fail(item){
-			this.$emit('fail',item)
+		computed: {
+			guestPosition() {
+				return data => {
+					return `${data.residentialName}-${data.buildingName}-${data.unitName}-${data.roomName}`
+				}
+			}
+		},
+		methods: {
+			call(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			},
+			showDetail(item) {
+				this.detailShow=true
+				this.detailData=item
+			},
+			pass(item) {
+				this.$emit('pass', item)
+			},
+			fail(item) {
+				this.$emit('fail', item)
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.bg-blue{
-	background-color: #59a5f0;
-	color: #FFFFFF;
-}
+	.bg-blue {
+		background-color: #59a5f0;
+		color: #FFFFFF;
+	}
+
+
+	.data {
+		width: 710rpx;
+		background-color: #ffffff;
+		margin: 20rpx auto;
+		border-radius: 6rpx;
+		box-sizing: border-box;
+		padding: 20rpx;
+		font-size: 28rpx;
 
-	
-.data {
-	width: 710rpx;
-	background-color: #ffffff;
-	margin: 20rpx auto;
-	border-radius: 6rpx;
-	box-sizing: border-box;
-	padding: 20rpx;
-	font-size: 28rpx;
-	.top {
-		display: flex;
-		justify-content: space-between;
-		padding-bottom: 20rpx;
-		border-bottom: 1rpx solid #EEEEEE;
-		.left {
+		.top {
 			display: flex;
-			align-items: center;
-			.title {
-				margin: 0 10rpx;
-				font-size: 30rpx;
+			justify-content: space-between;
+			padding-bottom: 20rpx;
+			border-bottom: 1rpx solid #EEEEEE;
+
+			.left {
+				display: flex;
+				align-items: center;
+
+				.title {
+					margin: 0 10rpx;
+					font-size: 30rpx;
+				}
+			}
+
+			.right {
+				margin-right: 10rpx;
 			}
 		}
-		.right{
-			margin-right: 10rpx;
-		}
-	}
-	.item {
-		margin: 5rpx 0 20rpx 0;
-		.content {
-			// border-bottom: 1rpx dashed #DDDDDD;
-			padding: 20rpx 0 ;
-			
-			.call{
-				width: 36rpx;
-				height: 36rpx;
-				margin-left: 40rpx;
-				margin-top: 10rpx;
+
+		.item {
+			margin: 5rpx 0 20rpx 0;
+
+			.content {
+				// border-bottom: 1rpx dashed #DDDDDD;
+				padding: 20rpx 0;
+
+				.call {
+					width: 36rpx;
+					height: 36rpx;
+					margin-left: 40rpx;
+					margin-top: 10rpx;
+				}
 			}
 		}
+
+		.bottom {
+			display: flex;
+			margin-top: 30rpx;
+			justify-content: flex-end;
+			align-items: center;
+		}
 	}
-	.bottom {
-		display: flex;
-		margin-top: 30rpx;
-		justify-content: flex-end;
-		align-items: center;
-	}
-}
 </style>

+ 85 - 110
pages/record/item.vue

@@ -1,37 +1,38 @@
 <template>
-	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
-		<card @showDetail="showDetail" @pass="pass" @fail="fail" :list="list" ></card>
+	<MeScroll :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<card @pass="pass" @fail="fail" :list="list"></card>
 	</MeScroll>
 </template>
 <script>
 	import MeScroll from '@/comps/mescroll-body/mescroll-uni.vue'
 	import card from './card.vue'
-	var app=getApp()
+	var app = getApp()
 	export default {
-		components:{
-			MeScroll,card
+		components: {
+			MeScroll,
+			card
 		},
 		props: {
-			params:Object,
+			params: Object,
 			type: Number,
 			i: Number,
-			item:Object
+			item: Object
 		},
 		data() {
 			return {
 				//审核不通过时展示
-				modelShow:false,
+				modelShow: false,
 				//审核不通过的原因
-				opinion:'',
-				dataDetail:{},
-				
-				memberId:'',
+				opinion: '',
+				dataDetail: {},
+
+				memberId: '',
 				isInit: false, // 是否初始化
 				list: [], // 列表数据
 				mescroll: null, // mescroll 对象
 				// 上拉配置参数
 				up: {
-					noMoreSize: 3, 
+					noMoreSize: 3,
 					auto: false,
 					page: {
 						page: 0,
@@ -40,102 +41,76 @@
 				},
 				// 下拉配置参数
 				down: {
-					use: true, 
+					use: true,
 					auto: false
 				}
 			}
 		},
 		created() {
-			this.memberId=getApp().globalData.member.id
+			this.memberId = getApp().globalData.member.id
 		},
-		watch:{
+		watch: {
 			type(val) {
-				if(!this.isInit && val === this.i) {
+				if (!this.isInit && val === this.i) {
 					this.mescroll.resetUpScroll()
 				}
 			}
 		},
 		mounted() {
-			if(!this.isInit && this.i === 0) {
+			if (!this.isInit && this.i === 0) {
 				this.mescroll.resetUpScroll()
 			}
 		},
 		methods: {
-			/**
-			 * 获取待审核的数量
-			 */
-			fetchAuthRecordNum(){
-				let that=this
-				let memberId=app.globalData.member.id
-				let residentialId=uni.getStorageSync("residentialId")
-				console.log(residentialId,"11111111")
-				if (!this.$isEmpty(memberId)) {
-					let params={
-						member_id:memberId,
-						residential_id:residentialId,
-						size:99,
-						auditStatus:0
-					}
-					// let operation='guestRecord/getListByMemberId'
-					this.$http.getGuestRecordsByMemberId(params).then(res=>{
-						let length=res.data.list.length
-						that.$u.vuex('vuex_auth_audit_count',length)
-						
-					})
-				}
-			},
-			/**
-			 * 显示详情
-			 * @param {Object} item
-			 */
-			showDetail(item){
-				this.$emit('showDetail',item)
-			},
 			/**
 			 * 通过审核
 			 */
-			pass(item){
-				let that=this
-				let {rootOrgId,orgPosition,orgId,...params}=item
-				params.auditStatus=1
-				let operation="guestRecord/updateGuestRecord"
-				uni.showModal({
-					title:"提示",
-					content:"确定审核通过该访客信息吗?",
-					showCancel:true,
-					success: (res) => {
-						if (res.confirm) {
-							getApp().globalData.postRequest(params,operation,function(res){
-								that.fetchAuthRecordNum()
-								that.mescroll.resetUpScroll()
-							})
-						}
-					}
+			pass(item) {
+				let params = {
+					id: item.id,
+					auditStatus: 1
+				}
+				this.$dialog.showModal('确定审核通过该记录?').then(() => {
+					this.$http.guestRecordsSubmit(params).then(res => {
+						this.fetchAuthRecordNum()
+						this.mescroll.resetUpScroll()
+					})
 				})
+			},
+			fetchAuthRecordNum() {
+
 			},
 			/**
 			 * 审核不通过
 			 * @param {Object} item
 			 */
-			fail(item){
-				let that=this
-				let {rootOrgId,orgPosition,orgId,...params}=item
-				params.auditStatus=2
-				let operation="guestRecord/updateGuestRecord"
-				uni.showModal({
-					title:"提示",
-					content:"确定审核不通过该访客信息吗?",
-					showCancel:true,
-					success: (res) => {
-						if (res.confirm) {
-							getApp().globalData.postRequest(params,operation,function(res){
-								that.fetchAuthRecordNum()
-								that.mescroll.resetUpScroll()
-							})
-						}
-					}
+			fail(item) {
+				let params = {
+					id: item.id,
+					auditStatus: 2
+				}
+				this.$dialog.showModal('确定审核不通过该记录?').then(() => {
+					this.$http.guestRecordsSubmit(params).then(res => {
+						this.fetchAuthRecordNum()
+						this.mescroll.resetUpScroll()
+					})
 				})
 			},
+			fetchAuthRecordNum() {
+				let memberId = this.vuex_member.id
+				let residentialId = uni.getStorageSync("residentialId");
+				if (!this.$isEmpty(memberId)) {
+					let params = {
+						userId: memberId,
+						residentialId: uni.getStorageSync("residentialId"),
+						size: 99,
+						auditStatus: 0
+					}
+					this.$http.guestRecordsCount(params).then(res => {
+						this.$u.vuex('vuex_auth_audit_count', res.data.data)
+					})
+				}
+			},
 			/**
 			 * @param {Object} mescroll 初始化组件
 			 */
@@ -146,37 +121,37 @@
 			 * @param {Object} mescroll 上拉回调
 			 */
 			upFn(mescroll) {
-				try{
-					let that=this
-					let params={
-						member_id:that.memberId,
-						residential_id:uni.getStorageSync("residentialId"),
-						current:mescroll.num,
-						size:mescroll.size,
+				try {
+					let params = {
+						userId: this.memberId,
+						residentialId: uni.getStorageSync("residentialId"),
+						query: {
+							current: mescroll.num,
+							size: mescroll.size,
+						}
 					}
-					if (this.item.value!=-1) {
-						params.auditStatus=this.item.value
+					if (this.item.value != -1) {
+						params.auditStatus = this.item.value
 					}
 					if (!this.$isEmpty(this.params.id)) {
-						params.id=this.params.id
+						params.id = this.params.id
 					}
 					if (!this.$isEmpty(this.params.guestName)) {
-						params.guestName=this.params.guestName
+						params.guestName = this.params.guestName
 					}
 					if (!this.$isEmpty(this.params.guestTel)) {
-						params.guestTel=this.params.guestTel
+						params.guestTel = this.params.guestTel
 					}
-					// let operation='guestRecord/getListByMemberId'
-					this.$http.getGuestRecordsByMemberId(params).then(res=>{
-						let data=res.data.list
-						let length=data.length
-						let total=res.data.total
-						mescroll.endBySize(length, total);
-						if(mescroll.num == 1) that.list = []; //如果是第一页需手动制空列表
-						that.list=that.list.concat(data); //追加新数据
-						
+					this.$http.guestRecordsPage(params).then(res => {
+						let data = res.data.data
+						let records = data.records
+						let total = data.total
+						mescroll.endBySize(records.length, total)
+						if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list = this.list.concat(records); //追加新数据
+
 					})
-				}catch(e){
+				} catch (e) {
 					mescroll.endErr();
 				}
 			},
@@ -184,21 +159,21 @@
 			 * 下拉回调
 			 * */
 			downFn(mescroll) {
-				setTimeout(()=>{
+				setTimeout(() => {
 					this.mescroll.resetUpScroll()
 					uni.showToast({
-						title:"刷新成功",
-						icon:"none",
-						position:"top"
+						title: "刷新成功",
+						icon: "none",
+						position: "top"
 					})
-				},1500)
+				}, 1500)
 			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	view{
+	view {
 		box-sizing: border-box;
 	}
 </style>

+ 1 - 28
pages/record/record.vue

@@ -1,19 +1,5 @@
 <template>
 	<view class="container">
-		<u-popup v-model="detailShow" mode="center" width="650" :closeable="true" border-radius="10">
-			<view style="padding: 60rpx 5rpx 10rpx;">
-				<u-cell-group >
-					<u-cell-item :icon-style="iconStyle"  :border-top="false" :arrow="false"  icon="account-fill"  title="访客姓名:" :value="detailData.guestName"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="bookmark-fill"  title="身份证号:" :value="detailData.guestIdcard"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="phone-fill"  title="手机号:" :value="detailData.guestTel"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="map-fill"  title="访问区域:" :value="detailData.guestPosition"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="clock-fill"  title="访问时间:" :value="detailData.guestTime"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="plus-people-fill"  title="接待人:" :value="detailData.userName"></u-cell-item>
-					<u-cell-item :icon-style="iconStyle"  :border-bottom="false" :arrow="false"  icon="error-circle-fill"  title="访问目的:" :value="detailData.guestReason"></u-cell-item>
-				</u-cell-group>
-			</view>
-		</u-popup>
-		
 		<u-modal cancel-text="重置" cancel-color="#000000" @cancel="filterReset" :show-cancel-button="true"  @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
 			<view class="slot-content" style="margin: 20rpx;">
 				<u-form label-width="150"  ref="uForm">
@@ -58,12 +44,6 @@
 		},
 		data() {
 			return {
-				iconStyle:{
-					color:"#59a5f0"
-				},
-				
-				detailShow:false,
-				detailData:{},
 				
 				filterCount:0,
 				filterShow:false,
@@ -99,19 +79,12 @@
 			this.getFilterCount()
 		},
 		methods:{
-			/**显示详情
-			 * @param {Object} item
-			 */
-			showDetail(item){
-				this.detailShow=true
-				this.detailData=item
-			},
 			/**
 			 * 审核不通过时显示弹出框
 			 * @param {Object} item
 			 */
 			fail(item){
-				console.log(item);
+				
 			},
 			/**
 			 * 显示筛选弹窗