huangmp 4 years ago
parent
commit
4d21879ce4
56 changed files with 5188 additions and 3844 deletions
  1. 10 5
      .hbuilderx/launch.json
  2. 0 3
      App.vue
  3. 92 73
      assets/http/api.js
  4. 68 57
      assets/http/service.js
  5. 2 2
      comps/device-card.vue
  6. 1 1
      comps/dt_service.vue
  7. 1 1
      comps/hot-consult/hot-consult.vue
  8. 73 0
      comps/login.vue
  9. 1 1
      comps/mescroll-body/components/mescroll-empty.vue
  10. 57 21
      main.js
  11. 9 12
      pages.json
  12. 1 1
      pages/authorize_record/authorize_record.vue
  13. 22 0
      pages/bingRoom/bingRoom.vue
  14. 1 1
      pages/bluetooth/bluetooth.vue
  15. 1 1
      pages/choosePlot/chooseBuilding/chooseBuilding.vue
  16. 1 1
      pages/choosePlot/choosePlot.vue
  17. 1 1
      pages/choosePlot/chooseRoom/chooseRoom.vue
  18. 1 1
      pages/choosePlot/chooseUnit/chooseUnit.vue
  19. 8 8
      pages/choosePlot/householdCert/householdCert.vue
  20. 14 14
      pages/community/community.vue
  21. 1 1
      pages/develop/develop.vue
  22. 4 4
      pages/device/records.vue
  23. 1 1
      pages/empty/empty.vue
  24. 1 1
      pages/empty/goauth.vue
  25. 1 1
      pages/guide/guide.vue
  26. 607 580
      pages/index/index.vue
  27. 1 1
      pages/my-camera/my-camera.vue
  28. 3 3
      pages/myCar/add.vue
  29. 615 614
      pages/myFamily/add/add.vue
  30. 1 1
      pages/myFamily/addFamily/addFamily.vue
  31. 1 1
      pages/myFamily/audit-detail/audit-detail.vue
  32. 1 1
      pages/myFamily/comps/apply-card.vue
  33. 1 1
      pages/myFamily/comps/audit-card.vue
  34. 0 1
      pages/myFamily/comps/item.vue
  35. 2 2
      pages/myFamily/comps/user-card.vue
  36. 645 645
      pages/myFamily/editFamily/editFamily.vue
  37. 4 4
      pages/myFamily/myfamily1.vue
  38. 1 1
      pages/myhome/familyList.vue
  39. 23 47
      pages/notice/notice.vue
  40. 383 375
      pages/register/register.vue
  41. 1 1
      pages/services/property/list/card.vue
  42. 0 1
      pages/services/property/list/item.vue
  43. 125 109
      pages/services/property/property.vue
  44. 385 453
      pages/uploadFace/uploadFace.vue
  45. 105 112
      pages/wode/feedback/feedback.vue
  46. 140 119
      pages/wode/news/news.vue
  47. 854 0
      pages/wode/wode-unlogin.vue
  48. 516 509
      pages/wode/wode.vue
  49. BIN
      static/common/banner.png
  50. BIN
      static/common/empty.png
  51. BIN
      static/wode/churu.png
  52. BIN
      static/wode/logout.png
  53. BIN
      static/wode/renliang.png
  54. 3 2
      store/index.js
  55. 85 49
      utils/dialog.js
  56. 314 0
      utils/wx_api.js

+ 10 - 5
.hbuilderx/launch.json

@@ -2,10 +2,15 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
-            "type": "uniCloud",
-            "default": {
-                "launchtype": "remote"
-            }
-        }
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
     ]
 }

+ 0 - 3
App.vue

@@ -48,9 +48,6 @@
 			this.param = e;
 			this.execParam();
 		},
-		onHide: function() {
-			console.log('App Hide')
-		},
 		methods: {
 			execParam() {
 				if (this.param == null || this.param.referrerInfo == null) return;

+ 92 - 73
assets/http/api.js

@@ -1,106 +1,123 @@
-import {http} from './service.js'
+import {
+	http
+} from './service.js'
 
 //文件上传
-const uploadFile= p=> http.upload('/blade-resource/oss/endpoint/put-pic-md5', {name:'file',filePath:p})
+const uploadFile = p => http.upload('/blade-resource/oss/endpoint/put-pic-md5', {
+	name: 'file',
+	filePath: p
+})
 
 //生成二维码
-const generateCode = p => http.post('/community-app-service/app/miniprogram/generateCode',p)
+const generateCode = p => http.post('/community-app-service/app/miniprogram/generateCode', p)
 
 //获取accessToken
-const getAccessToken = p =>http.post('/community-app-service/app/miniprogram/getAccessToken',p)
+const getAccessToken = p => http.post('/community-app-service/app/miniprogram/getAccessToken', p)
 
 //getOpenid
-const getOpenid =p => http.post("/community-app-service/app/miniprogram/getOpenid",p)
+const getOpenid = p => http.post("/community-app-service/app/miniprogram/getOpenid", p)
 //通过openid获取会员信息
-const getMemberByOpenid=p => http.post('/community-app-service/app/miniprogram/getMemberByOpenid',p)
+const getMemberByOpenid = p => http.post('/community-app-service/app/miniprogram/getMemberByOpenid', p)
+//通过会员id获取房间列表
+const getRoomByMemberId = p => http.post('/community-app-service/app/estate/getRoomByMemberId', p)
+//公告列表
+const getNoticeList = p => http.post('/community-app-service/app/notice/noticeList', p)
+//获取门禁设备列表
+const getAuthDeviceByMemberId = p => http.post("/community-app-service/app/member/getAuthDeviceByMemberId", p)
+//远程开门
+const openDoor = p => http.post("/community-app-service/app/member/openDoor", p)
+
+
+const feedback = p => http.post("/community-app-service/app/feedback/submit", p)
+
 //获取地理位置
-const getLocation =p => http.post('/community-app-service/app/miniprogram/ws/geocoder/v1/location',p)
+const getLocation = p => http.post('/community-app-service/app/miniprogram/ws/geocoder/v1/location', p)
+
+
 //获取区列表
-const getDistrictChildren = p =>http.post('/community-app-service/app/miniprogram/ws/district/v1/getchildren',p)
+const getDistrictChildren = p => http.post('/community-app-service/app/miniprogram/ws/district/v1/getchildren', p)
+
 
-//通过会员id获取房间列表
-const getRoomByMemberId = p =>http.post('/community-app-service/app/estate/getRoomByMemberId',p)
 
 //通过区code查询小区列表
-const getResidentialByRegionArea = p =>http.post('/community-app-service/app/residential/getByRegionArea',p)
+const getResidentialByRegionArea = p => http.post('/community-app-service/app/residential/getByRegionArea', p)
 //通过小区id获取楼栋列表
-const getBuildingsByResidentialId = p =>http.post('/community-app-service/app/building/getBuildingsByResidentialId',p)
+const getBuildingsByResidentialId = p => http.post('/community-app-service/app/building/getBuildingsByResidentialId', p)
 //通过楼栋id获取单元列表
-const getUnitsByBuildingId = p =>http.post('/community-app-service/app/unit/getUnitsByBuildingId',p)
+const getUnitsByBuildingId = p => http.post('/community-app-service/app/unit/getUnitsByBuildingId', p)
 //通过单元id获取房间列表
-const getRoomsByUnitId = p =>http.post('/community-app-service/app/room/getByUnitId',p)
+const getRoomsByUnitId = p => http.post('/community-app-service/app/room/getByUnitId', p)
 //根据会员id获取访客授权列表
-const getGuestRecordsByMemberId = p =>http.post('/community-app-service/app/guestRecord/getListByMemberId',p)
+const getGuestRecordsByMemberId = p => http.post('/community-app-service/app/guestRecord/getListByMemberId', p)
 
 //会员获取验证码
-const getSmsCode = p =>http.post('/community-app-service/app/member/getSmsCode',p)
+const getSmsCode = p => http.post('/community-app-service/app/member/getSmsCode', p)
 
 //会员注册接口
-const memberRegister = p =>http.post('/community-app-service/app/member/memberRegister',p)
+const memberRegister = p => http.post('/community-app-service/app/member/memberRegister', p)
 //会员注册用户/添加家人
-const authentication = p =>http.post('/community-app-service/app/member/authentication',p)
+const authentication = p => http.post('/community-app-service/app/member/authentication', p)
 //编辑家人
-const editFamily = p =>http.post('/community-app-service/app/houseuser/editUser',p)
+const editFamily = p => http.post('/community-app-service/app/houseuser/editUser', p)
 
 //删除家人
-const deleteUserById = p => http.post('/community-app-service/app/houseuser/deleteUserById',p)
+const deleteUserById = p => http.post('/community-app-service/app/houseuser/deleteUserById', p)
 
 //通过房间id获取房屋成员
-const getFamilyByRoomIds = p => http.post('/community-app-service/app/houseuser/getUserByRoomId',p)
-
+const getFamilyByRoomIds = p => http.post('/community-app-service/app/houseuser/getUserByRoomId', p)
 
+//getHouseUser列表
+const getHouseUser = p => http.post('/community-app-service/app/houseuser/getHouseUserListByMemberAndResidential', p)
 //banner列表
-const adList = p => http.post('/community-app-service/app/adPushApp/getList',p)
+const adList = p => http.post('/community-app-service/app/adPushApp/getList', p)
+
+
+
 
-//公告列表
-const getNoticeList = p => http.post('/community-app-service/app/notice/noticeList',p)
 
-//获取门禁设备列表
-const getAuthDeviceByMemberId = p =>http.post("/community-app-service/app/member/getAuthDeviceByMemberId",p)
 
 
 //获取字典接口
-const getDictByCode = code => http.get('/blade-system/dict-biz/dictionary?code='+code);
+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.post('/community-app-service/app/car/page', p)
 //新增或编辑车辆
-const saveOrUpdateCar = p => http.post('/community-app-service/app/car/saveOrUpdate',p)
+const saveOrUpdateCar = p => http.post('/community-app-service/app/car/saveOrUpdate', p)
 //根据memberId获取家人列表
-const getAllUserByMemberId = p => http.post('/community-app-service/app/houseuser/getAllUserByMemberId',p)
+const getAllUserByMemberId = p => http.post('/community-app-service/app/houseuser/getAllUserByMemberId', p)
 //获取住户审核记录
-const getAllApplyUserByMemberId = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByMemberId',p)
+const getAllApplyUserByMemberId = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByMemberId', p)
 //通过房间获取住户审核记录
-const getAllApplyUserByRoomIds = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByRoomIds',p)
+const getAllApplyUserByRoomIds = p => http.post('/community-app-service/app/applyuser/getAllApplyUserByRoomIds', p)
 
 //住户审核
-const updateCheckState = p => http.post('/community-app-service/app/applyuser/updateCheckState',p)
+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/getListByMemberId', p)
 //新增授权记录
-const addGuestAuthorize = p => http.post('/community-app-service/app/guestAuthorize/addGuestAuthorize',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', p)
 
 //新增物业报修工单
-const addEstateRepair = p => http.post('/community-app-service/app/estateRepair/addEstateRepair',p)
+const addEstateRepair = p => http.post('/community-app-service/app/estateRepair/addEstateRepair', p)
 //物业报修列表
-const estateRepairList = p => http.post('/community-app-service/app/estateRepair/estateRepairList',p)
+const estateRepairList = p => http.post('/community-app-service/app/estateRepair/estateRepairList', p)
 //物业保修详情
-const estateRepairDetail = p => http.post('/community-app-service/app/estateRepair/estateRepairDetail',p)
+const estateRepairDetail = p => http.post('/community-app-service/app/estateRepair/estateRepairDetail', p)
 
 //新增防疫登记
-const addPratique = p => http.post('/community-app-service/app/pratique/addPratique',p)
+const addPratique = p => http.post('/community-app-service/app/pratique/addPratique', p)
 
 //防疫登记列表
-const pratiqueList = p =>http.post("/community-app-service/app/pratique/getListByMemberId",p)
-//远程开门
-const openDoor = p =>http.post("/community-app-service/app/member/openDoor",p)
+const pratiqueList = p => http.post("/community-app-service/app/pratique/getListByMemberId", p)
+
 //获取我家的设备
-const iotDeviceList = p=>http.post("/community-app-service/app/iotdevice/list",p)
+const iotDeviceList = p => http.post("/community-app-service/app/iotdevice/list", p)
 
-export const api={
+export const api = {
 	//文件上传
 	uploadFile,
 	//生成二维码
@@ -133,18 +150,18 @@ export const api={
 	deleteUserById,
 	//通过房间id获取房屋成员
 	getFamilyByRoomIds,
-	
+
 	getOpenid,
-	
+
 	//会员获取验证码
 	getSmsCode,
 	//会员注册接口
-	memberRegister,	
-	
+	memberRegister,
+
 	adList,
 	//公告列表
 	getNoticeList,
-	
+
 	//获取字典接口
 	getDictByCode,
 	//获取住户车辆列表
@@ -160,25 +177,27 @@ export const api={
 	//住户审核
 	updateCheckState,
 	//根据MemberId获取访客授权记录
-	 getGuestAuthorizeList,
-	 //新增授权记录
-	  addGuestAuthorize,
-	  //撤销授权记录
-	  guestAuthorizeCancel,
-	  //新增物业报修工单
-	  addEstateRepair,
-	  //物业报修列表
-	  estateRepairList,
-	  //物业报修详情
-	  estateRepairDetail,
-	  //新增防疫登记
-	  addPratique,
-	  //防疫登记列表
-	  pratiqueList,
-	  //获取门禁设备列表
-	  getAuthDeviceByMemberId,
-	  //远程开门
-	  openDoor,
-	  //获取我家的设备
-	  iotDeviceList
-}
+	getGuestAuthorizeList,
+	//新增授权记录
+	addGuestAuthorize,
+	//撤销授权记录
+	guestAuthorizeCancel,
+	//新增物业报修工单
+	addEstateRepair,
+	//物业报修列表
+	estateRepairList,
+	//物业报修详情
+	estateRepairDetail,
+	//新增防疫登记
+	addPratique,
+	//防疫登记列表
+	pratiqueList,
+	//获取门禁设备列表
+	getAuthDeviceByMemberId,
+	//远程开门
+	openDoor,
+	//获取我家的设备
+	iotDeviceList,
+	getHouseUser,
+	feedback
+}

+ 68 - 57
assets/http/service.js

@@ -6,76 +6,87 @@ import Request from 'luch-request'
 // let	baseURL = 'http://8.135.18.59:1889/api/'
 // let tokenUrl=baseURL+"/blade-auth/oauth/token?tenant_id=000000&username=admin&password=1ac87efdaf318558f05d1840a94bdd94&grant_type=password&scope=all&type=account"
 let baseURL = "http://192.168.1.69"
-let tokenUrl=baseURL+"/blade-auth/oauth/token?tenant_id=000000&password=21232f297a57a5a743894a0e4a801fc3&username=admin&grant_type=password"
+let tokenUrl = baseURL +
+	"/blade-auth/oauth/token?tenant_id=000000&password=21232f297a57a5a743894a0e4a801fc3&username=admin&grant_type=password"
 
 //获取token
 const getTokenStorage = () => {
-  let token = ''
-  try {
-    token = uni.getStorageSync('token')
-  } catch (e) {
-  }
-  return token
+	let token = ''
+	try {
+		token = uni.getStorageSync('token')
+	} catch (e) {}
+	return token
 }
 const http = new Request()
-http.setConfig((config) => { /* 设置全局配置 */
-  config.baseURL = baseURL  /* 根域名不同 */
-  config.header = {
-    ...config.header,
-  }
-  return config
+http.setConfig((config) => {
+	/* 设置全局配置 */
+	config.baseURL = baseURL /* 根域名不同 */
+	config.header = {
+		...config.header,
+	}
+	return config
 })
-http.interceptors.request.use((config) => { /* 请求之前拦截器。可以使用async await 做异步操作 */
-  config.header = {
-    ...config.header,
-    "Blade-Auth": getTokenStorage()
-  }
-  return config
+http.interceptors.request.use((config) => {
+	/* 请求之前拦截器。可以使用async await 做异步操作 */
+	config.header = {
+		...config.header,
+		"Blade-Auth": getTokenStorage()
+	}
+	return config
 }, (config) => {
-  return Promise.reject(config)
+	return Promise.reject(config)
 })
 // 是否正在刷新的标记
 let isRefreshing = false
 // 重试队列,每一项将是一个待执行的函数形式
 let requests = []
-http.interceptors.response.use(async (response) => { /* 请求之后拦截器。可以使用async await 做异步操作  */
-	  console.log(response);
-	  //200 返回数据成功 0
-      return response
-  },async (err) => { // 请求错误做点什么
-	  //toekn过期处理
-		if (err.data.code == 401) {
-			let {config} = err
-			if (!isRefreshing) {
-				isRefreshing = true
-				let token = uni.getStorageSync('token')
-				let [,res] = await uni.request({
-					url: tokenUrl,
-					method: 'POST',
-					header:{
-						Authorization:"Basic c2FiZXI6c2FiZXJfc2VjcmV0"
-					
-					},
-				})
-				//否则保存新的token
-				token=res.data.token_type+" "+res.data.access_token
-				uni.setStorageSync('token', token)
-				requests.forEach(cb => cb())
-				// 重试完了清空这个队列
-				requests = []
-				isRefreshing = false
-				return http.request(config)
-			} else {
-				return new Promise((resolve) => {
-					// 将resolve放进队列,用一个函数形式来保存,等token刷新后直接执行
-					requests.push(() => {
-						resolve(http.request(config))
-					})
+http.interceptors.response.use(async (response) => {
+	/* 请求之后拦截器。可以使用async await 做异步操作  */
+	let data = response.data
+	if (data.code && data.code != 200) {
+		uni.showToast({
+			icon: 'none',
+			title: data.msg
+		})
+		return Promise.reject(response)
+	}
+	return response
+}, async (err) => { // 请求错误做点什么
+	//toekn过期处理
+	if (err.data.code == 401) {
+		let {
+			config
+		} = err
+		if (!isRefreshing) {
+			isRefreshing = true
+			let token = uni.getStorageSync('token')
+			let [, res] = await uni.request({
+				url: tokenUrl,
+				method: 'POST',
+				header: {
+					Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0"
+
+				},
+			})
+			//否则保存新的token
+			token = res.data.token_type + " " + res.data.access_token
+			uni.setStorageSync('token', token)
+			requests.forEach(cb => cb())
+			// 重试完了清空这个队列
+			requests = []
+			isRefreshing = false
+			return http.request(config)
+		} else {
+			return new Promise((resolve) => {
+				// 将resolve放进队列,用一个函数形式来保存,等token刷新后直接执行
+				requests.push(() => {
+					resolve(http.request(config))
 				})
-			}
+			})
 		}
-      return Promise.reject(err)
-  })
+	}
+	return Promise.reject(err)
+})
 export {
-  http
+	http
 }

+ 2 - 2
comps/device-card.vue

@@ -32,7 +32,7 @@
 						</view>
 						<view class="contents" style="display: flex; align-items: center;">
 							<view style="display: flex; align-items: center;">
-								<image src="http://139.9.103.171:1888/miniofile/xlyq/dianchi.png" style="width: 36rpx;height: 36rpx;"></image>
+								<image src="https://szsq.nxzhsq.cn/community/miniofile/xlyq/dianchi.png" style="width: 36rpx;height: 36rpx;"></image>
 								<text class="text-bold padding-left-sm">电池电量:</text>
 							</view>
 							<view class="striped active cu-progress round " style="width: 60%;">
@@ -49,7 +49,7 @@
 						<!-- 电表没有这个字段 -->
 						<!-- <view class="content" style="display: flex; align-items: center;" v-if="item.deviceType!=100030">
 							<view style="display: flex; align-items: center;">
-								<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/wifi.png"></u-icon>
+								<u-icon  size="36" name="https://szsq.nxzhsq.cn/community/miniofile/xlyq/wifi.png"></u-icon>
 								<text class="text-bold padding-left-sm">信号强度:</text>
 							</view>
 							<view class="striped active cu-progress round " style="width: 60%;">

+ 1 - 1
comps/dt_service.vue

@@ -3,7 +3,7 @@
     class="customer-service"
     open-type="contact"
     session-from="weapp">
-    <image class="customer-service-icon" src="http://139.9.103.171:1888/img/image/service.png" mode="widthFix"></image>
+    <image class="customer-service-icon" src="https://szsq.nxzhsq.cn/community/miniofile/image/service.png" mode="widthFix"></image>
   </button>
 </template>
 <script>

+ 1 - 1
comps/hot-consult/hot-consult.vue

@@ -3,7 +3,7 @@
 		<view class="container">
 			<view class="flex justify-between" >
 				<block>
-					<view class="cu-avatar text-font"  style="background-image:url(http://139.9.103.171:8888/group1/M00/00/01/iwlnq1-_2IiAFB-HAAAQn95tidI930.png);"></view>
+					<view class="cu-avatar text-font"  style="background-image:url(https://wuye.nxzhsq.cn/oss/group1/M00/00/01/iwlnq1-_2IiAFB-HAAAQn95tidI930.png);"></view>
 					<view class="margin-top-xs" style="width: 680rpx">
 						<swiper :circular="true" class="swiper" autoplay="true" vertical="true" interval="5000" next-margin="46rpx">
 							<swiper-item v-for="(item, index) in swiperTexts" :key="index" @click="detailTap(item)">

+ 73 - 0
comps/login.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="">
+		<u-modal v-model="loginshow" width="566" :show-cancel-button="true"
+			:title-style="{color: 'black',fontWeight:800,fontSize:'32rpx'}">
+			<view class="slot-content">
+				<view class="content">
+					<view class="userinfo-avatar">
+						<open-data type="userAvatarUrl"></open-data>
+					</view>
+					<open-data type="userNickName"></open-data>
+					<text class="subtitle">申请获取您的公开信息(昵称,头像)</text>
+				</view>
+			</view>
+			<button @click="getUserInfo" slot="confirm-button" class="cu-btn u-reset-button"
+				style="width: 100%;height: 100%;border-radius: 0;background-color: #FFFFFF;">确认</button>
+		</u-modal>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+				loginshow: false
+			};
+		},
+		methods: {
+			getUserInfo() {
+				this.$u.vuex('vuex_isAuth', true)
+				this.$emit('signIn')
+			},
+			show(){
+				this.loginshow=true
+			},
+			hide(){
+				this.loginshow=false
+			}
+			
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.slot-content {
+		padding: 30rpx 0rpx;
+	}
+
+	.content {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		padding-top: 30rpx;
+		padding-bottom: 100rpx;
+
+		.userinfo-avatar {
+			overflow: hidden;
+			display: block;
+			width: 140rpx;
+			height: 140rpx;
+			margin: 20rpx 0rpx 40rpx;
+			border-radius: 50%;
+			border: 2px solid #fff;
+		}
+
+		.subtitle {
+			color: #7e7e7e;
+			font-size: 26upx;
+			margin-top: 30rpx;
+		}
+	}
+</style>

+ 1 - 1
comps/mescroll-body/components/mescroll-empty.vue

@@ -7,7 +7,7 @@ import MescrollEmpty from '@/components/mescroll-uni/components/mescroll-empty.v
 -->
 <template>
 	<view class="mescroll-empty" :class="{ 'empty-fixed': option.fixed }" :style="{ 'z-index': option.zIndex, top: option.top }">
-		<view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view>
+		<view> <image v-if="icon" class="empty-icon" style="width:180rpx;height:160rpx" :src="icon" mode="" /> </view>
 		<view v-if="tip" class="empty-tip">{{ tip }}</view>
 		<view v-if="option.btnText" class="empty-btn" @click="emptyClick">{{ option.btnText }}</view>
 	</view>

+ 57 - 21
main.js

@@ -17,9 +17,15 @@ import Mpi from './utils/mpi'
 
 
 //封装api
-import { api } from 'assets/http/api.js' 
+import {
+	api
+} from 'assets/http/api.js'
 Vue.prototype.$http = api
 
+import wxApi from "./utils/wx_api.js"
+// 微信函数封装
+Vue.prototype.$wxApi = wxApi
+
 let vuexStore = require("@/store/$u.mixin.js");
 Vue.mixin(vuexStore);
 
@@ -35,38 +41,44 @@ import MescrollBody from "@/comps/mescroll-body/mescroll-body.vue"
 Vue.component('mescroll-body', MescrollBody)
 
 //小程序参数
-Vue.prototype.$wxData={
-	APPID:'wxaeb044e4a6b97df4',
-	SECRET:'0c575e3f4ae59ea630bbb90abcc4852c',
-	GRANTTYPE:'client_credential'
+Vue.prototype.$wxData = {
+	APPID: 'wxaeb044e4a6b97df4',
+	SECRET: '0c575e3f4ae59ea630bbb90abcc4852c',
+	GRANTTYPE: 'client_credential'
 }
 
 //解决ios系统时间显示错误问题
-Vue.prototype.$commonDate=value=>{
+Vue.prototype.$commonDate = value => {
 	return new Date(value.replace(/\-/g, '/'))
 }
 //封装小程序审核时的标题设置
-Vue.prototype.$setNavigationBarTitle=(auditTitle,title)=>{
-	let appletType= uni.getStorageSync('appletType')
-	if (appletType==0) {
+Vue.prototype.$setNavigationBarTitle = (auditTitle, title) => {
+	let appletType = uni.getStorageSync('appletType')
+	if (appletType == 0) {
 		uni.setNavigationBarTitle({
-			title:auditTitle
+			title: auditTitle
 		})
-	}else{
+	} else {
 		uni.setNavigationBarTitle({
-			title:title
+			title: title
 		})
 	}
 	return appletType
 }
 
-//封装判空函数
-Vue.prototype.$isEmpty=function(value){
+Vue.prototype.$navigateTo = (url) => {
+	uni.navigateTo({
+		url
+	})
+}
+
+//判空函数
+Vue.prototype.$isEmpty = function(value) {
 	switch (typeof value) {
 		case 'undefined':
 			return true;
 		case 'string':
-			if(value=='undefined') return true
+			if (value == 'undefined') return true
 			if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
 			break;
 		case 'boolean':
@@ -84,6 +96,30 @@ Vue.prototype.$isEmpty=function(value){
 	}
 	return false;
 }
+Vue.prototype.$isNotEmpty = function(value) {
+	switch (typeof value) {
+		case 'undefined':
+			return false;
+		case 'string':
+			if (value == 'undefined') return false
+			if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return false;
+			break;
+		case 'boolean':
+			if (!value) return false;
+			break;
+		case 'number':
+			if (0 === value || isNaN(value)) return false;
+			break;
+		case 'object':
+			if (null === value || value.length === 0) return false;
+			for (var i in value) {
+				return true;
+			}
+			return false;
+	}
+	return true;
+}
+
 
 // 商城 begin
 // 设置服务器
@@ -94,7 +130,7 @@ Cache.preKey = Server.version
 Vue.mixin(Mixin)
 // 全局筛选器
 Object.keys(Filter).forEach(key => {
-  Vue.filter(key, Filter[key])
+	Vue.filter(key, Filter[key])
 })
 // 全局属性 接口
 Vue.prototype.$api = Object.assign({}, ApiEx)
@@ -115,10 +151,10 @@ Vue.prototype.$util = Util
 Vue.prototype.$mpi = Mpi
 
 // 全局属性 对话框函数
-Dialog.config = Object.assign(Dialog.config,{
-  cancelColor:'#333',
-  confirmColor:'#333',
-  title:'温馨提示'
+Dialog.config = Object.assign(Dialog.config, {
+	cancelColor: '#333',
+	confirmColor: '#333',
+	title: '温馨提示'
 })
 Vue.prototype.$dialog = Dialog
 // 商城 end
@@ -126,6 +162,6 @@ Vue.prototype.$dialog = Dialog
 
 const app = new Vue({
 	store,
-    ...App
+	...App
 })
 app.$mount()

+ 9 - 12
pages.json

@@ -609,6 +609,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/bingRoom/bingRoom",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "绑定房间",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	 "subPackages": [{
 	 	"root": "pagesM/",
@@ -990,24 +999,12 @@
 			  "selectedIconPath":"static/tarbar/home.png",
 			  "iconPath":"static/tarbar/home0.png"
 			},
-			{
-			  "pagePath": "pages/community/community",
-			  "text": "社区",
-			  "selectedIconPath":"static/tarbar/shequ.png",
-			  "iconPath":"static/tarbar/shequ0.png"
-			},
 			{
 			  "pagePath": "pages/device/device",
 			  "text": "我家",
 			  "selectedIconPath":"static/tarbar/zhijia.png",
 			  "iconPath":"static/tarbar/zhijia0.png"
 			},
-			{
-			  "pagePath": "pages/life/life",
-			  "text": "周边",
-			  "selectedIconPath":"static/tarbar/shop.png",
-			  "iconPath":"static/tarbar/shop0.png"  
-			},
 			{
 			  "pagePath": "pages/wode/wode",
 			  "text": "我的",

+ 1 - 1
pages/authorize_record/authorize_record.vue

@@ -388,7 +388,7 @@ page{
 	color: #AAAAAA;
 }
 .default image {
-  height: 280rpx;
+  height: 160rpx;
   display: inline-block;
 }
 .empty-wrap{

+ 22 - 0
pages/bingRoom/bingRoom.vue

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

+ 1 - 1
pages/bluetooth/bluetooth.vue

@@ -252,7 +252,7 @@ export default {
 	color: #AAAAAA;
 }
 .default image {
-  height: 280rpx;
+  height: 160rpx;
   display: inline-block;
 }
 .empty-wrap{

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

@@ -19,7 +19,7 @@
 		<u-cell-item  @click="jump(item)"  v-for="(item, index) in buiding_list" :key="index"  :title="item.name" :arrow="false"></u-cell-item>
 	</u-cell-group>
 	
-	<u-empty marginTop="200" icon-size="260"  v-if="$isEmpty(buiding_list)&&!loading" text="暂无楼栋信息" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+	<u-empty marginTop="200" icon-size="160"  v-if="$isEmpty(buiding_list)&&!loading" text="暂无楼栋信息" src="/static/common/empty.png"></u-empty>
 
 	<u-back-top :scroll-top="scrollTop"></u-back-top>
 </view>

+ 1 - 1
pages/choosePlot/choosePlot.vue

@@ -27,7 +27,7 @@
 		<u-cell-item  @click="jump(item)"  v-for="(item, index) in residential_list" :key="index"  :title="item.name" :arrow="false"></u-cell-item>
 	</u-cell-group>
 	<u-divider bg-color="#ffffff" v-if="residential_list.length>=10" height="80">没有更多了</u-divider>
-	<u-empty marginTop="200" icon-size="260"  v-if="$isEmpty(residential_list)&&!loading" text="暂无小区信息" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+	<u-empty marginTop="200" icon-size="160"  v-if="$isEmpty(residential_list)&&!loading" text="暂无小区信息" src="/static/common/empty.png"></u-empty>
 	<u-back-top :scroll-top="scrollTop"></u-back-top>
 </view>
 </template>

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

@@ -19,7 +19,7 @@
 		<u-cell-item  @click="jump(item)"  v-for="(item, index) in room_list" :key="index"  :title="item.name" :arrow="false"></u-cell-item>
 	</u-cell-group>
 	
-	<u-empty marginTop="200" icon-size="260"  v-if="$isEmpty(room_list)" text="暂无房间信息" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+	<u-empty marginTop="200" icon-size="160"  v-if="$isEmpty(room_list)" text="暂无房间信息" src="/static/common/empty.png"></u-empty>
 	
 	<u-back-top :scroll-top="scrollTop"></u-back-top>
 </view>

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

@@ -18,7 +18,7 @@
 	<u-cell-group v-if="unit_list.length>0">
 		<u-cell-item  @click="jump(item)"  v-for="(item, index) in unit_list" :key="index"  :title="item.name" :arrow="false"></u-cell-item>
 	</u-cell-group>
-	<u-empty marginTop="200" icon-size="260"  v-if="$isEmpty(unit_list)" text="暂无单元信息" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+	<u-empty marginTop="200" icon-size="160"  v-if="$isEmpty(unit_list)" text="暂无单元信息" src="/static/common/empty.png"></u-empty>
 
 </view>
 </template>

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

@@ -110,7 +110,7 @@
 							</view>
 							<view class="category" style="padding-bottom: 140rpx;">
 								<view v-for="(item, index) in iconArray" :key="index" class="category_item">
-								  <view class="category_item_wrap" @tap="top" :data-index="item.index">
+								  <view class="category_item_wrap"  :data-index="item.index">
 									<view class="icon_wrap">
 									  <image :src="item.iconUrl" class="index_icon"></image>
 									</view>
@@ -159,7 +159,7 @@ export default {
 			show: false,
 			
 			//背景图
-			bgsrc:'http://139.9.103.171:1888/img/image/camera1.png',
+			bgsrc:'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
 			bgWidth:350,
 			bgHeight:320,
 			//显示图
@@ -244,27 +244,27 @@ export default {
 			//身份证
 			id_card: null,
 			iconArray: [{
-			  "iconUrl": "http://139.9.103.171:1888/img/image/zd.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
 			  "iconText": '不要遮挡',
 			  "index": 1
 			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/mj.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
 			  "iconText": '不戴墨镜',
 			  "index": 2
 			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/zl.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
 			  "iconText": '不能仰头俯拍',
 			  "index": 3
 			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/cz.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
 			  "iconText": '光线充足',
 			  "index": 4
 			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/bg.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
 			  "iconText": '浅色背景',
 			  "index": 5
 			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/sh.png",
+			  "iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
 			  "iconText": '物业审核生效',
 			  "index": 6
 			}],

+ 14 - 14
pages/community/community.vue

@@ -402,7 +402,7 @@
 						idCard:'640302195608152578',
 						device:'阅海万家D区西北门',
 						plotName:'阅海万家D区',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607607748(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607607748(1).jpg',
 						time:'2020-12-05 09:31:22'
 					}
 					,
@@ -414,7 +414,7 @@
 						idCard:'640302195804232481',
 						device:'阅海万家D区西北门',
 						plotName:'阅海万家D区',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607608168(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607608168(1).jpg',
 						time:'2020-11-20 15:31:22'
 					}
 					,
@@ -426,7 +426,7 @@
 						idCard:'640302195608152578',
 						device:'阅海万家D区北门',
 						plotName:'阅海万家D区',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607607676(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607607676(1).jpg',
 						time:'2020-12-10 15:31:22'
 					}
 					,
@@ -438,7 +438,7 @@
 						idCard:'640302195804232481',
 						device:'阅海万家D区西北门',
 						plotName:'阅海万家D区',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607608107.jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607608107.jpg',
 						time:'2020-11-20 12:32:52'
 					}
 				]
@@ -448,70 +448,70 @@
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607602946(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607602946(1).jpg',
 						time:'2020-12-10 12:38:26'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607602903(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607602903(1).jpg',
 						time:'2020-12-10 19:42:52'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607602845(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607602845(1).jpg',
 						time:'2020-12-05 11:32:16'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/cb034601a1594a248da5bef3d29fcebd.jpeg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/cb034601a1594a248da5bef3d29fcebd.jpeg',
 						time:'2020-12-05 14:46:32'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1607602745(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1607602745(1).jpg',
 						time:'2020-12-04 12:38:26'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/31ff5310f499d55764b24bf6c7c8083e.jpeg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/31ff5310f499d55764b24bf6c7c8083e.jpeg',
 						time:'2020-12-04 18:22:52'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1566433075317.jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1566433075317.jpg',
 						time:'2020-12-01 11:26:32'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/del/1566433083707.jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/del/1566433083707.jpg',
 						time:'2020-12-01 16:42:52'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/1606682778(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/1606682778(1).jpg',
 						time:'2020-11-24 09:38:26'
 					},
 					{
 						number:'宁A096L0',
 						device:'粤海玩家D区西门',
 						parking:'阅海万家D区西门停车场',
-						image:'http://139.9.103.171:1888/miniofile/app/1606682866(1).jpg',
+						image:'https://szsq.nxzhsq.cn/community/miniofile/app/1606682866(1).jpg',
 						time:'2020-11-24 16:42:52'
 					}
 					

+ 1 - 1
pages/develop/develop.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-empty icon-size="300"  marginTop="300"   text="暂未开发" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+		<u-empty icon-size="160"  marginTop="300"   text="暂未开发" src="/static/common/empty.png"></u-empty>
 	</view>
 </template>
 

+ 4 - 4
pages/device/records.vue

@@ -5,10 +5,10 @@
 			<view style="display: flex; justify-content: space-between;">
 				<view style="display: flex;">
 					<view style="display: flex;" class="justify-center align-center">
-						<image v-if="fireType==0" style="width: 80rpx;height: 80rpx;" src="http://139.9.103.171:1888/miniofile/app/yangan.png"></image>
-						<image v-if="fireType==1" style="width: 80rpx;height: 80rpx;" src="http://139.9.103.171:1888/miniofile/app/ranqi.png"></image>
-						<image v-if="fireType==2" style="width: 80rpx;height: 80rpx;" src="http://139.9.103.171:1888/miniofile/app/xiaofang.png"></image>
-						<image v-if="fireType==3" style="width: 80rpx;height: 80rpx;" src="http://139.9.103.171:1888/miniofile/app/dianbiao.png"></image>
+						<image v-if="fireType==0" style="width: 80rpx;height: 80rpx;" src="https://szsq.nxzhsq.cn/community/miniofile/app/yangan.png"></image>
+						<image v-if="fireType==1" style="width: 80rpx;height: 80rpx;" src="https://szsq.nxzhsq.cn/community/miniofile/app/ranqi.png"></image>
+						<image v-if="fireType==2" style="width: 80rpx;height: 80rpx;" src="https://szsq.nxzhsq.cn/community/miniofile/app/xiaofang.png"></image>
+						<image v-if="fireType==3" style="width: 80rpx;height: 80rpx;" src="https://szsq.nxzhsq.cn/community/miniofile/app/dianbiao.png"></image>
 					</view>
 					<view class="padding-left-40">
 						<view >

+ 1 - 1
pages/empty/empty.vue

@@ -51,7 +51,7 @@
 	color: #AAAAAA;
 }
 .default image {
-  height: 280rpx;
+  height: 160rpx;
   display: inline-block;
 }
 </style>

+ 1 - 1
pages/empty/goauth.vue

@@ -38,7 +38,7 @@
 }
 
 .default image {
-  height: 280rpx;
+  height: 160rpx;
   display: inline-block;
 }
 .empty-wrap{

+ 1 - 1
pages/guide/guide.vue

@@ -17,7 +17,7 @@
 				},
 				guideShow:true,
 				guideHeight:0,
-				img:'http://139.9.103.171:1888/miniofile/app/guide.png',
+				img:'https://szsq.nxzhsq.cn/community/miniofile/app/guide.png',
 				countdown:3,
 				timeout:null,
 				timer:null,

File diff suppressed because it is too large
+ 607 - 580
pages/index/index.vue


+ 1 - 1
pages/my-camera/my-camera.vue

@@ -3,7 +3,7 @@
 		<view class="center">
 			<image class="content" v-if="src!=null" :src="src" ></image>
 			<camera class="content" v-else :device-position="position" flash="auto" @error="error" >
-				<cover-image :class="type==1?'coverImg-type1':'coverImg-type0'"  :src="type==1?'../../static/camera/card.png':'http://139.9.103.171:1888/miniofile/xlyq/face2.png'"></cover-image>
+				<cover-image :class="type==1?'coverImg-type1':'coverImg-type0'"  :src="type==1?'../../static/camera/card.png':'https://szsq.nxzhsq.cn/community/miniofile/xlyq/face2.png'"></cover-image>
 			</camera>
 		</view>
 		<view class="bottom">

+ 3 - 3
pages/myCar/add.vue

@@ -34,7 +34,7 @@
 						   :width="width"
 						   :height="height"
 						  :currentImage="model.carImg"
-						  bgsrc="http://139.9.103.171:1888/miniofile/app/upload.png"
+						  bgsrc="https://szsq.nxzhsq.cn/community/miniofile/app/upload.png"
 						  >
 						</upload-img>
 						<view class="text-center  padding-top-20 base-color" >
@@ -58,7 +58,7 @@
 						   :width="width"
 						   :height="height"
 						  :currentImage="model.vehicleDrivingLicense1"
-						  bgsrc="http://139.9.103.171:1888/miniofile/app/zm.png"
+						  bgsrc="https://szsq.nxzhsq.cn/community/miniofile/app/zm.png"
 						  >
 						</upload-img>
 						<view class="text-center  padding-top-20 base-color" >
@@ -82,7 +82,7 @@
 						   :width="width"
 						   :height="height"
 						  :currentImage="model.vehicleDrivingLicense2"
-						  bgsrc="http://139.9.103.171:1888/miniofile/app/fm.png"
+						  bgsrc="https://szsq.nxzhsq.cn/community/miniofile/app/fm.png"
 						  >
 						</upload-img>
 						<view class="text-center  padding-top-20 base-color" >

+ 615 - 614
pages/myFamily/add/add.vue

@@ -1,643 +1,644 @@
 <template>
 	<view class="" style="background-color: #FFFFFF;min-height: 100vh;">
 		<view class="form" style="padding-top: 20rpx;">
-				<u-form :border="true" ref="uForm" >
-					<u-form-item :required="true"  label="姓名:" prop="name" label-width="150">
-						<u-input :border="true"  placeholder="姓名,必填" v-model="name" type="text"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="手机号:" prop="tel" label-width="150">
-						<u-input :border="true" maxlength="11"  placeholder="请输入11位手机号码" v-model="tel" type="number"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="房间号:" prop="roomLabel" label-width="150">
-						<u-input :border="true"  type="select" :select-open="roomShow" v-model="roomLabel" placeholder="请选择房间号" @click="roomShow = true"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="住户类型:" prop="type" label-width="150">
-						<u-input :border="true"  type="select" :select-open="typeShow" v-model="typeLabel" placeholder="请选择住户类型" @click="typeShow = true"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="国籍:" prop="nationality" label-width="150">
-						<u-input :border="true" type="select" :select-open="nationalityShow" v-model="nationalityLabel"  @click="nationalityShow = true"></u-input>
-					</u-form-item>
-					<u-form-item   label="证件类型:" prop="nationalityName" label-width="150">
-						<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
-					</u-form-item>
-					<u-form-item :required="type==0?true:false"  label="证件号码" prop="id_card" label-width="150">
-						<u-input :border="true" placeholder="住户类型是业主时,必填" :trim="true"  maxlength="18" v-model="id_card" type="text"></u-input>
-					</u-form-item>
-					<u-form-item :required="true" label="性别" prop="sex" label-width="150">
-						<u-radio-group v-model="sex" >
-							<u-radio shape="circle"  name="1">男</u-radio>
-							<u-radio shape="circle"  name="2">女</u-radio>
-						</u-radio-group>
-					</u-form-item>
-				</u-form>
+			<u-form :border="true" ref="uForm">
+				<u-form-item :required="true" label="姓名:" prop="name" label-width="150">
+					<u-input :border="true" placeholder="姓名,必填" v-model="name" type="text"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="手机号:" prop="tel" label-width="150">
+					<u-input :border="true" maxlength="11" placeholder="请输入11位手机号码" v-model="tel" type="number">
+					</u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="房间号:" prop="roomLabel" label-width="150">
+					<u-input :border="true" type="select" :select-open="roomShow" v-model="roomLabel"
+						placeholder="请选择房间号" @click="roomShow = true"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="住户类型:" prop="type" label-width="150">
+					<u-input :border="true" type="select" :select-open="typeShow" v-model="typeLabel"
+						placeholder="请选择住户类型" @click="typeShow = true"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="国籍:" prop="nationality" label-width="150">
+					<u-input :border="true" type="select" :select-open="nationalityShow" v-model="nationalityLabel"
+						@click="nationalityShow = true"></u-input>
+				</u-form-item>
+				<u-form-item label="证件类型:" prop="nationalityName" label-width="150">
+					<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
+				</u-form-item>
+				<u-form-item :required="type==0?true:false" label="证件号码" prop="id_card" label-width="150">
+					<u-input :border="true" placeholder="住户类型是业主时,必填" :trim="true" maxlength="18" v-model="id_card"
+						type="text"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="性别" prop="sex" label-width="150">
+					<u-radio-group v-model="sex">
+						<u-radio shape="circle" name="1">男</u-radio>
+						<u-radio shape="circle" name="2">女</u-radio>
+					</u-radio-group>
+				</u-form-item>
+			</u-form>
 		</view>
 		<view v-if="nationality==3" style="background-color: #FFFFFF;">
-		  <view class="form_group mb0" style="padding-left: 60rpx;">
-		    <view>
-		      <text class="sex">护照图片:</text>
-		      <text class="tips">(基本身份信息页)</text>
-		    </view>
-		  </view>
-		  
-		  <view @click="operaType=1;chooseImage()" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-		    <upload-img
-		  	  :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
-		  	  :height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight"
-		  	  :currentImage="show_passport_img_uri"
-		  	  :bgsrc="bgsrc"
-		  	  >
-		    </upload-img>
-		    <view class="" style="color: #59a5f0;">
-		  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-		  	 <text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
-		  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-		    </view>
-		  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">护照图片:</text>
+					<text class="tips">(基本身份信息页)</text>
+				</view>
+			</view>
+
+			<view @click="operaType=1;chooseImage()"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight" :currentImage="show_passport_img_uri"
+					:bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
 		</view>
 		<view v-if="nationality==3" style="background-color: #FFFFFF;">
-		  <view class="form_group mb0" style="padding-left: 60rpx;">
-		    <view>
-		      <text class="sex">入境证明:</text>
-		      <text class="tips">(入镜盖章页)</text>
-		    </view>
-		  </view>
-		  <view @click="operaType=2;chooseImage()" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-		    <upload-img
-		  	  :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
-		  	  :height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight"
-		  	  :currentImage="show_entry_img_uri"
-		  	  :bgsrc="bgsrc"
-		  	  >
-		    </upload-img>
-		    <view class="" style="color: #59a5f0;">
-		  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-		  	 <text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
-		  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-		    </view>
-		  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">入境证明:</text>
+					<text class="tips">(入镜盖章页)</text>
+				</view>
+			</view>
+			<view @click="operaType=2;chooseImage()"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight" :currentImage="show_entry_img_uri"
+					:bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
 		</view>
-		
+
 		<view style="background-color: #FFFFFF;" v-if="vuex_appletType==1">
-					<view class="form_group mb0" style="padding-left: 60rpx;">
-						 <view>
-							<text class="sex">人脸:</text>
-							<text class="tips">(人脸用于开门,请上传正脸图片)</text>
-						  </view>
-					</view>
-					<view @click="show=true;operaType=3" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-					  <upload-img
-						  :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
-						  :height="$isEmpty(show_image_uri)?bgHeight:imgHeight"
-						  :currentImage="show_image_uri"
-						  :bgsrc="bgsrc"
-						  >
-					  </upload-img>
-					  <view class="" style="color: #59a5f0;">
-						 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-						 <text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
-						 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-					  </view>
-					</view>
-					<view class="category" style="padding-bottom: 140rpx;">
-						<view v-for="(item, index) in iconArray" :key="index" class="category_item">
-						  <view class="category_item_wrap" >
-							<view class="icon_wrap">
-							  <image :src="item.iconUrl" class="index_icon"></image>
-							</view>
-							<view class="category_item_text">
-							  <text>{{item.iconText}}</text>
-							</view>
-						  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">人脸:</text>
+					<text class="tips">(人脸用于开门,请上传正脸图片)</text>
+				</view>
+			</view>
+			<view @click="show=true;operaType=3"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_image_uri)?bgHeight:imgHeight" :currentImage="show_image_uri" :bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
+			<view class="category" style="padding-bottom: 140rpx;">
+				<view v-for="(item, index) in iconArray" :key="index" class="category_item">
+					<view class="category_item_wrap">
+						<view class="icon_wrap">
+							<image :src="item.iconUrl" class="index_icon"></image>
+						</view>
+						<view class="category_item_text">
+							<text>{{item.iconText}}</text>
+						</view>
 					</view>
+				</view>
+			</view>
+		</view>
+		<u-action-sheet @click="photoChecked" z-index="999999" :list="list" v-model="show"></u-action-sheet>
+		<u-select z-index="999999" mode="single-column" value-name="id" label-name="name" :list="own_room_list"
+			v-model="roomShow" @confirm="roomConfirm"></u-select>
+		<u-select z-index="999999" mode="single-column" :list="typeArry" v-model="typeShow" @confirm="typeConfirm">
+		</u-select>
+		<u-select z-index="999999" mode="single-column" :list="nationalityArry" v-model="nationalityShow"
+			@confirm="nationalityConfirm"></u-select>
+		<view @click="addApplyUser" class=" footer-fixed">
+			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+				提交添加
 			</view>
 		</view>
-	  <u-action-sheet @click="photoChecked"  z-index="999999" :list="list" v-model="show"></u-action-sheet>
-	  <u-select z-index="999999" mode="single-column" value-name="id" label-name="name" :list="own_room_list" v-model="roomShow" @confirm="roomConfirm"></u-select>
-	  <u-select z-index="999999" mode="single-column" :list="typeArry" v-model="typeShow" @confirm="typeConfirm"></u-select>
-	  <u-select z-index="999999" mode="single-column" :list="nationalityArry" v-model="nationalityShow" @confirm="nationalityConfirm"></u-select>
-	  <view  @click="addApplyUser"  class=" footer-fixed" >
-	  	<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-	  		提交添加
-	  	</view>
-	  </view>
-	  
+
+	</view>
 	</view>
- </view>
 </template>
 
 <script>
-import uploadImg from '@/comps/uploadimg/uploadImg.vue'
-//获取app实例
-var app = getApp();
-export default {
-	components:{
-		uploadImg
-	},
-	data() {
-		return {
-			appletType:0,
-			
-			//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
-			operaType:3,
-			//人脸上传模态框,上传照片或拍照
-			list: [{
-				text: '相册上传',
-			}, {
-				text: '拍照上传'
-			}],
-			show: false,
-			
-			//背景图
-			bgsrc:'http://139.9.103.171:1888/img/image/camera1.png',
-			bgWidth:350,
-			bgHeight:320,
-			//显示图
-			imgWidth:540,
-			imgHeight:400,
-			
-			roomLabel:'',
-			roomShow:false,
-			room_id: 0,
-			own_room_list: null,
-			//房间列表下标
-			own_room_list_index: 0,
-			
-			//姓名
-			name: null,
-			//电话号码
-			tel: null,
-			
-			//住户类型
-			typeLabel:'业主',
-			typeShow: false,
-			type: 0,
-			typeArry: [
-				{
-					value: '0',
-					label: '业主'
-				},
-				{
-					value: '1',
-					label: '家属'
-				},
-				{
-					value: '2',
-					label: '租户'
-				}
-			],
-			//国籍
-			nationalityLabel:'中国大陆',
-			nationalityShow: false,
-			nationality: 0,
-			nationalityName:'身份证',
-			nationalityArry: [
-				{
-					value: '0',
-					label: '中国大陆'
-				},
-				{
-					value: '1',
-					label: '中国香港/澳门'
-				},
-				{
-					value: '2',
-					label: '中国台湾'
-				},
-				{
-					value: '3',
-					label: '海外'
-				}
-			],
-			//身份证
-			id_card: null,
-			sex: "1",
-			
-			passport_img_uri: null,
-			//护照照片
-			show_passport_img_uri: null,
-			//护照照片回显
-			entry_img_uri: null,
-			//入境证明
-			show_entry_img_uri: null,
-			//入境证明回显
-			image_uri: null,
-			//人脸图片地址
-			show_image_uri: null,
-			//人脸回显
-			face_code: null,
-			//图片的md5
-			iconArray: [{
-			  "iconUrl": "http://139.9.103.171:1888/img/image/zd.png",
-			  "iconText": '不要遮挡',
-			  "index": 1
-			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/mj.png",
-			  "iconText": '不戴墨镜',
-			  "index": 2
-			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/zl.png",
-			  "iconText": '不能仰头俯拍',
-			  "index": 3
-			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/cz.png",
-			  "iconText": '光线充足',
-			  "index": 4
-			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/bg.png",
-			  "iconText": '浅色背景',
-			  "index": 5
-			}, {
-			  "iconUrl": "http://139.9.103.171:1888/img/image/sh.png",
-			  "iconText": '物业审核生效',
-			  "index": 6
-			}]
-		};
-	},
-	onLoad: function (options) {
-		var that = this;
-		that.setData({
-		  own_room_list: app.globalData.own_room_list
-		});
-	},
-	onShow() {
-		this.appletType=uni.getStorageSync("appletType")
-		
-		//获取当前页面的对象
-		let currPage=this.$util.getPageCtx()
-		if(!this.$isEmpty(currPage.data.image)){
-			this.uploadImage(currPage.data.image)
-		} 
-	},
-	methods: {
-		//点击模态框选项触发
-		photoChecked(index){
-			if (index==0) {
-				//图片上传
-				this.chooseImage()
-			} else if(index==1){
-				//拍照上传
-				uni.navigateTo({
-					url:"../../my-camera/my-camera"
-				})
-			}
+	import uploadImg from '@/comps/uploadimg/uploadImg.vue'
+	//获取app实例
+	var app = getApp();
+	export default {
+		components: {
+			uploadImg
 		},
-		//点击上传图片事件
-		chooseImage: function () {
-		  var that = this;
-		  uni.chooseImage({
-		    count: 1,
-		    //最多可以选择的图片张数,默认9
-		    sourceType: ['album', 'camera'],
-		    sizeType: ['compressed'],
-		    //可选择原图或压缩后的图片
-		    success: res => {
-		      let tempFilePaths = res.tempFilePaths;
-			  that.uploadImage(tempFilePaths[0])
-		    }
-		  });
+		data() {
+			return {
+				appletType: 0,
+
+				//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
+				operaType: 3,
+				//人脸上传模态框,上传照片或拍照
+				list: [{
+					text: '相册上传',
+				}, {
+					text: '拍照上传'
+				}],
+				show: false,
+
+				//背景图
+				bgsrc: 'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
+				bgWidth: 350,
+				bgHeight: 320,
+				//显示图
+				imgWidth: 540,
+				imgHeight: 400,
+
+				roomLabel: '',
+				roomShow: false,
+				room_id: 0,
+				own_room_list: null,
+				//房间列表下标
+				own_room_list_index: 0,
+
+				//姓名
+				name: null,
+				//电话号码
+				tel: null,
+
+				//住户类型
+				typeLabel: '业主',
+				typeShow: false,
+				type: 0,
+				typeArry: [{
+						value: '0',
+						label: '业主'
+					},
+					{
+						value: '1',
+						label: '家属'
+					},
+					{
+						value: '2',
+						label: '租户'
+					}
+				],
+				//国籍
+				nationalityLabel: '中国大陆',
+				nationalityShow: false,
+				nationality: 0,
+				nationalityName: '身份证',
+				nationalityArry: [{
+						value: '0',
+						label: '中国大陆'
+					},
+					{
+						value: '1',
+						label: '中国香港/澳门'
+					},
+					{
+						value: '2',
+						label: '中国台湾'
+					},
+					{
+						value: '3',
+						label: '海外'
+					}
+				],
+				//身份证
+				id_card: null,
+				sex: "1",
+
+				passport_img_uri: null,
+				//护照照片
+				show_passport_img_uri: null,
+				//护照照片回显
+				entry_img_uri: null,
+				//入境证明
+				show_entry_img_uri: null,
+				//入境证明回显
+				image_uri: null,
+				//人脸图片地址
+				show_image_uri: null,
+				//人脸回显
+				face_code: null,
+				//图片的md5
+				iconArray: [{
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
+					"iconText": '不要遮挡',
+					"index": 1
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
+					"iconText": '不戴墨镜',
+					"index": 2
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
+					"iconText": '不能仰头俯拍',
+					"index": 3
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
+					"iconText": '光线充足',
+					"index": 4
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
+					"iconText": '浅色背景',
+					"index": 5
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
+					"iconText": '物业审核生效',
+					"index": 6
+				}]
+			};
 		},
-		/**上传图片
-		 * @param {Object} imgUrl 图片url
-		 */
-		uploadImage(imgUrl){
-			console.log("operatype: ",this.operaType);
-			console.log("imgUrl",imgUrl)
+		onLoad: function(options) {
 			var that = this;
-			//是否需要md5加密上传人脸照
-			let is_need_md5 = false;
-			if (this.operaType == 3) {
-			  is_need_md5 = true;
-			}
-			
-			that.$http.uploadFile(imgUrl).then(res =>{
-				if (that.operaType == 1) {
-				  that.setData({
-				    passport_img_uri: res.data.data.link,
-				    show_passport_img_uri: imgUrl
-				  });
-				} else if (that.operaType == 2) {
-				  that.setData({
-				    entry_img_uri: res.data.data.link,
-				    show_entry_img_uri: imgUrl
-				  });
-				} else if (that.operaType == 3) {
-					console.log("link:"+JSON.stringify(res))
-				  that.setData({
-				    image_uri: res.data.data.link,
-				    show_image_uri: imgUrl,
-				    face_code: res.data.data.imgMd5
-				  });
-				}
-			})
-			
+			that.setData({
+				own_room_list: app.globalData.own_room_list
+			});
 		},
-		roomConfirm(e) {
-			this.room_id = 0;
-			e.map((val, index) => {
-				this.room_id=val.value
-				this.roomLabel=val.label
-			})
-		},
-		typeConfirm(e) {
-			this.type = 0;
-			e.map((val, index) => {
-				this.type=val.value
-				this.typeLabel=val.label
-			})
+		onShow() {
+			this.appletType = uni.getStorageSync("appletType")
+
+			//获取当前页面的对象
+			let currPage = this.$util.getPageCtx()
+			if (!this.$isEmpty(currPage.data.image)) {
+				this.uploadImage(currPage.data.image)
+			}
 		},
-		nationalityConfirm(e) {
-			this.nationality = 0;
-			e.map((val, index) => {
-				this.nationality=val.value
-				this.nationalityLabel=val.label
-				
-				if (this.nationality == 0) {
-				  this.nationalityName = '身份证';
-				} else if (this.nationality == 1) {
-				  this.nationalityName = '港澳居民往来内地通行证';
-				} else if (this.nationality == 2) {
-				  this.nationalityName = '台湾居民往来大陆通行证';
-				} else if (this.nationality == 3) {
-				  this.nationalityName = '护照';
+		methods: {
+			//点击模态框选项触发
+			photoChecked(index) {
+				if (index == 0) {
+					//图片上传
+					this.chooseImage()
+				} else if (index == 1) {
+					//拍照上传
+					uni.navigateTo({
+						url: "../../my-camera/my-camera"
+					})
 				}
-			})
-		},
-		//添加家人
-		addApplyUser: function () {
-		  let that = this;
-		  let params = {};
-		  let name = that.name;
-		
-		  if (!name) {
-		    app.globalData.autoFailHint("请填写名字");
-		    return;
-		  }
-		
-		  params['name'] = name;
-		  let tel = that.tel;
-		
-		  
-		  if (tel && !this.$u.test.mobile(tel)) {
-		    app.globalData.autoFailHint("请填写正确手机号");
-		    return;
-		  }
-		  params['tel'] = tel;
-		  let room_id = that.own_room_list[that.own_room_list_index].id;
-		
-		  if (!room_id) {
-		    app.globalData.autoFailHint("请选择房间号");
-		    return;
-		  }
-		  params['room_id'] = room_id;
-		  let type = that.type;
-		  params['type'] = type;
-		  let id_card = that.id_card;
-		  params['id_card'] = id_card; //业主身份时,身份证必填
-		
-		  if (type == 0 && !id_card) {
-		    app.globalData.autoFailHint("住户类型是业主时,证件号码必填");
-		    return;
-		  } //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
-		 if (!this.$isEmpty(id_card)) {
-		   //如果身份证号不为空,就校验身份证号
-			if (!this.$u.test.idCard(id_card)) {
-				app.globalData.autoFailHint("请输入正确的身份证号");
-				return;
+			},
+			//点击上传图片事件
+			chooseImage: function() {
+				var that = this;
+				uni.chooseImage({
+					count: 1,
+					//最多可以选择的图片张数,默认9
+					sourceType: ['album', 'camera'],
+					sizeType: ['compressed'],
+					//可选择原图或压缩后的图片
+					success: res => {
+						let tempFilePaths = res.tempFilePaths;
+						that.uploadImage(tempFilePaths[0])
+					}
+				});
+			},
+			/**上传图片
+			 * @param {Object} imgUrl 图片url
+			 */
+			uploadImage(imgUrl) {
+				console.log("operatype: ", this.operaType);
+				console.log("imgUrl", imgUrl)
+				var that = this;
+				//是否需要md5加密上传人脸照
+				let is_need_md5 = false;
+				if (this.operaType == 3) {
+					is_need_md5 = true;
+				}
+
+				that.$http.uploadFile(imgUrl).then(res => {
+					if (that.operaType == 1) {
+						that.setData({
+							passport_img_uri: res.data.data.link,
+							show_passport_img_uri: imgUrl
+						});
+					} else if (that.operaType == 2) {
+						that.setData({
+							entry_img_uri: res.data.data.link,
+							show_entry_img_uri: imgUrl
+						});
+					} else if (that.operaType == 3) {
+						console.log("link:" + JSON.stringify(res))
+						that.setData({
+							image_uri: res.data.data.link,
+							show_image_uri: imgUrl,
+							face_code: res.data.data.imgMd5
+						});
+					}
+				})
+
+			},
+			roomConfirm(e) {
+				this.room_id = 0;
+				e.map((val, index) => {
+					this.room_id = val.value
+					this.roomLabel = val.label
+				})
+			},
+			typeConfirm(e) {
+				this.type = 0;
+				e.map((val, index) => {
+					this.type = val.value
+					this.typeLabel = val.label
+				})
+			},
+			nationalityConfirm(e) {
+				this.nationality = 0;
+				e.map((val, index) => {
+					this.nationality = val.value
+					this.nationalityLabel = val.label
+
+					if (this.nationality == 0) {
+						this.nationalityName = '身份证';
+					} else if (this.nationality == 1) {
+						this.nationalityName = '港澳居民往来内地通行证';
+					} else if (this.nationality == 2) {
+						this.nationalityName = '台湾居民往来大陆通行证';
+					} else if (this.nationality == 3) {
+						this.nationalityName = '护照';
+					}
+				})
+			},
+			//添加家人
+			addApplyUser: function() {
+				let that = this;
+				let params = {};
+				let name = that.name;
+
+				if (!name) {
+					app.globalData.autoFailHint("请填写名字");
+					return;
+				}
+
+				params['name'] = name;
+				let tel = that.tel;
+
+
+				if (tel && !this.$u.test.mobile(tel)) {
+					app.globalData.autoFailHint("请填写正确手机号");
+					return;
+				}
+				params['tel'] = tel;
+				let room_id = that.own_room_list[that.own_room_list_index].id;
+
+				if (!room_id) {
+					app.globalData.autoFailHint("请选择房间号");
+					return;
+				}
+				params['room_id'] = room_id;
+				let type = that.type;
+				params['type'] = type;
+				let id_card = that.id_card;
+				params['id_card'] = id_card; //业主身份时,身份证必填
+
+				if (type == 0 && !id_card) {
+					app.globalData.autoFailHint("住户类型是业主时,证件号码必填");
+					return;
+				} //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
+				if (!this.$isEmpty(id_card)) {
+					//如果身份证号不为空,就校验身份证号
+					if (!this.$u.test.idCard(id_card)) {
+						app.globalData.autoFailHint("请输入正确的身份证号");
+						return;
+					}
+				}
+
+
+				let nationality = that.nationality;
+				params['nationality'] = nationality;
+				let passport_img_uri = that.passport_img_uri;
+				let entry_img_uri = that.entry_img_uri;
+
+				if (nationality == 3) {
+					params['passport_img_uri'] = that.passport_img_uri;
+					params['entry_img_uri'] = that.entry_img_uri;
+
+					if (type == 0) {
+						if (!passport_img_uri) {
+							app.globalData.autoFailHint("请上传护照图片");
+							return;
+						}
+
+						if (!entry_img_uri) {
+							app.globalData.autoFailHint("请上传入境证明");
+							return;
+						}
+					}
+				}
+
+				let image_uri = that.image_uri;
+				if (this.$isEmpty(image_uri) && this.vuex_appletType == 1) {
+					//微信小程序通过审核时,开放人脸模块
+					this.$u.toast('请上传人脸')
+					return
+				}
+				params['image_uri'] = that.image_uri;
+				let face_code = that.face_code;
+				params['face_code'] = that.face_code; //性别
+				params['oper_user_type'] = 0 //操作类型,业主操作
+				params['sex'] = that.sex;
+				params['member_id'] = app.globalData.member.id;
+				params['operatorName'] = app.globalData.member.name;
+				params['create_type'] = '0'; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
+
+				params['record_type'] = '1'; ///申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
+				// let operation = 'member/authentication';
+				console.log(params)
+				that.$http.authentication(params).then(res => {
+					//添加成功
+					if (res.data.result_code == 1) {
+						app.globalData.oneFailHint(res.data.result_msg, function() {
+							uni.navigateBack({
+								delta: 1 // 返回上一级页面。
+
+							});
+						});
+					} else {
+						app.globalData.oneFailHint(res.data.result_msg);
+					}
+
+				});
 			}
-		 }
-		
-		
-		  let nationality = that.nationality;
-		  params['nationality'] = nationality;
-		  let passport_img_uri = that.passport_img_uri;
-		  let entry_img_uri = that.entry_img_uri;
-		
-		  if (nationality == 3) {
-		    params['passport_img_uri'] = that.passport_img_uri;
-		    params['entry_img_uri'] = that.entry_img_uri;
-		
-		    if (type == 0) {
-		      if (!passport_img_uri) {
-		        app.globalData.autoFailHint("请上传护照图片");
-		        return;
-		      }
-		
-		      if (!entry_img_uri) {
-		        app.globalData.autoFailHint("请上传入境证明");
-		        return;
-		      }
-		    }
-		  }
-		
-		  let image_uri = that.image_uri;
-		  if (this.$isEmpty(image_uri)&&this.vuex_appletType==1) {
-		  	//微信小程序通过审核时,开放人脸模块
-			this.$u.toast('请上传人脸')
-			return
-		  }
-		  params['image_uri'] = that.image_uri;
-		  let face_code = that.face_code;
-		  params['face_code'] = that.face_code; //性别
-		  params['oper_user_type']=0 //操作类型,业主操作
-		  params['sex'] = that.sex;
-		  params['member_id'] = app.globalData.member.id; 
-		  params['operatorName'] = app.globalData.member.name;
-		  params['create_type'] = '0';//申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
-		
-		  params['record_type'] = '1'; ///申请的记录类型 0--认证类型 1--新增类型 2--编辑类型
-		  // let operation = 'member/authentication';
-		  console.log(params)
-		  that.$http.authentication(params).then(res=>{
-			  //添加成功
-			  if (res.data.result_code == 1) {
-			    app.globalData.oneFailHint(res.data.result_msg, function () {
-			      uni.navigateBack({
-			        delta: 1 // 返回上一级页面。
-			  		
-			      });
-			    });
-			  } else {
-			    app.globalData.oneFailHint(res.data.result_msg);
-			  }
-		    
-		  });
+
 		}
-		
-	}
-};
+	};
 </script>
 
 <style scoped lang="scss">
-.form {
-	padding:0 60rpx;
-	background-color: #FFFFFF;
-}
-
-.local_city{
-    padding: 30rpx 0;
-    position:relative;
-    background: #fff;
-}
-.local_city .changeCity{
-    padding: 20rpx;
-    position: absolute;
-    right: 0rpx;
-    top: 0;
-}
-.local_city .icon{
-    padding: 20rpx;
-    position: absolute;
-    left: -0;
-    top: 50%;
-    transform: translate(0,-50%);
-    font-size: 40rpx;
-}
-.local_city .local_city_info{
-    padding-left: 40rpx;
-    display:inline-block;
-}
-
-.form_group .upload {
-  padding: 0 28rpx;
-  font-size: 26rpx;
-  background: $base-btn-color;
-  color: #fff;
-  border: none;
-}
-
-.upload_tips {
-  font-size: 24rpx;
-}
-
-.upload_bg {
-  position: relative;
-  text-align: center;
-}
-
-.mb0 {
-  padding-top: 40rpx;
-  font-size: 28rpx;
-  margin-bottom: 0;
-}
-
-.form_group .tips {
-  margin-left: 50rpx;
-}
-
-.upload_bg .upload_bgImg {
-  width: 540rpx;
-  height: 400rpx;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 70%;
-  left: 50%;
-  transform: translate(-50%, 0);
-  color: $base-btn-color;
-}
-
-upload_bg {
-  position: relative;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 40%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 55%;
-  width: 100%;
-  color: $base-btn-color;
-}
-
-.img_content {
-  margin-top: 20rpx;
-  position: relative;
-  text-align: center;
-}
-
-.img_content .upload_bgImg {
-  width: 560rpx;
-  height: 420rpx;
-  max-height: 1;
-  display: inline-block;
-  border-radius: 20rpx;
-}
-
-.reUpload {
-  height: 60rpx;
-  line-height: 60rpx;
-  text-align: right;
-  color: #333;
-  padding-right: 100rpx;
-  font-size: 26rpx;
-}
-
-.img_content .img_icon {
-  width: 40rpx;
-  height: 40rpx;
-  vertical-align: text-top;
-  margin-right: 6rpx;
-  border-radius: 20rpx;
-}
-
-.category {
-  padding:20px 20rpx 0;
-  overflow: auto;
-  background-color: #FFF;
-text-align:center;
-
-}
-.category_item {
-  width: 33.3%;
-  float: left;
-  margin-bottom: 40rpx;
-}
-
-.icon_wrap {
-  width: 120rpx;
-  margin: 0 auto;
-  margin-bottom: 5px;
-}
-.index_icon {
-  width: 60rpx;
-  height: 60rpx;
-}
-.category_item_text {
-  text-align: center;
-  font-size: 24rpx;
-  color: #999;
-}
+	.form {
+		padding: 0 60rpx;
+		background-color: #FFFFFF;
+	}
 
-</style>
+	.local_city {
+		padding: 30rpx 0;
+		position: relative;
+		background: #fff;
+	}
+
+	.local_city .changeCity {
+		padding: 20rpx;
+		position: absolute;
+		right: 0rpx;
+		top: 0;
+	}
 
-			
-		
+	.local_city .icon {
+		padding: 20rpx;
+		position: absolute;
+		left: -0;
+		top: 50%;
+		transform: translate(0, -50%);
+		font-size: 40rpx;
+	}
+
+	.local_city .local_city_info {
+		padding-left: 40rpx;
+		display: inline-block;
+	}
+
+	.form_group .upload {
+		padding: 0 28rpx;
+		font-size: 26rpx;
+		background: $base-btn-color;
+		color: #fff;
+		border: none;
+	}
+
+	.upload_tips {
+		font-size: 24rpx;
+	}
+
+	.upload_bg {
+		position: relative;
+		text-align: center;
+	}
+
+	.mb0 {
+		padding-top: 40rpx;
+		font-size: 28rpx;
+		margin-bottom: 0;
+	}
+
+	.form_group .tips {
+		margin-left: 50rpx;
+	}
+
+	.upload_bg .upload_bgImg {
+		width: 540rpx;
+		height: 400rpx;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 70%;
+		left: 50%;
+		transform: translate(-50%, 0);
+		color: $base-btn-color;
+	}
+
+	upload_bg {
+		position: relative;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 40%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 55%;
+		width: 100%;
+		color: $base-btn-color;
+	}
+
+	.img_content {
+		margin-top: 20rpx;
+		position: relative;
+		text-align: center;
+	}
+
+	.img_content .upload_bgImg {
+		width: 560rpx;
+		height: 420rpx;
+		max-height: 1;
+		display: inline-block;
+		border-radius: 20rpx;
+	}
+
+	.reUpload {
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: right;
+		color: #333;
+		padding-right: 100rpx;
+		font-size: 26rpx;
+	}
+
+	.img_content .img_icon {
+		width: 40rpx;
+		height: 40rpx;
+		vertical-align: text-top;
+		margin-right: 6rpx;
+		border-radius: 20rpx;
+	}
+
+	.category {
+		padding: 20px 20rpx 0;
+		overflow: auto;
+		background-color: #FFF;
+		text-align: center;
+
+	}
+
+	.category_item {
+		width: 33.3%;
+		float: left;
+		margin-bottom: 40rpx;
+	}
+
+	.icon_wrap {
+		width: 120rpx;
+		margin: 0 auto;
+		margin-bottom: 5px;
+	}
+
+	.index_icon {
+		width: 60rpx;
+		height: 60rpx;
+	}
+
+	.category_item_text {
+		text-align: center;
+		font-size: 24rpx;
+		color: #999;
+	}
+</style>

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

@@ -153,7 +153,7 @@
 		  </view>
 		  <view class="category">
 		    <view v-for="(item, index) in iconArray" :key="index" class="category_item">
-		      <view class="category_item_wrap" @tap="top" :data-index="item.index">
+		      <view class="category_item_wrap"  :data-index="item.index">
 		        <view class="icon_wrap">
 		          <image :src="item.iconUrl" class="index_icon"></image>
 		        </view>

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

@@ -47,7 +47,7 @@
 								</view>
 							</view>
 							<view >
-								<image @click="previewImg(dataDetail.imageUri)" style="width: 200rpx;height: 200rpx;" :src="dataDetail.imageUri?dataDetail.imageUri:'http://139.9.103.171:1888/miniofile/xlyq/face1.png'" ></image>
+								<image @click="previewImg(dataDetail.imageUri)" style="width: 200rpx;height: 200rpx;" :src="dataDetail.imageUri?dataDetail.imageUri:'https://szsq.nxzhsq.cn/community/miniofile/xlyq/face1.png'" ></image>
 								<view class="text-center text-blue padding-top-10">
 									(人脸图片)
 								</view>

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

@@ -16,7 +16,7 @@
 				<view class="left">
 					<view  data-aid="undefined">
 					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
-					  <image v-else="" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png"></image>
+					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
 						<view >

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

@@ -16,7 +16,7 @@
 				<view class="left">
 					<view  data-aid="undefined">
 					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
-					  <image v-else="" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png"></image>
+					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
 						<view >

+ 0 - 1
pages/myFamily/comps/item.vue

@@ -80,7 +80,6 @@
 				let that = this;
 				app.globalData.twoFailHint("确认删除该住户吗?", function() {
 					let params = {
-						member_id: app.globalData.member.id,
 						user_id: id
 					};
 					// let operation = 'user/deleteUserById';

+ 2 - 2
pages/myFamily/comps/user-card.vue

@@ -11,12 +11,12 @@
 				<view class="left">
 					<view  data-aid="undefined">
 					  <image v-if="!$isEmpty(item.imageUri)" mode="aspectFill" :src="item.imageUri"></image>
-					  <image v-else="" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png"></image>
+					  <image v-else="" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png"></image>
 					</view>
 					<view class="content" data-aid="undefined">
 						<view >姓名:{{item.name}}</view>
 						<view >手机:{{item.phone}}</view>
-						<view >创建时间:{{item.createTime}}</view>
+						<view >创建时间:{{item.createTime || '未知'}}</view>
 						<view v-if="item.type==0">身份:业主</view>
 						<view v-if="item.type==1">身份:家属</view>
 						<view v-if="item.type==2">身份:租户</view>

+ 645 - 645
pages/myFamily/editFamily/editFamily.vue

@@ -1,678 +1,678 @@
 <template>
 	<view class="" style="background-color: #FFFFFF;min-height: 100vh;">
 		<view class="form" style="padding-top: 20rpx;">
-				<u-form :border="true" ref="uForm" >
-					<u-form-item :required="true"  label="姓名:" prop="name" label-width="150">
-						<u-input :disabled="true" :border="true"  placeholder="姓名,必填" v-model="name" type="text"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="手机号:" prop="tel" label-width="150">
-						<u-input :border="true" maxlength="11"  placeholder="请输入11位手机号码" v-model="tel" type="number"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="房间号:" prop="room_name" label-width="150">
-						<u-input :disabled="true" :border="true"  placeholder="请输入房间号" v-model="room_name" type="text"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"   label="住户类型:" prop="type" label-width="150">
-						<u-input :border="true"  type="select" :select-open="typeShow" v-model="typeLabel" placeholder="请选择住户类型" @click="typeShow = true"></u-input>
-					</u-form-item>
-					<u-form-item :required="true"  label="国籍:" prop="nationality" label-width="150">
-						<u-input :border="true" type="select" :select-open="nationalityShow" v-model="nationalityLabel"  @click="nationalityShow = true"></u-input>
-					</u-form-item>
-					<u-form-item   label="证件类型:" prop="nationalityName" label-width="150">
-						<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
-					</u-form-item>
-					<u-form-item :required="type==0?true:false"  label="证件号码" prop="id_card" label-width="150">
-						<u-input :border="true" placeholder="住户类型是业主时,必填" :trim="true"  maxlength="18" v-model="id_card" type="text"></u-input>
-					</u-form-item>
-					<u-form-item :required="true" label="性别" prop="sex" label-width="150">
-						<u-radio-group v-model="sex" >
-							<u-radio shape="circle"  name="1">男</u-radio>
-							<u-radio shape="circle"  name="2">女</u-radio>
-						</u-radio-group>
-					</u-form-item>
-				</u-form>
+			<u-form :border="true" ref="uForm">
+				<u-form-item :required="true" label="姓名:" prop="name" label-width="150">
+					<u-input :disabled="true" :border="true" placeholder="姓名,必填" v-model="name" type="text"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="手机号:" prop="tel" label-width="150">
+					<u-input :border="true" maxlength="11" placeholder="请输入11位手机号码" v-model="tel" type="number">
+					</u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="房间号:" prop="room_name" label-width="150">
+					<u-input :disabled="true" :border="true" placeholder="请输入房间号" v-model="room_name" type="text">
+					</u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="住户类型:" prop="type" label-width="150">
+					<u-input :border="true" type="select" :select-open="typeShow" v-model="typeLabel"
+						placeholder="请选择住户类型" @click="typeShow = true"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="国籍:" prop="nationality" label-width="150">
+					<u-input :border="true" type="select" :select-open="nationalityShow" v-model="nationalityLabel"
+						@click="nationalityShow = true"></u-input>
+				</u-form-item>
+				<u-form-item label="证件类型:" prop="nationalityName" label-width="150">
+					<u-input :disabled="true" :border="true" type="text" v-model="nationalityName"></u-input>
+				</u-form-item>
+				<u-form-item :required="type==0?true:false" label="证件号码" prop="id_card" label-width="150">
+					<u-input :border="true" placeholder="住户类型是业主时,必填" :trim="true" maxlength="18" v-model="id_card"
+						type="text"></u-input>
+				</u-form-item>
+				<u-form-item :required="true" label="性别" prop="sex" label-width="150">
+					<u-radio-group v-model="sex">
+						<u-radio shape="circle" name="1">男</u-radio>
+						<u-radio shape="circle" name="2">女</u-radio>
+					</u-radio-group>
+				</u-form-item>
+			</u-form>
 		</view>
 		<view v-if="nationality==3" style="background-color: #FFFFFF;">
-		  <view class="form_group mb0" style="padding-left: 60rpx;">
-		    <view>
-		      <text class="sex">护照图片:</text>
-		      <text class="tips">(基本身份信息页)</text>
-		    </view>
-		  </view>
-		  <view @click="operaType=1;chooseImage()" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-		    <upload-img
-		  	  :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
-		  	  :height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight"
-		  	  :currentImage="show_passport_img_uri"
-		  	  :bgsrc="bgsrc"
-		  	  >
-		    </upload-img>
-		    <view class="" style="color: #59a5f0;">
-		  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-		  	 <text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
-		  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-		    </view>
-		  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">护照图片:</text>
+					<text class="tips">(基本身份信息页)</text>
+				</view>
+			</view>
+			<view @click="operaType=1;chooseImage()"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_passport_img_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_passport_img_uri)?bgHeight:imgHeight" :currentImage="show_passport_img_uri"
+					:bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_passport_img_uri)">点击上传护照</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
 		</view>
 		<view v-if="nationality==3" style="background-color: #FFFFFF;">
-		  <view class="form_group mb0" style="padding-left: 60rpx;">
-		    <view>
-		      <text class="sex">入境证明:</text>
-		      <text class="tips">(入镜盖章页)</text>
-		    </view>
-		  </view>
-		  <view @click="operaType=2;chooseImage()" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-		    <upload-img
-		  	  :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
-		  	  :height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight"
-		  	  :currentImage="show_entry_img_uri"
-		  	  :bgsrc="bgsrc"
-		  	  >
-		    </upload-img>
-		    <view class="" style="color: #59a5f0;">
-		  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-		  	 <text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
-		  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-		    </view>
-		  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">入境证明:</text>
+					<text class="tips">(入镜盖章页)</text>
+				</view>
+			</view>
+			<view @click="operaType=2;chooseImage()"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_entry_img_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_entry_img_uri)?bgHeight:imgHeight" :currentImage="show_entry_img_uri"
+					:bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_entry_img_uri)">点击上传入境证明</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
 		</view>
-		
+
 		<view style="background-color: #FFFFFF;" v-if="vuex_appletType==1">
-					<view class="form_group mb0" style="padding-left: 60rpx;">
-						 <view>
-							<text class="sex">人脸:</text>
-							<text class="tips">(人脸用于开门,请上传正脸图片)</text>
-						  </view>
-					</view>
-					
-					<view @click="show=true;operaType=3" style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-					  <upload-img
-						  :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
-						  :height="$isEmpty(show_image_uri)?bgHeight:imgHeight"
-						  :currentImage="show_image_uri"
-						  :bgsrc="bgsrc"
-						  >
-					  </upload-img>
-					  <view class="" style="color: #59a5f0;">
-						 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-						 <text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
-						 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-					  </view>
-					</view>
-					<view class="category" style="padding-bottom: 140rpx;">
-						<view v-for="(item, index) in iconArray" :key="index" class="category_item">
-						  <view class="category_item_wrap" @tap="top" :data-index="item.index">
-							<view class="icon_wrap">
-							  <image :src="item.iconUrl" class="index_icon"></image>
-							</view>
-							<view class="category_item_text">
-							  <text>{{item.iconText}}</text>
-							</view>
-						  </view>
+			<view class="form_group mb0" style="padding-left: 60rpx;">
+				<view>
+					<text class="sex">人脸:</text>
+					<text class="tips">(人脸用于开门,请上传正脸图片)</text>
+				</view>
+			</view>
+
+			<view @click="show=true;operaType=3"
+				style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+				<upload-img :width="$isEmpty(show_image_uri)?bgWidth:imgWidth"
+					:height="$isEmpty(show_image_uri)?bgHeight:imgHeight" :currentImage="show_image_uri" :bgsrc="bgsrc">
+				</upload-img>
+				<view class="" style="color: #59a5f0;">
+					<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+					<text v-if="$isEmpty(show_image_uri)">点击上传人脸</text>
+					<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+				</view>
+			</view>
+			<view class="category" style="padding-bottom: 140rpx;">
+				<view v-for="(item, index) in iconArray" :key="index" class="category_item">
+					<view class="category_item_wrap"  :data-index="item.index">
+						<view class="icon_wrap">
+							<image :src="item.iconUrl" class="index_icon"></image>
+						</view>
+						<view class="category_item_text">
+							<text>{{item.iconText}}</text>
+						</view>
 					</view>
+				</view>
+			</view>
+		</view>
+		<u-action-sheet @click="photoChecked" z-index="999999" :list="list" v-model="show"></u-action-sheet>
+		<u-select z-index="999999" mode="single-column" :default-value="defaultType" :list="typeArry" v-model="typeShow"
+			@confirm="typeConfirm"></u-select>
+		<u-select z-index="999999" mode="single-column" :default-value="nationality" :list="nationalityArry"
+			v-model="nationalityShow" @confirm="nationalityConfirm"></u-select>
+		<view @click="editUser" class=" footer-fixed ">
+			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+				确认修改
 			</view>
 		</view>
-	  <u-action-sheet @click="photoChecked"  z-index="999999" :list="list" v-model="show"></u-action-sheet>
-	  <u-select z-index="999999" mode="single-column" :default-value="defaultType" :list="typeArry" v-model="typeShow" @confirm="typeConfirm"></u-select>
-	  <u-select z-index="999999" mode="single-column" :default-value="nationality" :list="nationalityArry" v-model="nationalityShow" @confirm="nationalityConfirm"></u-select>
-	  <view  @click="editUser" class=" footer-fixed " >
-	  	<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-	  		确认修改
-	  	</view>
-	  </view>
 	</view>
- </view>
+	</view>
 </template>
 
 <script>
-import uploadImg from '@/comps/uploadimg/uploadImg.vue'
-//获取app实例
-var app = getApp();
-export default {
-	components:{
-		uploadImg
-	},
-	data() {
-		return {
-			//操作类型,业主操作 0,其他
-			operUserType:'',
-			
-			appletType:0,
-			//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
-			operaType:3,
-			//人脸上传模态框,上传照片或拍照
-			list: [{
-				text: '相册上传',
-			}, {
-				text: '拍照上传'
-			}],
-			show: false,
-			
-			//背景图
-			bgsrc:'http://139.9.103.171:1888/img/image/camera1.png',
-			bgWidth:350,
-			bgHeight:320,
-			//显示图
-			imgWidth:540,
-			imgHeight:400,
-			
-			//修改的住户id
-			  user_id: null,
-			  //姓名
-			  name: null,
-			  //电话号码
-			  tel: null,
-			  //住户类型
-			  defaultType:[0],
-			  typeLabel:'业主',
-			  typeShow: false,
-			  type: 0,
-			  typeArry: [
-			  	{
-			  		value: '0',
-			  		label: '业主'
-			  	},
-			  	{
-			  		value: '1',
-			  		label: '家属'
-			  	},
-			  	{
-			  		value: '2',
-			  		label: '租户'
-			  	}
-			  ],
-			  //国籍
-			  defaultNationality:[0],
-			  nationalityLabel:'中国大陆',
-			  nationalityShow: false,
-			  nationality: 0,
-			  nationalityName:'身份证',
-			  nationalityArry: [
-			  	{
-			  		value: '0',
-			  		label: '中国大陆'
-			  	},
-			  	{
-			  		value: '1',
-			  		label: '中国香港/澳门'
-			  	},
-			  	{
-			  		value: '2',
-			  		label: '中国台湾'
-			  	},
-			  	{
-			  		value: '3',
-			  		label: '海外'
-			  	}
-			  ],
-			  //身份证
-			  id_card: null,
-			  sex: "1",
-			  
-			  //护照照片
-			  passport_img_uri: null,
-			  //护照照片回显
-			  show_passport_img_uri: null,
-			  //入境证明
-			  entry_img_uri: null,
-			  //入境证明回显
-			  show_entry_img_uri: null,
-			  //人脸图片地址
-			  image_uri: null,
-			  //人脸回显
-			  show_image_uri: null,
-			  //图片的md5
-			  face_code: null,
-
-			  //图片的md5
-			  iconArray: [{
-				"iconUrl": "http://139.9.103.171:1888/img/image/zd.png",
-				"iconText": '不要遮挡',
-				"index": 1
-			  }, {
-				"iconUrl": "http://139.9.103.171:1888/img/image/mj.png",
-				"iconText": '不戴墨镜',
-				"index": 2
-			  }, {
-				"iconUrl": "http://139.9.103.171:1888/img/image/zl.png",
-				"iconText": '不能仰头俯拍',
-				"index": 3
-			  }, {
-				"iconUrl": "http://139.9.103.171:1888/img/image/cz.png",
-				"iconText": '光线充足',
-				"index": 4
-			  }, {
-				"iconUrl": "http://139.9.103.171:1888/img/image/bg.png",
-				"iconText": '浅色背景',
-				"index": 5
-			  }, {
-				"iconUrl": "http://139.9.103.171:1888/img/image/sh.png",
-				"iconText": '物业审核生效',
-				"index": 6
-			  }],
-			  room_name: ""
-		};
-	},
-	onShow() {
-		
-		this.appletType= uni.getStorageSync("appletType")
-		console.log(this.appletType);
-		
-		//获取当前页面的对象
-		let currPage=this.$util.getPageCtx()
-		if(!this.$isEmpty(currPage.data.image)){
-			this.uploadImage(currPage.data.image)
-		} 
-	},
-	onLoad: function (options) {
-		let that=this
-		
-		this.operUserType=options.operUserType
-		
-		let user_id = options.user_id;
-		let name = options.name;
-		let tel = options.tel;
-		let room_name = options.room_name;
-		let type = options.type;
-		let nationality = options.nationality;
-		
-		if (!nationality) {
-		  nationality = 0;
-		}
-		
-		let nationalityName = '';
-		
-		if (nationality == 0) {
-		  nationalityName = '身份证';
-		} else if (nationality == 1) {
-		  nationalityName = '港澳居民往来内地通行证';
-		} else if (nationality == 2) {
-		  nationalityName = '台湾居民往来大陆通行证';
-		} else if (nationality == 3) {
-		  nationalityName = '护照';
-		}
-		
-		this.setData({
-		  nationality: nationality,
-		  nationalityName: nationalityName
-		});
-		let id_card = options.id_card;
-		let sex = options.sex;
-		let passport_img_uri = options.passport_img_uri ||null;
-		let entry_img_uri = options.entry_img_uri || null;
-		let image_uri = options.image_uri || null; //选中性别
-		this.setData({
-		  user_id: user_id,
-		  name: name,
-		  tel: tel,
-		  room_name: room_name,
-		  type: type,
-		  nationality: nationality,
-		  id_card: id_card,
-		  sex: sex,
-		  show_image_uri: image_uri,
-		  show_passport_img_uri: passport_img_uri,
-		  show_entry_img_uri: entry_img_uri,
-		 
-		}); 
-		this.defaultType=[]
-		this.defaultType.push(type)
-		this.typeLabel=that.typeArry[type].label,
-		this.defaultNationality=[]
-		this.defaultNationality.push(nationality)
-		this.nationalityLabel=that.nationalityArry[nationality].label
-		
-	},
-	methods: {
-		//点击模态框选项触发
-		photoChecked(index){
-			if (index==0) {
-				//图片上传
-				this.chooseImage()
-			} else if(index==1){
-				//拍照上传
-				uni.navigateTo({
-					url:"../../my-camera/my-camera"
-				})
-			}
-		},
-		typeConfirm(e) {
-			this.type = 0;
-			e.map((val, index) => {
-				this.type=val.value
-				this.typeLabel=val.label
-			})
+	import uploadImg from '@/comps/uploadimg/uploadImg.vue'
+	//获取app实例
+	var app = getApp();
+	export default {
+		components: {
+			uploadImg
 		},
-		nationalityConfirm(e) {
-			this.nationality = 0;
-			e.map((val, index) => {
-				this.nationality=val.value
-				this.nationalityLabel=val.label
-				
-				if (this.nationality == 0) {
-				  this.nationalityName = '身份证';
-				} else if (this.nationality == 1) {
-				  this.nationalityName = '港澳居民往来内地通行证';
-				} else if (this.nationality == 2) {
-				  this.nationalityName = '台湾居民往来大陆通行证';
-				} else if (this.nationality == 3) {
-				  this.nationalityName = '护照';
-				}
-			})
+		data() {
+			return {
+				//操作类型,业主操作 0,其他
+				operUserType: '',
+
+				appletType: 0,
+				//默认点击弹出拍照模态框的是人脸上传操作,1:护照,2:入境,3:人脸
+				operaType: 3,
+				//人脸上传模态框,上传照片或拍照
+				list: [{
+					text: '相册上传',
+				}, {
+					text: '拍照上传'
+				}],
+				show: false,
+
+				//背景图
+				bgsrc:'https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png',
+				bgWidth: 350,
+				bgHeight: 320,
+				//显示图
+				imgWidth: 540,
+				imgHeight: 400,
+
+				//修改的住户id
+				user_id: null,
+				//姓名
+				name: null,
+				//电话号码
+				tel: null,
+				//住户类型
+				defaultType: [0],
+				typeLabel: '业主',
+				typeShow: false,
+				type: 0,
+				typeArry: [{
+						value: '0',
+						label: '业主'
+					},
+			 	{
+						value: '1',
+						label: '家属'
+					},
+					{
+						value: '2',
+						label: '租户'
+					}
+				],
+			 //国籍
+				defaultNationality: [0],
+			 nationalityLabel: '中国大陆',
+				nationalityShow: false,
+				nationality: 0,
+			 nationalityName: '身份证',
+				nationalityArry: [{
+						value: '0',
+						label: '中国大陆'
+					},
+					{
+			 		value: '1',
+						label: '中国香港/澳门'
+					},
+					{
+						value: '2',
+						label: '中国台湾'
+					},
+					{
+						value: '3',
+						label: '海外'
+					}
+				],
+				//身份证
+				id_card: null,
+				sex: "1",
+
+				//护照照片
+				passport_img_uri: null,
+				//护照照片回显
+				show_passport_img_uri: null,
+				//入境证明
+				entry_img_uri: null,
+				//入境证明回显
+				show_entry_img_uri: null,
+				//人脸图片地址
+				image_uri: null,
+				//人脸回显
+				show_image_uri: null,
+				//图片的md5
+				face_code: null,
+
+				//图片的md5
+				iconArray: [{
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
+					"iconText": '不要遮挡',
+					"index": 1
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
+					"iconText": '不戴墨镜',
+					"index": 2
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
+					"iconText": '不能仰头俯拍',
+					"index": 3
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
+					"iconText": '光线充足',
+					"index": 4
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
+					"iconText": '浅色背景',
+					"index": 5
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
+					"iconText": '物业审核生效',
+					"index": 6
+				}],
+				room_name: ""
+			};
 		},
-		//点击上传图片事件
-		chooseImage: function () {
-		  var that = this;
-		  uni.chooseImage({
-		    count: 1,
-		    //最多可以选择的图片张数,默认9
-		    sourceType: ['album', 'camera'],
-		    sizeType: ['compressed'],
-		    //可选择原图或压缩后的图片
-		    success: res => {
-		      let tempFilePaths = res.tempFilePaths;
-			  that.uploadImage(tempFilePaths[0])
-		    }
-		  });
+		onShow() {
+
+			this.appletType = uni.getStorageSync("appletType")
+			console.log(this.appletType);
+
+			//获取当前页面的对象
+			let currPage = this.$util.getPageCtx()
+			if (!this.$isEmpty(currPage.data.image)) {
+				this.uploadImage(currPage.data.image)
+			}
 		},
-		/**上传图片
-		 * @param {Object} imgUrl 图片url
-		 */
-		uploadImage(imgUrl){
-			console.log("operatype: ",this.operaType);
-			console.log("imgUrl",imgUrl)
-			var that = this;
-			//是否需要md5加密上传人脸照
-			let is_need_md5 = false;
-			if (this.operaType == 3) {
-			  is_need_md5 = true;
+		onLoad: function(options) {
+			let that = this
+
+			this.operUserType = options.operUserType
+
+			let user_id = options.user_id;
+			let name = options.name;
+			let tel = options.tel;
+			let room_name = options.room_name;
+			let type = options.type;
+			let nationality = options.nationality;
+
+			if (!nationality) {
+				nationality = 0;
 			}
-			that.$http.uploadFile(imgUrl).then(res =>{
-				if (that.operaType == 1) {
-				  that.setData({
-				    passport_img_uri: res.data.data.link,
-				    show_passport_img_uri: imgUrl
-				  });
-				} else if (that.operaType == 2) {
-				  that.setData({
-				    entry_img_uri: res.data.data.link,
-				    show_entry_img_uri: imgUrl
-				  });
-				} else if (that.operaType == 3) {
-				  that.setData({
-				    image_uri: res.data.data.link,
-				    show_image_uri: imgUrl,
-				    face_code: res.data.data.imgMd5
+
+			let nationalityName = '';
+
+			if (nationality == 0) {
+				nationalityName = '身份证';
+			} else if (nationality == 1) {
+				nationalityName = '港澳居民往来内地通行证';
+			} else if (nationality == 2) {
+				nationalityName = '台湾居民往来大陆通行证';
+			} else if (nationality == 3) {
+				nationalityName = '护照';
+			}
+
+			this.setData({
+				nationality: nationality,
+				nationalityName: nationalityName
+			});
+			let id_card = options.id_card;
+			let sex = options.sex;
+			let passport_img_uri = options.passport_img_uri || null;
+			let entry_img_uri = options.entry_img_uri || null;
+			let image_uri = options.image_uri || null; //选中性别
+			this.setData({
+				user_id: user_id,
+				name: name,
+				tel: tel,
+				room_name: room_name,
+				type: type,
+				nationality: nationality,
+				id_card: id_card,
+				sex: sex,
+				show_image_uri: image_uri,
+				show_passport_img_uri: passport_img_uri,
+				show_entry_img_uri: entry_img_uri,
+
+			});
+			this.defaultType = []
+			this.defaultType.push(type)
+			this.typeLabel = that.typeArry[type].label,
+				this.defaultNationality = []
+			this.defaultNationality.push(nationality)
+			this.nationalityLabel = that.nationalityArry[nationality].label
+
+		},
+		methods: {
+			//点击模态框选项触发
+			photoChecked(index) {
+				if (index == 0) {
+					//图片上传
+					this.chooseImage()
+				} else if (index == 1) {
+					//拍照上传
+					uni.navigateTo({
+						url: "../../my-camera/my-camera"
+					})
+				}
+			},
+			typeConfirm(e) {
+				this.type = 0;
+				e.map((val, index) => {
+					this.type = val.value
+					this.typeLabel = val.label
+				})
+			},
+			nationalityConfirm(e) {
+				this.nationality = 0;
+				e.map((val, index) => {
+					this.nationality = val.value
+					this.nationalityLabel = val.label
+
+					if (this.nationality == 0) {
+						this.nationalityName = '身份证';
+					} else if (this.nationality == 1) {
+				 	this.nationalityName = '港澳居民往来内地通行证';
+					} else if (this.nationality == 2) {
+						this.nationalityName = '台湾居民往来大陆通行证';
+					} else if (this.nationality == 3) {
+						this.nationalityName = '护照';
+					}
+				})
+			},
+			//点击上传图片事件
+			chooseImage: function() {
+				var that = this;
+				uni.chooseImage({
+					count: 1,
+					//最多可以选择的图片张数,默认9
+					sourceType: ['album', 'camera'],
+					sizeType: ['compressed'],
+					//可选择原图或压缩后的图片
+					success: res => {
+						let tempFilePaths = res.tempFilePaths;
+						that.uploadImage(tempFilePaths[0])
+					}
+				});
+			},
+			/**上传图片
+			 * @param {Object} imgUrl 图片url
+			 */
+			uploadImage(imgUrl) {
+				console.log("operatype: ", this.operaType);
+				console.log("imgUrl", imgUrl)
+				var that = this;
+				//是否需要md5加密上传人脸照
+				let is_need_md5 = false;
+				if (this.operaType == 3) {
+					is_need_md5 = true;
+				}
+				that.$http.uploadFile(imgUrl).then(res => {
+					if (that.operaType == 1) {
+						that.setData({
+							passport_img_uri: res.data.data.link,
+							show_passport_img_uri: imgUrl
+				 	});
+					} else if (that.operaType == 2) {
+						that.setData({
+							entry_img_uri: res.data.data.link,
+							show_entry_img_uri: imgUrl
+						});
+					} else if (that.operaType == 3) {
+						that.setData({
+							image_uri: res.data.data.link,
+							show_image_uri: imgUrl,
+							face_code: res.data.data.imgMd5
 				  });
+					}
+				})
+
+			},
+			//添加家人
+			editUser: function() {
+				let that = this;
+				let params = {};
+				let user_id = that.user_id;
+				params['user_id'] = user_id;
+				let tel = that.tel;
+
+				if (!tel) {
+					app.globalData.autoFailHint("请填写手机");
+					return;
+				} //手机号码正则校验
+				if (!this.$u.test.mobile(tel)) {
+					app.globalData.autoFailHint("请填写正确手机号");
+					return;
 				}
-			})
-			
-		},
-		//添加家人
-		editUser: function () {
-		  let that = this;
-		  let params = {};
-		  let user_id = that.user_id;
-		  params['user_id'] = user_id;
-		  let tel = that.tel;
-		
-		  if (!tel) {
-		    app.globalData.autoFailHint("请填写手机");
-		    return;
-		  } //手机号码正则校验
-		  if (!this.$u.test.mobile(tel)) {
-		    app.globalData.autoFailHint("请填写正确手机号");
-		    return;
-		  }
-		
-		  params['tel'] = tel;
-		  
-		  let type = that.type;
-		  params['type'] = type;
-		  let id_card = that.id_card;
-		  params['id_card'] = id_card; //业主身份时,身份证必填
-		
-		  if (type == 0 && !id_card) {
-		    app.globalData.autoFailHint("住户类型是业主时,身份证必填");
-		    return;
-		  } //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
-			if (!this.$isEmpty(id_card)) {
-			  //如果身份证号不为空,就校验身份证号
+
+				params['tel'] = tel;
+
+				let type = that.type;
+				params['type'] = type;
+				let id_card = that.id_card;
+				params['id_card'] = id_card; //业主身份时,身份证必填
+
+				if (type == 0 && !id_card) {
+					app.globalData.autoFailHint("住户类型是业主时,身份证必填");
+					return;
+				} //0 中国大陆 1 中国香港/澳门 2 中国台湾 3 海外
+				if (!this.$isEmpty(id_card)) {
+					//如果身份证号不为空,就校验身份证号
 					if (!this.$u.test.idCard(id_card)) {
 						app.globalData.autoFailHint("请输入正确的身份证号");
 						return;
 					}
+				}
+
+				let nationality = that.nationality;
+				params['nationality'] = nationality;
+				let passport_img_uri = that.passport_img_uri;
+				let entry_img_uri = that.entry_img_uri;
+
+				if (nationality == 3) {
+					params['passport_img_uri'] = that.passport_img_uri;
+					params['entry_img_uri'] = that.entry_img_uri;
+
+					if (type == 0) {
+						if (!passport_img_uri && !that.show_passport_img_uri) {
+							app.globalData.autoFailHint("请上传护照图片");
+							return;
+						}
+
+						if (!entry_img_uri && !that.show_entry_img_uri) {
+							app.globalData.autoFailHint("请上传入境证明");
+							return;
+						}
+					}
+				}
+
+				let image_uri = that.image_uri;
+				let face_code = that.face_code;
+
+				if (image_uri && face_code) {
+					params['image_uri'] = that.image_uri;
+					params['face_code'] = that.face_code;
+				} //性别
+
+				params['oper_user_type'] = that.operUserType
+				params['sex'] = that.sex; //添加了人脸
+
+				params['member_id'] = app.globalData.member.id; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
+		 	params['operatorName'] = app.globalData.member.name;
+				params['create_type'] = '0';
+				params['name'] = that.name;
+				console.log(params)
+				// let operation = 'user/editUser';
+				that.$http.editFamily(params).then(res => {
+					//添加成功
+					if (res.data.result_code == 1) {
+						app.globalData.oneFailHint(res.data.result_msg, function() {
+							uni.navigateBack({
+								delta: 1 // 返回上一级页面。
+
+							});
+						});
+					} else {
+						app.globalData.oneFailHint(res.data.result_msg);
+					}
+
+				});
 			}
-		
-		  let nationality = that.nationality;
-		  params['nationality'] = nationality;
-		  let passport_img_uri = that.passport_img_uri;
-		  let entry_img_uri = that.entry_img_uri;
-		
-		  if (nationality == 3) {
-		    params['passport_img_uri'] = that.passport_img_uri;
-		    params['entry_img_uri'] = that.entry_img_uri;
-		
-		    if (type == 0) {
-		      if (!passport_img_uri && !that.show_passport_img_uri) {
-		        app.globalData.autoFailHint("请上传护照图片");
-		        return;
-		      }
-		
-		      if (!entry_img_uri && !that.show_entry_img_uri) {
-		        app.globalData.autoFailHint("请上传入境证明");
-		        return;
-		      }
-		    }
-		  }
-		
-		  let image_uri = that.image_uri;
-		  let face_code = that.face_code;
-		
-		  if (image_uri && face_code) {
-		    params['image_uri'] = that.image_uri;
-		    params['face_code'] = that.face_code;
-		  } //性别
-		  
-		  params['oper_user_type']=that.operUserType
-		  params['sex'] = that.sex; //添加了人脸
-		
-		  params['member_id'] = app.globalData.member.id; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
-		  params['operatorName'] = app.globalData.member.name;
-		  params['create_type'] = '0';
-		  params['name'] = that.name;
-		  console.log(params)
-		  // let operation = 'user/editUser';
-		  that.$http.editFamily(params).then (res =>{
-			  //添加成功
-			  if (res.data.result_code == 1) {
-			    app.globalData.oneFailHint(res.data.result_msg, function () {
-			      uni.navigateBack({
-			        delta: 1 // 返回上一级页面。
-			  		
-			      });
-			    });
-			  } else {
-			    app.globalData.oneFailHint(res.data.result_msg);
-			  }
-		    
-		  });
+
 		}
-		
-	}
-};
+	};
 </script>
 
 <style scoped lang="scss">
-.form {
-	padding:0 60rpx;
-	background-color: #FFFFFF;
-}
-
-.local_city{
-    padding: 30rpx 0;
-    position:relative;
-    background: #fff;
-}
-.local_city .changeCity{
-    padding: 20rpx;
-    position: absolute;
-    right: 0rpx;
-    top: 0;
-}
-.local_city .icon{
-    padding: 20rpx;
-    position: absolute;
-    left: -0;
-    top: 50%;
-    transform: translate(0,-50%);
-    font-size: 40rpx;
-}
-.local_city .local_city_info{
-    padding-left: 40rpx;
-    display:inline-block;
-}
-
-.form_group .upload {
-  padding: 0 28rpx;
-  font-size: 26rpx;
-  background: $base-btn-color;
-  color: #fff;
-  border: none;
-}
-
-.upload_tips {
-  font-size: 24rpx;
-}
-
-.upload_bg {
-  position: relative;
-  text-align: center;
-}
-
-.mb0 {
-  padding-top: 40rpx;
-  font-size: 28rpx;
-  margin-bottom: 0;
-}
-
-.form_group .tips {
-  margin-left: 50rpx;
-}
-
-.upload_bg .upload_bgImg {
-  width: 540rpx;
-  height: 400rpx;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 70%;
-  left: 50%;
-  transform: translate(-50%, 0);
-  color: $base-btn-color;
-}
-
-upload_bg {
-  position: relative;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 40%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 55%;
-  width: 100%;
-  color: $base-btn-color;
-}
-
-.img_content {
-  margin-top: 20rpx;
-  position: relative;
-  text-align: center;
-}
-
-.img_content .upload_bgImg {
-  width: 560rpx;
-  height: 420rpx;
-  max-height: 1;
-  display: inline-block;
-  border-radius: 20rpx;
-}
-
-.reUpload {
-  height: 60rpx;
-  line-height: 60rpx;
-  text-align: right;
-  color: #333;
-  padding-right: 100rpx;
-  font-size: 26rpx;
-}
-
-.img_content .img_icon {
-  width: 40rpx;
-  height: 40rpx;
-  vertical-align: text-top;
-  margin-right: 6rpx;
-  border-radius: 20rpx;
-}
-
-.category {
-  padding:20px 20rpx 0;
-  overflow: auto;
-  background-color: #FFF;
-text-align:center;
-
-}
-.category_item {
-  width: 33.3%;
-  float: left;
-  margin-bottom: 40rpx;
-}
-
-.icon_wrap {
-  width: 120rpx;
-  margin: 0 auto;
-  margin-bottom: 5px;
-}
-.index_icon {
-  width: 60rpx;
-  height: 60rpx;
-}
-.category_item_text {
-  text-align: center;
-  font-size: 24rpx;
-  color: #999;
-}
+	.form {
+		padding: 0 60rpx;
+		background-color: #FFFFFF;
+	}
 
-</style>
+	.local_city {
+		padding: 30rpx 0;
+		position: relative;
+		background: #fff;
+	}
+
+	.local_city .changeCity {
+		padding: 20rpx;
+		position: absolute;
+		right: 0rpx;
+		top: 0;
+	}
+
+	.local_city .icon {
+		padding: 20rpx;
+		position: absolute;
+		left: -0;
+		top: 50%;
+		transform: translate(0, -50%);
+		font-size: 40rpx;
+	}
+
+	.local_city .local_city_info {
+		padding-left: 40rpx;
+		display: inline-block;
+	}
+
+	.form_group .upload {
+		padding: 0 28rpx;
+		font-size: 26rpx;
+		background: $base-btn-color;
+		color: #fff;
+		border: none;
+	}
+
+	.upload_tips {
+		font-size: 24rpx;
+	}
+
+	.upload_bg {
+		position: relative;
+		text-align: center;
+	}
+
+	.mb0 {
+		padding-top: 40rpx;
+		font-size: 28rpx;
+		margin-bottom: 0;
+	}
+
+	.form_group .tips {
+		margin-left: 50rpx;
+	}
+
+	.upload_bg .upload_bgImg {
+		width: 540rpx;
+		height: 400rpx;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
 
-			
-		
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 70%;
+		left: 50%;
+		transform: translate(-50%, 0);
+		color: $base-btn-color;
+	}
+
+	upload_bg {
+		position: relative;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 40%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 55%;
+		width: 100%;
+		color: $base-btn-color;
+	}
+
+	.img_content {
+		margin-top: 20rpx;
+		position: relative;
+		text-align: center;
+	}
+
+	.img_content .upload_bgImg {
+		width: 560rpx;
+		height: 420rpx;
+		max-height: 1;
+		display: inline-block;
+		border-radius: 20rpx;
+	}
+
+	.reUpload {
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: right;
+		color: #333;
+		padding-right: 100rpx;
+		font-size: 26rpx;
+	}
+
+	.img_content .img_icon {
+		width: 40rpx;
+		height: 40rpx;
+		vertical-align: text-top;
+		margin-right: 6rpx;
+		border-radius: 20rpx;
+	}
+
+	.category {
+		padding: 20px 20rpx 0;
+		overflow: auto;
+		background-color: #FFF;
+		text-align: center;
+
+	}
+
+	.category_item {
+		width: 33.3%;
+		float: left;
+		margin-bottom: 40rpx;
+	}
+
+	.icon_wrap {
+		width: 120rpx;
+		margin: 0 auto;
+		margin-bottom: 5px;
+	}
+
+	.index_icon {
+		width: 60rpx;
+		height: 60rpx;
+	}
+
+	.category_item_text {
+		text-align: center;
+		font-size: 24rpx;
+		color: #999;
+	}
+</style>

+ 4 - 4
pages/myFamily/myfamily1.vue

@@ -31,14 +31,14 @@
 										<view  data-aid="undefined">
 										  <image v-if="item.imageUri" mode="aspectFill" :src="item.imageUri">
 										  </image>
-										  <image v-if="item.imageUri==null" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png">
+										  <image v-if="item.imageUri==null" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png">
 										  </image>
 										</view>
 										
 										<view class="content" data-aid="undefined">
 											<view >姓名:{{item.name}}</view>
 											<view >手机:{{item.phone}}</view>
-											<view >创建时间:{{item.createDate}}</view>
+											<view >创建时间:{{item.createTime || '未知'}}</view>
 											<view v-if="item.type==0">身份:业主</view>
 											<view v-if="item.type==1">身份:成员</view>
 											<view v-if="item.type==2">身份:租户</view>
@@ -85,7 +85,7 @@
 						      <view class="section_image" data-aid="undefined">
 						        <image style="border-radius: 50%;" v-if="item.imageUri" mode="aspectFill" :src="item.imageUri">
 						        </image>
-						        <image style="border-radius: 50%;" v-if="item.imageUri==null" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png">
+						        <image style="border-radius: 50%;" v-if="item.imageUri==null" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png">
 						        </image>
 						      </view>
 						      <view class="section_cont" data-aid="undefined">
@@ -147,7 +147,7 @@
 						      <view class="section_image" data-aid="undefined">
 						        <image v-if="item.imageUri" mode="aspectFill" :src="item.imageUri">
 						        </image>
-						        <image v-if="item.imageUri==null" mode="aspectFill" src="http://139.9.103.171:1888/img/image/head.png">
+						        <image v-if="item.imageUri==null" mode="aspectFill" src="https://szsq.nxzhsq.cn/community/miniofile/image/head.png">
 						        </image>
 						      </view>
 						      <view class="section_cont" data-aid="undefined">

+ 1 - 1
pages/myhome/familyList.vue

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

+ 23 - 47
pages/notice/notice.vue

@@ -1,33 +1,28 @@
 <template>
-	<view>
-		<view class="cu-load padding-top-10" :class="ajax.loading?'loading':''" @tap="getHistoryMsg"></view>
-		<view  class="cart-view-box" v-for="(item,index) in msgList" :key="index" :id="`msg-${item.id}`">
-			<view class="text-gray text-center">{{item.createTime}}</view>
-			<view @click="goDetail(item)" class="bg-white margin-top radius card-view">
-				<view class="content-view">
-					<view class="text-black text-bold text-lg text-cut">{{item.title}}</view>
-					<view class="text-sm text-cut-2 subtitle" style="height: 200rpx;">
-						<u-parse :html="item.notice"></u-parse>
-					</view>
-					<view class="flex  justify-between padding-top-20" style=" border-top: 1rpx solid #f2f2f2;box-sizing: border-box;">
-						 <view class="text-df text-black">
-							<text>查看详情</text>
-						 </view>
-						 <view style="padding-top: 8rpx;">
-							<text class=" cuIcon-right"></text>
-						 </view>
-					</view>
-					<!-- <view class="flex  justify-between text-bold" style="box-sizing: border-box;">
-						<view class="text-df text-black">
-							<text>{{item.title}}</text>
+	<view class="">
+		<view v-if="$isNotEmpty(msgList)">
+			<view class="cu-load padding-top-10" :class="ajax.loading?'loading':''" @tap="getHistoryMsg"></view>
+			<view  class="cart-view-box" v-for="(item,index) in msgList" :key="index" :id="`msg-${item.id}`">
+				<view class="text-gray text-center">{{item.createTime}}</view>
+				<view @click="goDetail(item)" class="bg-white margin-top radius card-view">
+					<view class="content-view">
+						<view class="text-black text-bold text-lg text-cut">{{item.title}}</view>
+						<view class="text-sm text-cut-2 subtitle" style="height: 200rpx;">
+							<u-parse :html="item.notice"></u-parse>
 						</view>
-						<view style="padding-top: 8rpx;">
-							<text class=" cuIcon-right"></text>
+						<view class="flex  justify-between padding-top-20" style=" border-top: 1rpx solid #f2f2f2;box-sizing: border-box;">
+							 <view class="text-df text-black">
+								<text>查看详情</text>
+							 </view>
+							 <view style="padding-top: 8rpx;">
+								<text class=" cuIcon-right"></text>
+							 </view>
 						</view>
-					</view> -->
+					</view>
 				</view>
 			</view>
 		</view>
+		<u-empty marginTop="200" icon-size="160"  v-else text="暂无数据" src="/static/common/empty.png"></u-empty>
 	</view>
 </template>
 
@@ -79,9 +74,9 @@
 					this.hideLoadTips();
 					this.ajax.flag = false;
 					let data = await this.joinHistoryMsg();
-					
-					console.log(data);	// 查看请求返回的数据结构 
-					
+					if (this.$isEmpty(data)) {
+						return
+					}
 					// 获取待滚动元素选择器,解决插入数据后,滚动条定位时使用
 					let selector = '';
 										
@@ -122,24 +117,6 @@
 			},
 			// 拼接历史记录消息,正式项目可替换为请求历史记录接口
 			joinHistoryMsg(){
-				console.log(this.ajax.page);
-				console.log(this.ajax.rows);
-				// let join = ()=>{
-				// 	let arr = [];
-				// 	//通过当前页码及页数,模拟数据内容
-				// 	let startIndex = (this.ajax.page-1) * this.ajax.rows;
-				// 	let endIndex = startIndex + this.ajax.rows;
-				// 	for(let i = startIndex; i < endIndex; i++){
-				// 		arr.push({
-				// 			"id":i,	// 消息的ID
-				// 			"time":'2020年11月18日 11:00:18',
-				// 			"title":`${i+1}放假通知`,	// 消息内容
-				// 			"subtitle":'2020年10月1日-2020年10月8日,中秋 国庆节放假,假期间需注意,祝国庆节玩的开心。'	,
-				// 		})
-				// 	}
-				// 	arr.reverse();
-				// 	return arr;
-				// }
 				// 此处用到 ES6 的 Promise 知识,不懂的请自行学习。
 				return new Promise((done,fail)=>{
 					// 无数据请求接口,由 setTimeout 模拟,正式项目替换为 ajax 即可。
@@ -151,8 +128,7 @@
 						params.residentialId = uni.getStorageSync("residentialId");
 						that.$http.getNoticeList(params).then (res=>{
 							//获取成功
-							done(res.data.noticeList);
-							
+							done(res.data.data);
 						});
 						
 					},800);

+ 383 - 375
pages/register/register.vue

@@ -1,382 +1,390 @@
 <template>
-<view class="container edit_wrap">
-<view class="flex justify-between " style="padding: 40rpx 30rpx;;box-sizing: border-box;">
-	<view class="" style="font-size: 38rpx;">
-		<text class="text-bold text-black">注册认证</text>
-	</view>
-	<view class="text-red"  style="padding-top: 12rpx;">
-		<text style="font-size: 38rpx;">1</text>
-		<text class="text-df">/3</text>
-	</view>
-</view>
- <form>
-    <view class="form_group">
-      <text class="red">*</text>
-      <text class="sex">姓名:</text>
-      <input placeholder="请与物业登记处保持一致" placeholder-class="placeholder_style" type="text" class="placeholder_style" @input="nameInput">
-      </input>
-    </view>
-    <view class="form_group">
-      <text class="red">*</text>
-      <text class="sex">手机:</text>
-      <input placeholder="请与物业登记处保持一致" v-model="tel" placeholder-class="placeholder_style" type="number" maxlength="11" class="placeholder_style" >
-      </input>
-    </view>
-    <view class="form_group">
-      <text class="red">*</text>
-      <text class="sex">验证码:</text>
-      <input type="text" class="sendmsg_input" @input="verifyCodeInput"></input>
-      <button class="right code_btn" @tap="sendMsgButton" :disabled="disabled" :style="'background-color:' + color">{{text}}</button>
-    </view>
-    <view style="display:flex;margin:20rpx 20rpx">
-	  <u-checkbox v-model="isCheck" active-color="blue">
-	  </u-checkbox>
-	  <view style="display: flex;">
-		<text>请阅读并同意</text>
-	  	<navigator class="text-red" :url="webviewUrl1">《隐私协议》</navigator>
-		<text>和</text>
-		<navigator class="text-red" :url="webviewUrl2">《用户协议》</navigator>
-	  </view>
-    </view>
-	<view class="tips">
-	  <text style="padding-left: 40rpx;">认证后用户可享受更多权益,随时获取到您所在小区的动态</text>
-	</view>
-	
-	<button style="border-radius: 0;" open-type="getUserInfo" @getuserinfo="showDialogBtn"  class=" footer-fixed" >
-		<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-			确认
+	<view class="container edit_wrap">
+		<view class="flex justify-between " style="padding: 40rpx 30rpx;;box-sizing: border-box;">
+			<view class="" style="font-size: 38rpx;">
+				<text class="text-bold text-black">注册认证</text>
+			</view>
+			<view class="text-red" style="padding-top: 12rpx;">
+				<text style="font-size: 38rpx;">1</text>
+				<text class="text-df">/3</text>
+			</view>
 		</view>
-	</button>
-  </form>
-</view>
+		<form>
+			<view class="form_group">
+				<text class="red">*</text>
+				<text class="sex">姓名:</text>
+				<input placeholder="请与物业登记处保持一致" placeholder-class="placeholder_style" type="text"
+					class="placeholder_style" @input="nameInput">
+				</input>
+			</view>
+			<view class="form_group">
+				<text class="red">*</text>
+				<text class="sex">手机:</text>
+				<input placeholder="请与物业登记处保持一致" v-model="tel" placeholder-class="placeholder_style" type="number"
+					maxlength="11" class="placeholder_style">
+				</input>
+			</view>
+			<view class="form_group">
+				<text class="red">*</text>
+				<text class="sex">验证码:</text>
+				<input type="text" class="sendmsg_input" @input="verifyCodeInput"></input>
+				<button class="right code_btn" @tap="sendMsgButton" :disabled="disabled"
+					:style="'background-color:' + color">{{text}}</button>
+			</view>
+			<view style="display:flex;margin:20rpx 20rpx">
+				<u-checkbox v-model="isCheck" active-color="blue">
+				</u-checkbox>
+				<view style="display: flex;">
+					<text>请阅读并同意</text>
+					<navigator class="text-red" :url="webviewUrl1">《隐私协议》</navigator>
+					<text>和</text>
+					<navigator class="text-red" :url="webviewUrl2">《用户协议》</navigator>
+				</view>
+			</view>
+			<view class="tips">
+				<text style="padding-left: 40rpx;">认证后用户可享受更多权益,随时获取到您所在小区的动态</text>
+			</view>
+
+			<button style="border-radius: 0;" open-type="getUserInfo" @getuserinfo="showDialogBtn"
+				class=" footer-fixed">
+				<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+					确认
+				</view>
+			</button>
+		</form>
+	</view>
 </template>
 
 <script>
-//获取app实例
-var app = getApp();
-
-export default {
-  data() {
-    return {
-	  webviewUrl1:'/pages/webview/webview?url=https://community.58fo.com/appfile/protocal.htm&title=隐私协议',
-	  webviewUrl2:'/pages/webview/webview?url=https://community.58fo.com/appfile/userprotocal.html&title=用户协议',
-      text: '获取验证码',
-      //按钮文字
-      currentTime: 61,
-      //倒计时
-      disabled: false,
-      //按钮是否禁用
-      name: null,
-      //姓名
-      tel: null,
-      //获取到的手机栏中的值
-      verify_code: null,
-      //验证码
-      isCheck: true,
-      color: ""
-    };
-  },
-  onLoad() {
-	  let userinfo=this.$auth.getMineBase().user
-	  if (!this.$isEmpty(userinfo)) {
-		  if (userinfo.mobile!='13800000000') {
-		  	this.tel=this.$auth.getMineBase().user.mobile
-		  }
-	  }
-  },
-  methods: {
-    //获取姓名栏input中的值
-    nameInput: function (e) {
-      this.setData({
-        name: e.detail.value
-      });
-    },
-    //获取验证码栏input中的值
-    verifyCodeInput: function (e) {
-      this.setData({
-        verify_code: e.detail.value
-      });
-    },
-    //获取验证码按钮
-    sendMsgButton: function () {
-      let that = this;
-      that.setData({
-        disabled: true,
-        //只要点击了按钮就让按钮禁用 (避免正常情况下多次触发定时器事件)
-        color: '#ccc'
-      });
-      let name = that.name;
-      let tel = that.tel; //把手机号跟倒计时值变例成js值
-
-      let currentTime = that.currentTime; //warn为当手机号为空或格式不正确时提示用户的文字,默认为空
-
-      let warn = null;
-
-      if (name == null) {
-        warn = "姓名不能为空";
-      } else if (tel == null) {
-        warn = "手机号码不能为空";
-      } else if (!this.$u.test.mobile(tel)) {
-        warn = "手机号格式不正确";
-      } else {
-        //发送短信
-        that.sendMessage(); //设置一分钟的倒计时
-
-        let interval = setInterval(function () {
-          currentTime--; //每执行一次让倒计时秒数减一
-
-          that.setData({
-            text: currentTime + 's' //按钮文字变成倒计时对应秒数
-
-          }); //如果当秒数小于等于0时 停止计时器 且按钮文字变成重新发送 且按钮变成可用状态 倒计时的秒数也要恢复成默认秒数 即让获取验证码的按钮恢复到初始化状态只改变按钮文字
-
-          if (currentTime <= 0) {
-            clearInterval(interval);
-            that.setData({
-              text: '重新发送',
-              currentTime: 61,
-              disabled: false,
-              color: '#59a5f0'
-            });
-          }
-        }, 1000);
-      }; //判断 当提示错误信息文字不为空 即手机号输入有问题时提示用户错误信息 并且提示完之后一定要让按钮为可用状态 因为点击按钮时设置了只要点击了按钮就让按钮禁用的情况
-
-      if (warn != null) {
-        //自动关闭提示弹窗
-        app.globalData.autoFailHint(warn);
-        that.setData({
-          disabled: false,
-          color: '#59a5f0'
-        });
-        return;
-      }
-
-      ;
-    },
-    //确认
-    showDialogBtn: function (e) {
-		console.log(e);
-	  app.globalData.totalStep=3
-      let that = this;
-      let name = that.name;
-      if (name == null) {
-        //自动关闭提示弹窗
-        app.globalData.autoFailHint("请填写姓名");
-        return;
-      }
-      let tel = that.tel;
-	  if (tel == null) {
-	    //自动关闭提示弹窗
-	    app.globalData.autoFailHint("请输入手机号");
-	    return;
-	  }
-      if (!this.$u.test.mobile(tel)) {
-        //自动关闭提示弹窗
-        app.globalData.autoFailHint("请填写正确的手机号码");
-        return;
-      }
-      let verify_code = that.verify_code;
-
-      if (verify_code == null) {
-        //自动关闭提示弹窗
-        app.globalData.autoFailHint("请填写验证码");
-        return;
-      }
-
-      if (!that.isCheck) {
-        app.globalData.autoFailHint("请同意用户协议");
-        return;
-      } //注册
-      //构建参数
-      let params = {};
-      params['name'] = name;
-      params['tel'] = tel;
-      params['verify_code'] = verify_code; 
-
-      params['create_type'] = 0;
-      params['openid'] = uni.getStorageSync("openid");
-      // let operation = 'miniprogram/memberRegister';
-      this.$http.memberRegister(params).then(res =>{
-		  //注册成功
-		  if (res.data.result_code == 1) {
-		    app.globalData.oneFailHint(res.data.result_msg, function () {
-		      //注册成功之后重新拉取一次会员信息
-		      let params = {};
-		      params['openid'] = uni.getStorageSync("openid");
-		      // let operation = 'miniprogram/getMemberByOpenid';
-		      that.$http.getMemberByOpenid(params).then (res=>{
-		  		console.info("getMemberByOpenid==" + res.data.result_msg); //获取成功
-		  		if (res.data.result_code == 1) {
-		  		  let member = res.data.member;
-		  		  app.globalData.member = member; //未认证状态--提示去认证
-		  		  if (this.$isEmpty(member.state)) {
-					uni.redirectTo({
-						url:"../auth/auth"
-					})
-		  		  } else {
-		  		    uni.reLaunch({
-		  		      url: '/pages/index/index'
-		  		    });
-		  		  }
-		  		} else {
-		  		  app.globalData.oneFailHint(res.data.result_msg);
-		  		}
-		       
-		      });
-		    });
-		  } else {
-		    app.globalData.oneFailHint(res.data.result_msg);
-		  }
-       
-      });
-    },
-    //申请短信验证码
-    sendMessage: function () {
-      //构建参数
-      let params = {};
-      params['tel'] = this.tel;
-	  // params['play_type'] = '2';
-      // let operation = 'member/getSmsCode';
-      this.$http.getSmsCode(params).then(res=>{
-		  //短信发送成功
-		  if (res.data.result_code == 1) {
-		    app.globalData.autoFailHint(res.data.result_msg);
-		  } else {
-		    app.globalData.oneFailHint(res.data.result_msg);
-		  }
-       
-      });
-    }
-  }
-};
+	//获取app实例
+	var app = getApp();
+
+	export default {
+		data() {
+			return {
+				webviewUrl1: '/pages/webview/webview?url=https://community.58fo.com/appfile/protocal.htm&title=隐私协议',
+				webviewUrl2: '/pages/webview/webview?url=https://community.58fo.com/appfile/userprotocal.html&title=用户协议',
+				text: '获取验证码',
+				//按钮文字
+				currentTime: 61,
+				//倒计时
+				disabled: false,
+				//按钮是否禁用
+				name: null,
+				//姓名
+				tel: null,
+				//获取到的手机栏中的值
+				verify_code: null,
+				//验证码
+				isCheck: true,
+				color: ""
+			};
+		},
+		onLoad() {
+			let userinfo = this.$auth.getMineBase().user
+			if (!this.$isEmpty(userinfo)) {
+				if (userinfo.mobile != '13800000000') {
+					this.tel = this.$auth.getMineBase().user.mobile
+				}
+			}
+		},
+		methods: {
+			//获取姓名栏input中的值
+			nameInput: function(e) {
+				this.setData({
+					name: e.detail.value
+				});
+			},
+			//获取验证码栏input中的值
+			verifyCodeInput: function(e) {
+				this.setData({
+					verify_code: e.detail.value
+				});
+			},
+			//获取验证码按钮
+			sendMsgButton: function() {
+				let that = this;
+				that.setData({
+					disabled: true,
+					//只要点击了按钮就让按钮禁用 (避免正常情况下多次触发定时器事件)
+					color: '#ccc'
+				});
+				let name = that.name;
+				let tel = that.tel; //把手机号跟倒计时值变例成js值
+
+				let currentTime = that.currentTime; //warn为当手机号为空或格式不正确时提示用户的文字,默认为空
+
+				let warn = null;
+
+				if (name == null) {
+					warn = "姓名不能为空";
+				} else if (tel == null) {
+					warn = "手机号码不能为空";
+				} else if (!this.$u.test.mobile(tel)) {
+					warn = "手机号格式不正确";
+				} else {
+					//发送短信
+					that.sendMessage(); //设置一分钟的倒计时
+
+					let interval = setInterval(function() {
+						currentTime--; //每执行一次让倒计时秒数减一
+
+						that.setData({
+							text: currentTime + 's' //按钮文字变成倒计时对应秒数
+
+						}); //如果当秒数小于等于0时 停止计时器 且按钮文字变成重新发送 且按钮变成可用状态 倒计时的秒数也要恢复成默认秒数 即让获取验证码的按钮恢复到初始化状态只改变按钮文字
+
+						if (currentTime <= 0) {
+							clearInterval(interval);
+							that.setData({
+								text: '重新发送',
+								currentTime: 61,
+								disabled: false,
+								color: '#59a5f0'
+							});
+						}
+					}, 1000);
+				}; //判断 当提示错误信息文字不为空 即手机号输入有问题时提示用户错误信息 并且提示完之后一定要让按钮为可用状态 因为点击按钮时设置了只要点击了按钮就让按钮禁用的情况
+
+				if (warn != null) {
+					//自动关闭提示弹窗
+					app.globalData.autoFailHint(warn);
+					that.setData({
+						disabled: false,
+						color: '#59a5f0'
+					});
+					return;
+				}
+
+				;
+			},
+			//确认
+			showDialogBtn: function(e) {
+				console.log(e);
+				app.globalData.totalStep = 3
+				let that = this;
+				let name = that.name;
+				if (name == null) {
+					//自动关闭提示弹窗
+					app.globalData.autoFailHint("请填写姓名");
+					return;
+				}
+				let tel = that.tel;
+				if (tel == null) {
+					//自动关闭提示弹窗
+					app.globalData.autoFailHint("请输入手机号");
+					return;
+				}
+				if (!this.$u.test.mobile(tel)) {
+					//自动关闭提示弹窗
+					app.globalData.autoFailHint("请填写正确的手机号码");
+					return;
+				}
+				let verify_code = that.verify_code;
+
+				if (verify_code == null) {
+					//自动关闭提示弹窗
+					app.globalData.autoFailHint("请填写验证码");
+					return;
+				}
+
+				if (!that.isCheck) {
+					app.globalData.autoFailHint("请同意用户协议");
+					return;
+				} //注册
+				//构建参数
+				let params = {};
+				params['name'] = name;
+				params['tel'] = tel;
+				params['verify_code'] = verify_code;
+
+				params['create_type'] = 0;
+				params['openid'] = uni.getStorageSync("openid");
+				// let operation = 'miniprogram/memberRegister';
+				this.$http.memberRegister(params).then(res => {
+					//注册成功
+					if (res.data.result_code == 1) {
+						this.$dialog.showModal("注册成功",false).then(()=>{
+							//注册成功之后重新拉取一次会员信息
+							let params = {};
+							params['openid'] = uni.getStorageSync("openid");
+							// let operation = 'miniprogram/getMemberByOpenid';
+							that.$http.getMemberByOpenid(params).then(res => {
+								console.info("getMemberByOpenid==" + res.data
+								.result_msg); //获取成功
+								if (res.data.result_code == 1) {
+									let member = res.data.member;
+									app.globalData.member = member; //未认证状态--提示去认证
+									if (this.$isEmpty(member.state)) {
+										uni.redirectTo({
+											url: "../auth/auth"
+										})
+									} else {
+										uni.reLaunch({
+											url: '/pages/index/index'
+										});
+									}
+								} else {
+									app.globalData.oneFailHint(res.data.result_msg);
+								}
+							
+							});
+						})
+	
+					} else {
+						app.globalData.oneFailHint(res.data.result_msg);
+					}
+				});
+			},
+			//申请短信验证码
+			sendMessage: function() {
+				//构建参数
+				let params = {};
+				params['tel'] = this.tel;
+				// params['play_type'] = '2';
+				// let operation = 'member/getSmsCode';
+				this.$http.getSmsCode(params).then(res => {
+					//短信发送成功
+					if (res.data.result_code == 1) {
+						app.globalData.autoFailHint(res.data.result_msg);
+					} else {
+						app.globalData.oneFailHint(res.data.result_msg);
+					}
+
+				});
+			}
+		}
+	};
 </script>
 <style lang="scss">
-page {
-  background: #fff;
-}
-
-
-.edit_wrap {
-  font-size: 30rpx;
-  padding: 0rpx 20rpx 20rpx;
-  color: #333;
-}
-
-.form_group {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  margin: 20rpx 20rpx;
-  line-height: 100rpx;
-  position: relative;
-  font-size: 26rpx;
-  border-bottom: 2rpx solid #ddd;
-  
-}
-
-.form_group .item {
-  text-align: right;
-  line-height: 80rpx;
-}
-
-.form_group .red {
-  color: red;
-  position: absolute;
-  left: 0;
-}
-
-.form_group text.sex {
-  margin-left: 15px;
-  text-align: right;
-}
-
-.form_group .radio-group {
-  text-align: left;
-}
-
-.form_group input, .form_group picker {
-  width: 500rpx;
-  border-radius: 8rpx;
- height: 100rpx;
-  line-height: 100rpx;
-  padding: 0rpx 20rpx;
-  color: #333;
-  box-sizing: border-box;
-  position: relative;
-  z-index: 1;
-}
-
-.form_group button {
-  font-size: 24rpx;
-  background: $base-btn-color;
-  margin:10rpx 0 0 10rpx;
-  color: #fff;
-}
-
-.form_group .sendmsg_input {
-  width: 340rpx;
-  margin-left: 36rpx;
-}
-
-.tips {
-  padding: 0 10rpx;
-  text-align: center;
-  font-size: 24rpx;
-  color: #999;
-  margin-top: 20rpx;
-}
-
-.placeholder_style {
-  font-family: '微软雅黑';
-  color: #adadad;
-  font-size: 26rpx;
-}
-
-.save_btn {
-  width: 600rpx;
-  background: #d24a58;
-  font-size: 32rpx;
-  color: #fff;
-  border-radius: 0rpx;
-  margin: 40rpx 0rpx 10rpx;
-}
-
-.code_btn {
-  width: 150rpx;
-  background: $base-btn-color;
-  height: 60rpx;
-  line-height: 60rpx;
-  text-align: center;
-  border-radius: 10rpx;
-  color: #fff;
-  font-size: 33rpx;
-  padding: 0 10rpx;
-}
-
-.password_contet image {
-  width: 48rpx;
-  height: 48rpx;
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  transform: translate(-50%, -50%);
-}
-
-.password_contet {
-  position: absolute;
-  right: 0;
-  top: 50%;
-  transform: translate(0, -50%);
-  width: 80rpx;
-  height: 80rpx;
-  z-index: 999;
-}
-checkbox .wx-checkbox-input {
-  width: 34rpx;
-  height: 34rpx;
-}
-checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
-  color: $base-btn-color;
-}
-</style>
+	page {
+		background: #fff;
+	}
+
+
+	.edit_wrap {
+		font-size: 30rpx;
+		padding: 0rpx 20rpx 20rpx;
+		color: #333;
+	}
+
+	.form_group {
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		margin: 20rpx 20rpx;
+		line-height: 100rpx;
+		position: relative;
+		font-size: 26rpx;
+		border-bottom: 2rpx solid #ddd;
+
+	}
+
+	.form_group .item {
+		text-align: right;
+		line-height: 80rpx;
+	}
+
+	.form_group .red {
+		color: red;
+		position: absolute;
+		left: 0;
+	}
+
+	.form_group text.sex {
+		margin-left: 15px;
+		text-align: right;
+	}
+
+	.form_group .radio-group {
+		text-align: left;
+	}
+
+	.form_group input,
+	.form_group picker {
+		width: 500rpx;
+		border-radius: 8rpx;
+		height: 100rpx;
+		line-height: 100rpx;
+		padding: 0rpx 20rpx;
+		color: #333;
+		box-sizing: border-box;
+		position: relative;
+		z-index: 1;
+	}
+
+	.form_group button {
+		font-size: 24rpx;
+		background: $base-btn-color;
+		margin: 10rpx 0 0 10rpx;
+		color: #fff;
+	}
+
+	.form_group .sendmsg_input {
+		width: 340rpx;
+		margin-left: 36rpx;
+	}
+
+	.tips {
+		padding: 0 10rpx;
+		text-align: center;
+		font-size: 24rpx;
+		color: #999;
+		margin-top: 20rpx;
+	}
+
+	.placeholder_style {
+		font-family: '微软雅黑';
+		color: #adadad;
+		font-size: 26rpx;
+	}
+
+	.save_btn {
+		width: 600rpx;
+		background: #d24a58;
+		font-size: 32rpx;
+		color: #fff;
+		border-radius: 0rpx;
+		margin: 40rpx 0rpx 10rpx;
+	}
+
+	.code_btn {
+		width: 150rpx;
+		background: $base-btn-color;
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: center;
+		border-radius: 10rpx;
+		color: #fff;
+		font-size: 33rpx;
+		padding: 0 10rpx;
+	}
+
+	.password_contet image {
+		width: 48rpx;
+		height: 48rpx;
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%, -50%);
+	}
+
+	.password_contet {
+		position: absolute;
+		right: 0;
+		top: 50%;
+		transform: translate(0, -50%);
+		width: 80rpx;
+		height: 80rpx;
+		z-index: 999;
+	}
+
+	checkbox .wx-checkbox-input {
+		width: 34rpx;
+		height: 34rpx;
+	}
+
+	checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+		color: $base-btn-color;
+	}
+</style>

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

@@ -4,7 +4,7 @@
 			<view class="top">
 				<view class="left">
 					<view class="title">
-						<text>工单编号:{{item.jobNo}}</text>
+						<text>工单编号:{{item.repairNo}}</text>
 						<text @click.stop="copy(item.repairNo)" class="padding-left-20">复制</text>
 					</view>
 				</view>

+ 0 - 1
pages/services/property/list/item.vue

@@ -124,7 +124,6 @@
 				// let operation='estateRepair/estateRepairList'
 				try{
 					that.$http.estateRepairList(data).then (res=>{
-						console.log("repairList",JSON.stringify(res))
 						let estateRepairList=res.data.estateRepairList
 						let length=estateRepairList.records.length
 						let data=estateRepairList.records

+ 125 - 109
pages/services/property/property.vue

@@ -1,50 +1,51 @@
 <template>
 	<view>
-		<view class="card" >
+		<view class="card">
 			<view class="form">
 				<view class="flex">
-					<view class="need" >*</view>
+					<view class="need">*</view>
 					<view>请选择小区</view>
 				</view>
-				<view class="bg-gray padding-20 "  @click="residentialShow=true">
+				<view class="bg-gray padding-20 " @click="residentialShow=true">
 					<input disabled type="text" placeholder="请选择您所在的小区" v-model="data.residentialName" />
 				</view>
 			</view>
 			<view class="form">
 				<view class="flex">
-					<view class="need" >*</view>
+					<view class="need">*</view>
 					<view>报修位置</view>
 				</view>
-				<view class="bg-gray padding-20 "  >
-					<input  type="text" placeholder="请输入报修的具体位置" v-model="data.reportPosition" />
+				<view class="bg-gray padding-20 ">
+					<input type="text" placeholder="请输入报修的具体位置" v-model="data.reportPosition" />
 				</view>
 			</view>
 			<view class="form ">
 				<view class="flex">
-					<view class="need" >*</view>
+					<view class="need">*</view>
 					<view>联系方式</view>
 				</view>
-				<view class="bg-gray padding-20 " >
+				<view class="bg-gray padding-20 ">
 					<input maxlength="11" type="number" placeholder="请输入您的联系方式" v-model="data.phone" />
 				</view>
 			</view>
 			<view class="form">
 				<view class="flex">
-					<view class="need" >*</view>
+					<view class="need">*</view>
 					<view>预约时间</view>
 				</view>
 				<view class="bg-gray padding-20" @click="timeShow=true">
-					<input disabled  type="number" placeholder="请选择预约时间" v-model="dateTimeStr" />
+					<input disabled type="number" placeholder="请选择预约时间" v-model="dateTimeStr" />
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="card ">
 			<view class="form" style="height: 320rpx;">
-				<view  class="bg-gray padding-10">
-					<u-input v-model="data.reportDetail" type="textarea"  maxlength="100" height="240" placeholder="请填写故障描述" style="width: 100%;line-height: 50rpx;"/>
+				<view class="bg-gray padding-10">
+					<u-input v-model="data.reportDetail" type="textarea" maxlength="100" height="240"
+						placeholder="请填写故障描述" style="width: 100%;line-height: 50rpx;" />
 					<!-- <textarea @click="showMask"   v-model="data.reportDetail" maxlength="100" style="width: 100%;height: 270rpx;line-height: 50rpx;"  placeholder="请填写故障描述"></textarea> -->
-					<view  class="text-right text-df text-gray padding-top-10">
+					<view class="text-right text-df text-gray padding-top-10">
 						{{data.reportDetail.length}} / 100
 					</view>
 				</view>
@@ -54,12 +55,12 @@
 			<view class="text-center padding-20">
 				<text>上传图片(选填,最多四张)</text>
 			</view>
-			<view >
+			<view>
 				<view class="cu-form-group" style="padding: 20rpx 30rpx">
 					<view class="grid col-4 grid-square flex-sub padding-left-10">
-						<view class="bg-img" v-for="(item,index) in imgList" :key="index" @click="viewImage(index)" >
-						 <image :src="imgList[index]" mode="aspectFill"></image>
-							<view class="cu-tag bg-red" @click.stop="DelImg(index)" >
+						<view class="bg-img" v-for="(item,index) in imgList" :key="index" @click="viewImage(index)">
+							<image :src="imgList[index]" mode="aspectFill"></image>
+							<view class="cu-tag bg-red" @click.stop="DelImg(index)">
 								<text class='cuIcon-close' style="font-size: 20rpx;"></text>
 							</view>
 						</view>
@@ -70,115 +71,118 @@
 				</view>
 			</view>
 		</view>
-		<view  style="height: 110rpx;"></view>
-		<view style="z-index: 999;" class=" footer-fixed" @click="submit">
+		<view style="height: 110rpx;"></view>
+		<view 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>
 		<u-mask z-index="99999" :show="maskShow" @click="maskShow = false">
 			<view style="margin: 20rpx;" @click.stop="">
-				<textarea  @confirm="confirm" @keyboardheightchange="keyboardheightchange" v-model="data.reportDetail"  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">
+				<textarea @confirm="confirm" @keyboardheightchange="keyboardheightchange" v-model="data.reportDetail"
+					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.reportDetail.length}} / 100
 				</view>
 			</view>
 		</u-mask>
 		<u-popup v-model="timeShow" mode="bottom" border-radius="20" :closeable="true" height="55%">
-			<time-selector  @getDateTime="timeConfirm"></time-selector>
+			<time-selector @getDateTime="timeConfirm"></time-selector>
 		</u-popup>
-		
-		<u-select :default-value="defaultValue" value-name="residentialId" label-name="residentialName" @confirm="residentialConfirm" z-index="9999999" v-model="residentialShow" :list="residentialList"></u-select>
+
+		<u-select :default-value="defaultValue" value-name="residentialId" label-name="residentialName"
+			@confirm="residentialConfirm" z-index="9999999" v-model="residentialShow" :list="residentialList">
+		</u-select>
 	</view>
 </template>
 
 <script>
 	import timeSelector from '@/comps/mp-time/index.vue';
-	var app=getApp()
+	var app = getApp()
 	var that;
 	export default {
-		components:{
+		components: {
 			timeSelector
 		},
 		data() {
 			return {
-				defaultValue:[],
-				platform:'',
-				maskShow:false,
+				defaultValue: [],
+				platform: '',
+				maskShow: false,
 				//图片回显
-				imgList:[],
-				data:{
+				imgList: [],
+				data: {
 					//处理状态:待处理
-					handleStatus:0,
+					handleStatus: 0,
 					//报修用户的memberId
-					memberId:'',
+					memberId: '',
 					//userId
-					userId:'',
+					userId: '',
 					//小区id
-					residentialId:'',
+					residentialId: '',
 					//小区名字
-					residentialName:'',
+					residentialName: '',
 					//故障位置
-					reportPosition:'',
+					reportPosition: '',
 					//预约时间区间
-					beginTime:'',
-					endTime:'',
+					beginTime: '',
+					endTime: '',
 					//联系方式
-					phone:'',
+					phone: '',
 					//故障详情描述
-					reportDetail:'',
+					reportDetail: '',
 					//图片描述
-					pic:''
+					pic: ''
 				},
-				base64_image:[],
-				residentialShow:false,
-				residentialList:[],
-				timeShow:false,
-				dateTimeStr:''
+				base64_image: [],
+				residentialShow: false,
+				residentialList: [],
+				timeShow: false,
+				dateTimeStr: ''
 			}
 		},
 		onLoad() {
 			this.initData()
 		},
 		onShow() {
-			this.data.phone=getApp().globalData.member.tel
+			this.data.phone = getApp().globalData.member.tel
 		},
 		methods: {
-			initData(){
-				that=this
+			initData() {
+				that = this
 				//判断是ios还是安卓,ios键盘上移会挤压遮挡层
-				this.platform=this.$u.os() || "android"
+				this.platform = this.$u.os() || "android"
 				//获取用户的userid
-				this.data.userId=app.globalData.userId
+				this.data.userId = app.globalData.userId
 				//获取用户的memberId
-				try{
-					that.data.memberId=app.globalData.member.id
-				}catch(e){
+				try {
+					that.data.memberId = app.globalData.member.id
+				} catch (e) {
 					console.log(e);
 				}
 				if (this.$isEmpty(this.data.memberId)) {
-					console.log("系统异常");
-					app.globalData.oneFailHint("系统异常",function(){
+					app.globalData.oneFailHint("系统异常", function() {
 						uni.navigateBack({
-							delta:1
+							delta: 1
 						})
 					})
 					return
 				}
 				//从缓存中获取房屋列表
-				this.residentialList=uni.getStorageSync("residentialList")
+				this.residentialList = uni.getStorageSync("residentialList")
 				//从缓存中获取默认的小区名字和小区id
-				this.data.residentialName=uni.getStorageSync("plotName")
-				this.data.residentialId=uni.getStorageSync("residentialId")
+				this.data.residentialName = uni.getStorageSync("plotName")
+				this.data.residentialId = uni.getStorageSync("residentialId")
 				//社区选择器的默认值
-				this.residentialList.forEach((item,index)=>{
-					if (item.residentialId===this.data.residentialId) {
+				this.residentialList.forEach((item, index) => {
+					if (item.residentialId === this.data.residentialId) {
 						this.defaultValue.push(index)
 						return
 					}
 				})
 			},
-			submit(){
+			submit() {
 				if (this.$isEmpty(this.data.residentialName)) {
 					this.$u.toast("请选择小区")
 					return
@@ -195,11 +199,11 @@
 					this.$u.toast("请输入正确的联系方式")
 					return
 				}
-				if (this.$isEmpty(this.data.beginTime)||this.$isEmpty(this.data.endTime)) {
+				if (this.$isEmpty(this.data.beginTime) || this.$isEmpty(this.data.endTime)) {
 					this.$u.toast("请选择预约时间")
 					return
 				}
-				if (this.$util.createDate(this.data.beginTime).getTime()>
+				if (this.$util.createDate(this.data.beginTime).getTime() >
 					this.$util.createDate(this.data.endTime).getTime()) {
 					this.$u.toast("开始时间不能小于结束时间")
 					return
@@ -208,52 +212,60 @@
 					this.$u.toast("请输入故障描述")
 					return
 				}
-				this.data.pic=JSON.stringify(this.base64_image)
+				this.data.pic = JSON.stringify(this.base64_image)
 				// let operation='estateRepair/addEstateRepair'
-				console.log(this.data);
-				that.$http.addEstateRepair(this.data).then (res =>{
+				that.$http.addEstateRepair(this.data).then(res => {
 					if (res.data.add_result) {
 						app.globalData.oneFailHint("提交成功");
-					}else{
+					} else {
 						app.globalData.oneFailHint("提交失败");
 					}
-					
+
 				});
 			},
-			showMask(){
-				console.log(this.platform);
-				if (this.platform!='ios') {
-					this.maskShow=true
+			showMask() {
+				if (this.platform != 'ios') {
+					this.maskShow = true
 				}
 			},
-			confirm(){
-				this.maskShow=false
+			confirm() {
+				this.maskShow = false
 			},
-			residentialConfirm(e){
-				this.data.residentialId=e[0].value
-				this.data.residentialName=e[0].label
+			residentialConfirm(e) {
+				this.data.residentialId = e[0].value
+				this.data.residentialName = e[0].label
 			},
-			keyboardheightchange(e){
-				console.log(e.detail.height);
-				console.log(this.maskShow);
-				if (e.detail.height==0) {
-					this.maskShow=false
+			keyboardheightchange(e) {
+				if (e.detail.height == 0) {
+					this.maskShow = false
 				}
 			},
-			timeConfirm(e){
-				this.timeShow=false
-				this.data.beginTime=e.beginTime
-				this.data.endTime=e.endTime
-				this.dateTimeStr=this.data.beginTime+"   至   "+this.data.endTime
+			timeConfirm(e) {
+				this.timeShow = false
+				this.data.beginTime = e.beginTime
+				this.data.endTime = e.endTime
+				this.dateTimeStr = this.data.beginTime + "   至   " + this.data.endTime
 			},
 			/**
 			 * 上传问题截图
 			 */
-			chooseImage() {
-				let that=this
+			async chooseImage() {
+				let res = await this.$wxApi.chooseImage(4)
+				if (this.$isEmpty(res)) {
+					return
+				}
+				for (let path of res) {
+					let url = (await this.$http.uploadFile(path)).data.data.link
+					this.base64_image.push(url)
+					this.imgList.push(url)
+				}
+				return
+
+
+				let that = this
 				uni.chooseImage({
-					count: 4-this.imgList.length, 
-					sizeType: ['original', 'compressed'], 
+					count: 4 - this.imgList.length,
+					sizeType: ['original', 'compressed'],
 					sourceType: ['album'],
 					success: (res) => {
 						const tempFilePaths = res.tempFilePaths;
@@ -262,17 +274,18 @@
 							that.imgList.push(tempFilePaths[index])
 							//图片转为base64的图片
 							uni.getFileSystemManager().readFile({
-							  filePath: tempFilePaths[index],
-							  //选择图片返回的相对路径
-							  encoding: 'base64',
-							  //编码格式
-							  success: res => {
-							    //成功的回调
-							    that.base64_image.push('data:image/jpeg;base64,' + res.data)
-							  }
+								filePath: tempFilePaths[index],
+								//选择图片返回的相对路径
+								encoding: 'base64',
+								//编码格式
+								success: res => {
+									//成功的回调
+									that.base64_image.push('data:image/jpeg;base64,' + res
+										.data)
+								}
 							});
 						}
-					
+
 					}
 				});
 			},
@@ -293,7 +306,7 @@
 					success: res => {
 						if (res.confirm) {
 							this.imgList.splice(index, 1)
-							this.base64_image.splice(index,1)
+							this.base64_image.splice(index, 1)
 						}
 					}
 				})
@@ -303,19 +316,22 @@
 </script>
 
 <style lang="scss">
-	.bg-gray{
+	.bg-gray {
 		background-color: #f7f7f7;
 	}
-	.card{
+
+	.card {
 		margin: 18rpx;
 		border-radius: 20rpx;
 		box-sizing: border-box;
 		background-color: #FFFFFF;
 	}
-	.card .form{
+
+	.card .form {
 		padding: 23rpx;
 	}
-	.need{
+
+	.need {
 		font-size: 38rpx;
 		font-weight: 800;
 		color: #ff0000;

+ 385 - 453
pages/uploadFace/uploadFace.vue

@@ -1,463 +1,395 @@
 <template>
-<view>
-	<view class="" v-if="vuex_appletType==1">
-		<view>
-		  <view class="cu-list menu" @click="locationShow=true">
-		  	<view class="cu-item" >
-		  		<view class="content">
-		  			<text >我的房屋</text>
-		  		</view>
-		  		<view class="action">
-		  			<text >{{selectLabel?selectLabel:list[0].roomName}}</text>
-		  			<text class="cuIcon-right padding-left-10"></text>
-		  		</view>
-		  	</view>
-		  </view>
-		</view>
-		
-		<view class="upload_container">
-		  <view>
-			  <view @click="show=true"  style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
-			    <upload-img
-			  	  :width="$isEmpty(face_url)?300:560"
-			  	  :height="$isEmpty(face_url)?300:420"
-			  	  :currentImage="face_url"
-				  bgsrc="http://139.9.103.171:1888/img/image/camera1.png"
-			  	  >
-			    </upload-img>
-			    <view class="" style="color: #59a5f0;">
-			  	 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
-			  	 <text v-if="$isEmpty(face_url)">点击上传人脸</text>
-			  	 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
-			    </view>
-			  </view>
-		  </view>
-		</view>
-		<view class="category">
-		  <view v-for="(item, index) in iconArray" :key="index" class="category_item">
-		    <view class="category_item_wrap" @tap="top" :data-index="item.index">
-		      <view class="icon_wrap">
-		        <image :src="item.iconUrl" class="index_icon"></image>
-		      </view>
-		      <view class="category_item_text">
-		        <text>{{item.iconText}}</text>
-		      </view>
-		    </view>
-		  </view>
-		</view>
-		<canvas canvas-id="photo_canvas" :style="'width:' + canvasWidth + 'px;height:' + canvasHeight + 'px;position: absolute;left:-300px;top:-300px;'"></canvas>
-		<view @tap="uploadFace" class=" footer-fixed" >
-			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
-				提交人脸信息
+	<view>
+		<view class="" v-if="vuex_appletType==1">
+			<view>
+				<view class="cu-list menu" @click="locationShow=true">
+					<view class="cu-item">
+						<view class="content">
+							<text>我的房屋</text>
+						</view>
+						<view class="action">
+							<text>{{selectLabel?selectLabel:list[0].roomName}}</text>
+							<text class="cuIcon-right padding-left-10"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="upload_container">
+				<view>
+					<view @click="show=true"
+						style="margin: 30rpx 0 10rpx 0;display: flex;align-items: center;flex-direction: column;">
+						<upload-img :width="$isEmpty(face_url)?300:560" :height="$isEmpty(face_url)?300:420"
+							:currentImage="face_url"
+							bgsrc="https://szsq.nxzhsq.cn/community/miniofile/image/camera1.png">
+						</upload-img>
+						<view class="" style="color: #59a5f0;">
+							<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+							<text v-if="$isEmpty(face_url)">点击上传人脸</text>
+							<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+						</view>
+					</view>
+				</view>
 			</view>
+			<view class="category">
+				<view v-for="(item, index) in iconArray" :key="index" class="category_item">
+					<view class="category_item_wrap" :data-index="item.index">
+						<view class="icon_wrap">
+							<image :src="item.iconUrl" class="index_icon"></image>
+						</view>
+						<view class="category_item_text">
+							<text>{{item.iconText}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<canvas canvas-id="photo_canvas"
+				:style="'width:' + canvasWidth + 'px;height:' + canvasHeight + 'px;position: absolute;left:-300px;top:-300px;'"></canvas>
+			<view @tap="uploadFace" class=" footer-fixed">
+				<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
+					提交人脸信息
+				</view>
+			</view>
+			<u-select z-index="9999999" mode="single-column" value-name="id" label-name="roomName"
+				v-model="locationShow" :list="list" @confirm="roomChange"></u-select>
+			<u-action-sheet @click="photoChecked" z-index="999999" :list="actionList" v-model="show"></u-action-sheet>
+		</view>
+
+		<view v-else>
+
 		</view>
-		<u-select z-index="9999999"  mode="single-column" value-name="id"  label-name="roomName" v-model="locationShow" :list="list" @confirm="roomChange"></u-select>
-		<u-action-sheet @click="photoChecked"  z-index="999999" :list="actionList" v-model="show"></u-action-sheet>
-	</view>
-	
-	<view v-else >
-		
 	</view>
-</view>
 </template>
 
 <script>
-import uploadImg from '@/comps/uploadimg/uploadImg.vue'
-//获取app实例
-var app = getApp();
-
-export default {
-  components:{
-	  uploadImg
-  },
-  data() {
-    return {
-	  appletType:0,
-		
-	  //显示模态框
-	  locationShow:false,
-	  selectLabel:'',
-		
-	  //上传人脸
-	  actionList: [{
-	  	text: '相册上传',
-	  }, {
-	  	text: '拍照上传'
-	  }],
-	  show: false,
-		
-      face_url: null,
-      //人脸图片地址
-      face_image: null,
-      //人脸图片的base64字符串
-      list: null,
-      //住户信息列表
-      index: null,
-      //当前显示住户信息下标
-      iconArray: [{
-        "iconUrl": "http://139.9.103.171:1888/img/image/zd.png",
-        "iconText": '不要遮挡',
-        "index": 1
-      }, {
-        "iconUrl": "http://139.9.103.171:1888/img/image/mj.png",
-        "iconText": '不戴墨镜',
-        "index": 2
-      }, {
-        "iconUrl": "http://139.9.103.171:1888/img/image/zl.png",
-        "iconText": '不能仰头俯拍',
-        "index": 3
-      }, {
-        "iconUrl": "http://139.9.103.171:1888/img/image/cz.png",
-        "iconText": '光线充足',
-        "index": 4
-      }, {
-        "iconUrl": "http://139.9.103.171:1888/img/image/bg.png",
-        "iconText": '浅色背景',
-        "index": 5
-      }, {
-        "iconUrl": "http://139.9.103.171:1888/img/image/sh.png",
-        "iconText": '物业审核生效',
-        "index": 6
-      }]
-
-    };
-  },
-  onShow() {
-	 if (this.vuex_appletType==0) {
-	 	uni.setNavigationBarTitle({
-	 		title:"功能待开发"
-	 	})
-	 }else{
-	 	uni.setNavigationBarTitle({
-	 		title:"上传人脸"
-	 	})
-	 }
-  	//获取当前页面的对象
-  	let currPage=this.$util.getPageCtx()
-  	if(!this.$isEmpty(currPage.data.image)){
-  		this.handelImg(currPage.data.image)
-  	} 
-  },
-  components: {},
-  props: {},
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-    this.getFaceImg();
-  },
-  onShow() {
-  	this.getAppletType()
-  },
-  methods: {
-	  //获取小程序是否已经审核通过,通过就开放人脸
-	  getAppletType: function () {
-	    var that = this;
-	      uni.login({
-	        success: res => {
-	          let params = {};
-	          params['js_code'] = res.code;
-	  		params['name'] = 'community';
-	          let operation = 'miniprogram/getOpenid'; //发起请求
-	          app.globalData.postRequest(params, operation, function (res) {
-	            //获取成功
-	            if (res.data.result_code == 1) {
-	  			uni.setStorageSync("appletType", res.data.appletType);
-				that.appletType=res.data.appletType
-	  			that.$u.vuex('vuex_appletType',res.data.appletType)
-	            } 
-	          });
-	        }
-	      });
-	  },
-	  //点击模态框选项触发
-	  photoChecked(index){
-		if (index==0) {
-			//图片上传
-			this.chooseImage()
-		} else if(index==1){
-			//拍照上传
-			uni.navigateTo({
-				url:"../my-camera/my-camera"
-			})
+	import uploadImg from '@/comps/uploadimg/uploadImg.vue'
+	//获取app实例
+	var app = getApp();
+
+	export default {
+		components: {
+			uploadImg
+		},
+		data() {
+			return {
+				appletType: 0,
+
+				//显示模态框
+				locationShow: false,
+				selectLabel: '',
+
+				//上传人脸
+				actionList: [{
+					text: '相册上传',
+				}, {
+					text: '拍照上传'
+				}],
+				show: false,
+
+				face_url: null,
+				//人脸图片地址
+				face_image: null,
+				//人脸图片的base64字符串
+				list: null,
+				//住户信息列表
+				index: null,
+				//当前显示住户信息下标
+				iconArray: [{
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zd.png",
+					"iconText": '不要遮挡',
+					"index": 1
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/mj.png",
+					"iconText": '不戴墨镜',
+					"index": 2
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/zl.png",
+					"iconText": '不能仰头俯拍',
+					"index": 3
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/cz.png",
+					"iconText": '光线充足',
+					"index": 4
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/bg.png",
+					"iconText": '浅色背景',
+					"index": 5
+				}, {
+					"iconUrl": "https://szsq.nxzhsq.cn/community/miniofile/image/sh.png",
+					"iconText": '物业审核生效',
+					"index": 6
+				}]
+
+			};
+		},
+		onShow() {
+			if (this.vuex_appletType == 0) {
+				uni.setNavigationBarTitle({
+					title: "功能待开发"
+				})
+			} else {
+				uni.setNavigationBarTitle({
+					title: "上传人脸"
+				})
+			}
+			//获取当前页面的对象
+			let currPage = this.$util.getPageCtx()
+			if (!this.$isEmpty(currPage.data.image)) {
+				this.handelImg(currPage.data.image)
+			}
+		},
+		components: {},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			this.getFaceImg();
+		},
+		onShow() {
+			this.getAppletType()
+		},
+		methods: {
+			//获取小程序是否已经审核通过,通过就开放人脸
+			getAppletType: function() {
+				uni.login({
+					success: res => {
+						let params = {};
+						params['js_code'] = res.code;
+						params['name'] = 'community';
+						this.$http.getOpenid(params).then(res => {
+							//获取成功
+							if (res.data.result_code == 1) {
+								uni.setStorageSync("appletType", res.data.appletType);
+								this.appletType = res.data.appletType
+								this.$u.vuex('vuex_appletType', res.data.appletType)
+							}
+						})
+					}
+				});
+			},
+			//点击模态框选项触发
+			photoChecked(index) {
+				if (index == 0) {
+					//图片上传
+					this.chooseImage()
+				} else if (index == 1) {
+					//拍照上传
+					uni.navigateTo({
+						url: "../my-camera/my-camera"
+					})
+				}
+			},
+			//选择房间
+			roomChange: function(e) {
+				// 选中的房屋 id
+				let id = e[0].value
+				//选中的房屋名字
+				this.selectLabel = e[0].label
+				//选中的房屋列表的下标
+				this.index = this.list.findIndex(value => value.id === id)
+				this.face_url=this.list[this.index].faceUrl
+			},
+			//获取住户人脸
+			getFaceImg: function() {
+				let params = {
+					memberId: app.globalData.member.id,
+					residentialId: uni.getStorageSync("residentialId")
+				};
+				this.$http.getHouseUser(params).then(res => {
+					if (this.$isNotEmpty(res.data.data)) {
+						this.list = res.data.data;
+						this.face_url = this.list[0].faceUrl
+						this.index = 0
+					}
+				})
+			},
+			//点击上传图片事件
+			chooseImage() {
+				uni.chooseImage({
+					count: 1,
+					//最多可以选择的图片张数,默认9
+					sourceType: ['album', 'camera'],
+					sizeType: ['compressed'],
+					//可选择原图或压缩后的图片
+					success: res => {
+						this.handelImg(res.tempFilePaths[0])
+					}
+				});
+			},
+			//处理照片,拍照上传和相册上传的共同处理方法
+			handelImg(imgUrl) {
+				this.$http.uploadFile(imgUrl).then(res => {
+					this.face_url = res.data.data.link
+					console.log(this.face_url);
+				})
+			},
+			//上传用户faceImg
+			uploadFace: function() {
+				let data= this.list[this.index]
+				data.faceUrl=this.face_url
+				if (this.$isEmpty(this.face_url)) {
+					this.$u.toast('请上传人脸')
+					return
+				}
+				this.$http.editFamily(data).then(res => {
+					if (res.data.success) {
+						this.$u.toast('修改成功')
+					} else {
+						this.$u.toast('修改失败')
+					}
+
+				});
+			}
 		}
-	  },
-    //选择房间
-    roomChange: function (e) {
-	   // 选中的房屋 id
-	   let id=e[0].value
-	   //选中的房屋名字
-	   this.selectLabel=e[0].label
-	   //选中的房屋列表的下标
-	   let index= this.list.findIndex(value => value.id===id)
-      let list = this.list;
-      // let index = e.detail.value;
-      let url = list[index].imageUri;
-      console.log(url);
-      this.setData({
-        index: index,
-        face_url: list[index].imageUri
-      });
-    },
-    //获取住户人脸
-    getFaceImg: function () {
-      let that = this;
-      let params = {};
-      params['member_id'] = app.globalData.member.id;
-      let operation = 'user/getMyUserByMemberId';
-      app.globalData.postRequest(params, operation, function (res) {
-        console.info("查询结果:" + res.data.result_msg); //获取成功
-
-        if (res.data.result_code == 1) {
-          // let list = res.data.list;
-          console.log(res.data.list);
-          let list = [];
-          if (uni.getStorageSync('plotName')) {
-            res.data.list.map(item => {
-              if (item.residentialName == uni.getStorageSync('plotName')) {
-                list.push(item);
-              }
-            });
-          } else {
-            list = res.data.list;
-          }
-
-
-          that.setData({
-            face_url: list[0].imageUri,
-            list: list,
-            index: 0
-          });
-        }
-      });
-    },
-    //点击上传图片事件
-    chooseImage: function () {
-      var that = this;
-      uni.chooseImage({
-        count: 1,
-        //最多可以选择的图片张数,默认9
-        sourceType: ['album', 'camera'],
-        sizeType: ['compressed'],
-        //可选择原图或压缩后的图片
-        success: res => {
-          that.handelImg(res.tempFilePaths[0])
-        }
-      });
-    },
-	//处理照片,拍照上传和相册上传的共同处理方法
-	handelImg(imgUrl){
-		var that = this;
-		that.setData({
-		  //图片回显
-		  face_url: imgUrl
-		});
-		uni.getFileSystemManager().readFile({
-		  filePath: imgUrl,
-		  //选择图片返回的相对路径
-		  encoding: 'base64',
-		  //编码格式
-		  success: res => {
-		    //成功的回调
-		    console.log(res);
-		    that.setData({
-		      //图片的base64字符串
-		      face_image: 'data:image/jpeg;base64,' + res.data
-		    });
-		  }
-		});
-	},
-	
-    //上传用户faceImg
-    uploadFace: function () {
-      let that = this;
-      let params = {};
-      let index = that.index; //let index = 0;
-
-      let user = that.list[index];
-      let user_id = user.id;
-      params['user_id'] = user_id;
-      let tel = user.tel;
-      params['tel'] = tel;
-      let type = user.type;
-      params['type'] = type;
-      let id_card = user.idCard;
-      params['id_card'] = id_card;
-      let sex = user.sex; //性别
-
-      params['sex'] = sex;
-      let nationality = user.nationality;
-      params['nationality'] = nationality;
-      let face_image = this.face_image;
-
-      if (face_image) {
-        params['face_image_base64'] = that.face_image;
-      }else{
-		  if(!this.$isEmpty(this.face_url)){
-			  app.globalData.autoFailHint("请重新上传人脸图片");
-			  return;
-		  }else{
-			  app.globalData.autoFailHint("请上传人脸图片");
-			  return;
-		  }
-	  }
-      params['member_id'] = app.globalData.member.id; //申请来源0-小程序添加 1-后台添加  2-后台导入 3-app添加
-
-      params['create_type'] = '0';
-      // let operation = 'user/editUser';
-      that.$http.editFamily(params).then(res =>{
-		  if (res.data.result_code == 1) {
-		    app.globalData.oneFailHint(res.data.result_msg, function () {
-		      uni.redirectTo({
-		        url: '/pages/uploadFace/uploadFace'
-		      });
-		    });
-		  } else {
-		    app.globalData.oneFailHint(res.data.result_msg);
-		  }
-        
-      });
-    }
-  }
-};
+	};
 </script>
 <style lang="scss">
-/* pages/ uploadFace/uploadFace.wxss */
-page{
-   background: #fff;
-}
-.upload_container {
-  text-align: center;
-  color: #333;
-  background: #fff;
-  border-radius: 10rpx;
-}
-
-.upload_bg {
-  position: relative;
-}
-
-.upload_bg .upload_btn {
-  width: 120rpx;
-  height: 120rpx;
-  position: absolute;
-  left: 50%;
-  top: 40%;
-  margin-left: -65rpx;
-  margin-top: -60rpx;
-}
-
-.upload_bg .upload_btn image {
-  width: 100%;
-  height: 100%;
-}
-
-.upload_text {
-  position: absolute;
-  top: 55%;
-  width: 100%;
-  color: $base-btn-color;
-}
-
-.img_content {
-  margin-top: 20rpx;
-  position: relative;
-  text-align: center;
-}
-
-.img_content .upload_bgImg {
-  width: 560rpx;
-  height: 420rpx;
-  max-height: 1;
-  display: inline-block;
-  border-radius: 20rpx;
-}
-
-.reUpload {
-display: flex;
-justify-content: flex-end;
-align-items: center;
-  height: 60rpx;
-  line-height: 60rpx;
-  color: #333;
-  padding-right: 40rpx;
-}
-
-.img_content .img_icon {
-  width: 40rpx;
-  height: 40rpx;
-  vertical-align: text-top;
-  margin-right: 6rpx;
-  border-radius: 20rpx;
-}
-.tips{
-  height: 80rpx;
-  line-height: 80rpx;
-  padding-left:30rpx;
-  background-color: #f5f5f5;
-  color:#777;
-}
-.category {
-  padding:20px 20rpx 0;
-  overflow: auto;
-  background-color: #FFF;
-text-align:center;
-
-}
-.category_item {
-  width: 33.3%;
-  float: left;
-  margin-bottom: 40rpx;
-}
-.icon_wrap {
-  width: 120rpx;
-  margin: 0 auto;
-  margin-bottom: 5px;
-}
-.index_icon {
-  width: 60rpx;
-  height: 60rpx;
-}
-.category_item_text {
-  text-align: center;
-  font-size: 24rpx;
-  color: #999;
-}
-.form_group {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  margin: 20rpx 20rpx;
-  line-height: 100rpx;
-  position: relative;
-  font-size: 26rpx;
-  border-bottom: 2rpx solid #ddd;
-  
-}
-.my-item .iconfont.arrow {
-  position: absolute;
-  right: 0;
-  top: 50%;
-  transform: translate(0, -50%);
-  font-size: 32rpx;
-  vertical-align: top;
- 
-}
-.my-item {
-  width: 100%;
-  position: relative;
-  background: #fff;
-  font-size: 28rpx;
-  box-sizing: border-box;
-}
-
-.my-item .status {
-  position: absolute;
-  right: 35rpx;
-  top: 50%;
-  transform: translate(0, -50%);
-  font-size: 28rpx;
-}
-</style>
+	/* pages/ uploadFace/uploadFace.wxss */
+	page {
+		background: #fff;
+	}
+
+	.upload_container {
+		text-align: center;
+		color: #333;
+		background: #fff;
+		border-radius: 10rpx;
+	}
+
+	.upload_bg {
+		position: relative;
+	}
+
+	.upload_bg .upload_btn {
+		width: 120rpx;
+		height: 120rpx;
+		position: absolute;
+		left: 50%;
+		top: 40%;
+		margin-left: -65rpx;
+		margin-top: -60rpx;
+	}
+
+	.upload_bg .upload_btn image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.upload_text {
+		position: absolute;
+		top: 55%;
+		width: 100%;
+		color: $base-btn-color;
+	}
+
+	.img_content {
+		margin-top: 20rpx;
+		position: relative;
+		text-align: center;
+	}
+
+	.img_content .upload_bgImg {
+		width: 560rpx;
+		height: 420rpx;
+		max-height: 1;
+		display: inline-block;
+		border-radius: 20rpx;
+	}
+
+	.reUpload {
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		height: 60rpx;
+		line-height: 60rpx;
+		color: #333;
+		padding-right: 40rpx;
+	}
+
+	.img_content .img_icon {
+		width: 40rpx;
+		height: 40rpx;
+		vertical-align: text-top;
+		margin-right: 6rpx;
+		border-radius: 20rpx;
+	}
+
+	.tips {
+		height: 80rpx;
+		line-height: 80rpx;
+		padding-left: 30rpx;
+		background-color: #f5f5f5;
+		color: #777;
+	}
+
+	.category {
+		padding: 20px 20rpx 0;
+		overflow: auto;
+		background-color: #FFF;
+		text-align: center;
+
+	}
+
+	.category_item {
+		width: 33.3%;
+		float: left;
+		margin-bottom: 40rpx;
+	}
+
+	.icon_wrap {
+		width: 120rpx;
+		margin: 0 auto;
+		margin-bottom: 5px;
+	}
+
+	.index_icon {
+		width: 60rpx;
+		height: 60rpx;
+	}
+
+	.category_item_text {
+		text-align: center;
+		font-size: 24rpx;
+		color: #999;
+	}
+
+	.form_group {
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		margin: 20rpx 20rpx;
+		line-height: 100rpx;
+		position: relative;
+		font-size: 26rpx;
+		border-bottom: 2rpx solid #ddd;
+
+	}
+
+	.my-item .iconfont.arrow {
+		position: absolute;
+		right: 0;
+		top: 50%;
+		transform: translate(0, -50%);
+		font-size: 32rpx;
+		vertical-align: top;
+
+	}
+
+	.my-item {
+		width: 100%;
+		position: relative;
+		background: #fff;
+		font-size: 28rpx;
+		box-sizing: border-box;
+	}
+
+	.my-item .status {
+		position: absolute;
+		right: 35rpx;
+		top: 50%;
+		transform: translate(0, -50%);
+		font-size: 28rpx;
+	}
+</style>

+ 105 - 112
pages/wode/feedback/feedback.vue

@@ -5,15 +5,19 @@
 				<text>请选择您要反馈的问题类型:</text>
 			</view>
 
-			<radio-group  class="block" @change="RadioChange">
+			<radio-group class="block" @change="RadioChange">
 				<view class="radioBox">
-					<view class="radioItem" :class="data.type==item.type?'checkBorder':'defalutBorder'" v-for="(item,index) in typeList" :key="index">
-						<label class="flex" >
+					<view class="radioItem" :class="data.feedbackType==item.feedbackType?'checkBorder':'defalutBorder'"
+						v-for="(item,index) in typeList" :key="index">
+						<label class="flex">
 							<view class="">
-								<radio  style="transform: scale(.7);"  class="round blue" :class="data.type===item.type?'checked':''" :checked="data.type==item.type?true:false"
-								 :value="item.type"></radio>
+								<radio style="transform: scale(.7);" class="round blue"
+									:class="data.feedbackType===item.feedbackType?'checked':''"
+									:checked="data.feedbackType==item.feedbackType?true:false"
+									:value="item.feedbackType"></radio>
 							</view>
-							<view class="text-left padding-left-20 flex" style="flex-direction: column;justify-content: center;">
+							<view class="text-left padding-left-20 flex"
+								style="flex-direction: column;justify-content: center;">
 								{{item.title}}
 							</view>
 						</label>
@@ -21,10 +25,11 @@
 				</view>
 			</radio-group>
 			<view class="area">
-				<view >
-					<textarea @input="input" :value="data.question"  maxlength="120"  placeholder="请描述您的问题,以便我们尽快为您处理"></textarea>
-					<view  class="text-right text-df text-gray padding-bottom-10">
-						{{data.question.length}} / 120
+				<view>
+					<textarea @input="input" :value="data.content" maxlength="120"
+						placeholder="请描述您的问题,以便我们尽快为您处理"></textarea>
+					<view class="text-right text-df text-gray padding-bottom-10">
+						{{data.content.length}} / 120
 					</view>
 				</view>
 				<view class="imgArea">
@@ -32,10 +37,10 @@
 						<text class="">请提供相关问题的截图或照片(最多四张)</text>
 					</view>
 					<view class="cu-form-group" style="padding: 20rpx 0 0 0;">
-						<view class="grid col-3 grid-square flex-sub">
-							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @click="viewImage(index)" >
-							 <image :src="imgList[index]" mode="aspectFill"></image>
-								<view class="cu-tag bg-red" @click.stop="DelImg(index)" >
+						<view class="grid col-4 grid-square flex-sub">
+							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @click="viewImage(index)">
+								<image :src="imgList[index]" mode="aspectFill"></image>
+								<view class="cu-tag bg-red" @click.stop="DelImg(index)">
 									<text class='cuIcon-close'></text>
 								</view>
 							</view>
@@ -46,10 +51,10 @@
 					</view>
 					<!-- <u-upload @on-choose-complete="chooseImage" :auto-upload="false" width="194" height="194" :action="action" max-count="4" :file-list="fileList" ></u-upload> -->
 				</view>
-				
+
 			</view>
 			<view class="bg-white" style="height: 150rpx;">
-				
+
 			</view>
 		</view>
 		<view class="bg-white margin-top-20 footer-fixed  " @click="sumit">
@@ -57,7 +62,7 @@
 				<button class="radius cu-btn base-bg-color" style="padding: 45rpx;">提交反馈</button>
 			</view>
 		</view>
-		
+
 	</view>
 </template>
 
@@ -67,115 +72,95 @@
 		data() {
 			return {
 				//图片回显
-				imgList:[],
-				data:{
-					member_id:'',
-					question:'',
-					image_base64:[],
-					type:"1",
+				imgList: [],
+				data: {
+					openId: '',
+					phone: '',
+					content: '',
+					name: '',
+					images: '',
+					member_id: '',
+					feedbackType: "0",
+					residentialId: '',
+					tenantType: 1
 				},
 				//选择项列表
-				typeList:[
-					{
-						title:'功能异常:功能故障或不可用',
-						type:'1'
-					},
-					{
-						title:'产品建议:用的不爽,我有建议',
-						type:'2'
-					},
-					{
-						title:'安全密码:密码,故障等',
-						type:'3'
+				typeList: [{
+						title: '功能异常:功能故障或不可用',
+						feedbackType: '0'
 					},
 					{
-						title:'商户终端异常:无法支付,支付慢等',
-						type:'4'
+						title: '产品建议:用的不爽,我有建议',
+						feedbackType: '1'
 					},
 					{
-						title:'其他问题',
-						type:'5'
+						title: '其他问题',
+						feedbackType: '2'
 					},
 				],
 			}
 		},
 		methods: {
 			//选择反馈类型
-			RadioChange(e){
-				this.data.type=e.detail.value
+			RadioChange(e) {
+				this.data.feedbackType = e.detail.value
 			},
 			/**输入问题描述
 			 * @param {Object} e
 			 */
-			input(e){
-				this.data.question=e.detail.value
+			input(e) {
+				this.data.content = e.detail.value
 			},
-			sumit(){
-				if (this.$isEmpty(this.data.question)) {
+			sumit() {
+				if (this.$isEmpty(this.data.content)) {
 					uni.showToast({
-						title:"问题描述不能为空",
-						icon:"none"
+						title: "问题描述不能为空",
+						icon: "none"
 					})
 					return
 				}
-				if (this.data.question.length<3) {
+				if (this.data.content.length < 3) {
 					uni.showToast({
-						title:"问题描述不能少于三个字",
-						icon:"none"
+						title: "问题描述不能少于三个字",
+						icon: "none"
 					})
 					return
 				}
-				if (this.$isEmpty(this.data.image_base64)) {
+				if (this.$isEmpty(this.imgList)) {
 					uni.showToast({
-						title:"请提供相关截图",
-						icon:"none"
+						title: "请提供相关截图",
+						icon: "none"
 					})
 					return
 				}
-				this.data.member_id=app.globalData.member.id
-				console.log(this.data)
-				let operation='userFeedback/addFeedback'
-				app.globalData.postRequest(this.data, operation, function (res) {
-				  if (res.data.result_code == 1) {
-				    app.globalData.oneFailHint(res.data.result_msg, function () {
-				      uni.switchTab({
-				      	url:"../wode"
-				      })
-				    });
-				  } else {
-				    app.globalData.oneFailHint(res.data.result_msg);
-				  }
-				});
+				this.data.member_id = app.globalData.member.id
+				this.data.openId = uni.getStorageSync('openid') || ''
+				this.data.phone = uni.getStorageSync('myPhone') || ''
+				this.data.name = app.globalData.member.name
+				this.data.images = this.imgList.join(',')
+				this.data.residentialId = uni.getStorageSync('residentialId') || ''
+				this.$http.feedback(this.data).then(res => {
+					if (res.data.success) {
+						this.$dialog.showModal('提交成功', false).then(() => {
+							uni.switchTab({
+								url: "../wode"
+							})
+						})
+					} else {
+						this.$u.toast('提交失败')
+					}
+				})
+
 			},
 			/**
 			 * 上传问题截图
 			 */
-			chooseImage() {
-				let that=this
-				uni.chooseImage({
-					count: 4-this.imgList.length, 
-					sizeType: ['original', 'compressed'], 
-					sourceType: ['album'],
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						for (let index in tempFilePaths) {
-							//图片回显
-							that.imgList.push(tempFilePaths[index])
-							//图片转为base64的图片
-							uni.getFileSystemManager().readFile({
-							  filePath: tempFilePaths[index],
-							  //选择图片返回的相对路径
-							  encoding: 'base64',
-							  //编码格式
-							  success: res => {
-							    //成功的回调
-							    that.data.image_base64.push('data:image/jpeg;base64,' + res.data)
-							  }
-							});
-						}
-					
-					}
-				});
+			async chooseImage() {
+				let paths = await this.$wxApi.chooseImage(4)
+				for (let path of paths) {
+					let url = (await this.$http.uploadFile(path)).data.data.link
+					this.imgList.push(url)
+				}
 			},
 			/*预览图片*/
 			viewImage(index) {
@@ -203,64 +188,72 @@
 </script>
 
 <style lang="scss">
-	.page{
+	.page {
 		background-color: #FFFFFF;
 		min-height: 100vh;
 	}
-	view{
+
+	view {
 		box-sizing: border-box;
 	}
-	.commit{
+
+	.commit {
 		color: #fff;
 		font-size: 28upx;
 		text-align: center;
 		line-height: 88upx;
 		margin: 0 20upx;
 		width: 690upx;
-		height:88upx;
-		background:#59a5f0;
-		border-radius:25px;
+		height: 88upx;
+		background: #59a5f0;
+		border-radius: 25px;
 		margin-bottom: 50upx;
 		position: absolute;
 		left: 0;
 		right: 0;
 		bottom: 0;
-		
+
 	}
-	.content{
+
+	.content {
 		margin: 0 26rpx;
-		.radioBox{
+
+		.radioBox {
 			padding-top: 10rpx;
-			.radioItem{
+
+			.radioItem {
 				padding: 18rpx;
 				margin-bottom: 15rpx;
 				border-radius: 10rpx;
 			}
-			.defalutBorder{
+
+			.defalutBorder {
 				border: 1rpx solid #d1d1d1;
 			}
-			.checkBorder{
+
+			.checkBorder {
 				border: 1rpx solid #59a5f0;
 				color: #59a5f0;
 			}
-			
+
 		}
-		.area{
+
+		.area {
 			margin-top: 20rpx;
 			padding: 20rpx;
 			border-radius: 12rpx;
 			border: 1rpx solid #d1d1d1;
-			
-			textarea{
+
+			textarea {
 				width: 100%;
 				line-height: 50rpx;
 			}
-			.imgArea{
+
+			.imgArea {
 				border-top: 1rpx solid #d1d1d1;
 				padding-top: 30rpx;
 			}
-			
+
 		}
 	}
-	
 </style>

+ 140 - 119
pages/wode/news/news.vue

@@ -1,125 +1,146 @@
 <template>
-<view style="background-color: #FFFFFF;min-height: 100vh;">
-<view class="nav_section" v-if="list.length>0">
-  <view v-for="(item, index) in list" :key="index" class="nav_section_items">
-    <view class="section_cont">
-      <view class="section_cont_tel">
-        <text class="title">{{item.noticeTitle}}</text>
-      </view>
-      <view class="section_cont_tel">
-        <text class="content">{{item.noticeContent}}</text>
-      </view>
-      <view class="section_cont_tel">
-        <text class="date">{{item.createDate}}</text>
-      </view>
-  
-      
-    </view>
-  </view>
-</view>
-<view class="default" v-if="list==null || list.length==0">
-  <image src="/static/common/empty.png" mode="heightFix"></image>
-  <view>
-    <text>没有消息</text>
-  </view>
-</view>
-</view>
+	<view style="background-color: #FFFFFF;min-height: 100vh;">
+		<view class="nav_section" v-if="list.length>0">
+			<view v-for="(item, index) in list" :key="index" class="nav_section_items">
+				<view class="section_cont">
+					<view class="section_cont_tel">
+						<text class="title">{{item.noticeTitle}}</text>
+					</view>
+					<view class="section_cont_tel">
+						<text class="content">{{item.noticeContent}}</text>
+					</view>
+					<view class="section_cont_tel">
+						<text class="date">{{item.createDate}}</text>
+					</view>
+
+
+				</view>
+			</view>
+		</view>
+		<view class="default" v-if="list==null || list.length==0">
+			<image src="/static/common/empty.png" mode="heightFix"></image>
+			<view>
+				<text>没有消息</text>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-var util = require("../../../utils/util.js"); //获取app实例
-//获取app实例
-var app = getApp();
-
-export default {
-  data() {
-    return {
-      list: null
-    };
-  },
-
-  components: {},
-  props: {},
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.getNotice();
-  },
-  methods: {
-    //获取公告消息
-    getNotice: function () {
-      var that = this;
-      let params = {};
-      params['member_id'] = app.globalData.member.id; //发布目标渠道  1-app 2-小程序,
-
-      params['push_target'] = 2;
-      let operation = 'member/getNotices';
-      app.globalData.postRequest(params, operation, function (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].createDate = util.formatTime(list[i].createDate);
-          }
-
-          that.setData({
-            list: list
-          });
-        }
-      });
-    }
-  }
-};
+	var util = require("../../../utils/util.js"); //获取app实例
+	//获取app实例
+	var app = getApp();
+
+	export default {
+		data() {
+			return {
+				list: null
+			};
+		},
+
+		components: {},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			this.getNotice();
+		},
+		methods: {
+			//获取公告消息
+			getNotice: function() {
+				var that = this;
+				let params = {};
+				params['member_id'] = app.globalData.member.id; //发布目标渠道  1-app 2-小程序,
+
+				params['push_target'] = 2;
+				let operation = 'member/getNotices';
+				app.globalData.postRequest(params, operation, function(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].createDate = util.formatTime(list[i].createDate);
+						}
+
+						that.setData({
+							list: list
+						});
+					}
+				});
+			}
+		}
+	};
 </script>
 <style>
-/* pages/myHome/myHome.wxss */
-page{
-  overflow-y: scroll;
-}
-.nav_section {
-  width: 100%;
-}
-
-.nav_section_items {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  padding: 30rpx;
-  border-bottom: 2rpx solid #ddd;
-  position: relative;
-  background: #fff;
-}
-
-.nav_section_items:active {
-  background: #ddd;
-}
-
-.nav_section_items .section_cont .section_cont_sub {
-  font-size: 30rpx;
-  line-height: 50rpx;
-  margin-bottom: 10rpx;
-}
-.section_cont_tel .title{
-  font-size: 28rpx;
-  color: #1f1f1f;
-}
-.section_cont_tel{
-  line-height: 60rpx;
-
-}
-.section_cont_tel .content{
-
-  font-size: 32rpx;
-  color: #080808;
-}
-.section_cont_tel .date{
-
-  font-size: 24rpx;
-  color: #868686;
-}
-
-.default {  text-align: center;  position: fixed;  left: 50%;  top: 40%;  transform: translate(-50%, -50%);}.default text{	color: #AAAAAA;}.default image {  height: 250rpx;  display: inline-block;}</style>
+	/* pages/myHome/myHome.wxss */
+	page {
+		overflow-y: scroll;
+	}
+
+	.nav_section {
+		width: 100%;
+	}
+
+	.nav_section_items {
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		padding: 30rpx;
+		border-bottom: 2rpx solid #ddd;
+		position: relative;
+		background: #fff;
+	}
+
+	.nav_section_items:active {
+		background: #ddd;
+	}
+
+	.nav_section_items .section_cont .section_cont_sub {
+		font-size: 30rpx;
+		line-height: 50rpx;
+		margin-bottom: 10rpx;
+	}
+
+	.section_cont_tel .title {
+		font-size: 28rpx;
+		color: #1f1f1f;
+	}
+
+	.section_cont_tel {
+		line-height: 60rpx;
+
+	}
+
+	.section_cont_tel .content {
+
+		font-size: 32rpx;
+		color: #080808;
+	}
+
+	.section_cont_tel .date {
+
+		font-size: 24rpx;
+		color: #868686;
+	}
+
+	.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;
+	}
+</style>

+ 854 - 0
pages/wode/wode-unlogin.vue

@@ -0,0 +1,854 @@
+<template>
+	<view >
+		<view  class="header">
+			<DtCustomBar title="我的"></DtCustomBar>
+			<view  style="display: flex;align-items: center;margin: 0 30upx;">
+				<view class="member_head_img">
+					<block v-if="isLogin">
+						<image v-if="userDetail.avatar" :src="userDetail.avatar"></image>
+						<button v-else class="avatar-wrap" open-type="getUserInfo" @getuserinfo="tapGetUserInfo" @tap.stop="() => false">
+							<image src="http://139.9.103.171:8888/group1/M00/00/01/iwlnq1_AYZqAb30pAAAQNvkj3Wk302.png"></image>
+						</button>
+					</block>
+					<image v-else src="http://139.9.103.171:8888/group1/M00/00/01/iwlnq1_AYZqAb30pAAAQNvkj3Wk302.png"></image>
+				</view>
+				<view v-if="isLogin" class="member_info">
+					<view class="member_name_box" style="margin-bottom: 20rpx;">
+						<view class="member_name">{{ username }}</view>
+					</view>
+					<view class="member_phone_box">
+						<!-- <view class="member_phone">{{shopPhone}}</view> -->
+					</view>
+				</view>
+				<view v-else class="no_login" @tap="showLogin"><button class="no_login_btn">游客(未登录)</button></view>
+				<view style="flex:1"></view>
+			</view>
+			<view style="display: flex;margin: 22upx 64upx 0;justify-content: space-between;">
+				<view  @tap="tapHeadMenu(0)" style="text-align: center;">
+					<view style="font-size: 28upx;color: #fff;">{{dataDetail.couponNum?dataDetail.couponNum:0}}</view>
+					<view style="font-size: 24upx;color: #fff;margin-top: 10upx;">我的优惠券</view>
+				</view>
+				<view  @tap="tapHeadMenu(1)" style="text-align: center;">
+					<view style="font-size: 28upx;color: #fff;">{{dataDetail.favoriteNum?dataDetail.favoriteNum:0}}</view>
+					<view style="font-size: 24upx;color: #fff;margin-top: 10upx;">收藏商品</view>
+				</view>
+				<view  @tap="tapHeadMenu(2)" style="text-align: center;">
+					<view style="font-size: 28upx;color: #fff;">{{dataDetail.browseNum?dataDetail.browseNum:0}}</view>
+					<view style="font-size: 24upx;color: #fff;margin-top: 10upx;">浏览记录</view>
+				</view>
+			</view>
+			<view class="mine_order_statue">
+				<view class="cu-list grid col-5 no-border margin-top-sm" >
+					<view class="cu-item" @click="tapToMenu(item.index)" v-for="(item,index) in gridList" :key="index">
+						<view class="grid-icon ">
+							<image style="width: 56rpx;height: 56rpx;"  :src="item.icon"/>
+						</view>
+						<view class="cu-tag bg-orange badge" v-if="item.badge>0">{{item.badge}}</view>
+						<text style="font-size: 22rpx;font-family:Sans-serif">{{item.title}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="item_list" >
+				<view class="item">
+					<text style="font-size: 32rpx;">个人设置</text>
+				</view>
+				<view class="item" v-for="(item, index) in mineItemList" :key="index" @tap="tapToMenu(item.index)">
+					<view class="item_content">
+						<image :src="item.itemIcon"></image>
+						<text>{{ item.itemName }}</text>
+					</view>
+					<view class="">
+						<text v-if="index==0" style="padding-right: 16rpx;font-size: 26rpx;" class="text-red">{{authStatus}}</text>
+						<image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
+					</view>
+				</view>
+			</view>
+			<view class="item_list" >
+				<view class="item">
+					<text style="font-size: 32rpx;">系统设置</text>
+				</view>
+				<view class="item" v-for="(item, index) in systemItemList" :key="index" @tap="tapToMenu(item.index)">
+					<view class="item_content">
+						<image :src="item.itemIcon"></image>
+						<text>{{ item.itemName }}</text>
+					</view>
+					<view class="">
+						<image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
+					</view>
+				</view>
+			</view>
+			<view class="bg-white" style="80rpx">
+				
+			</view>
+		</view>
+		<!-- 微信客服 -->
+		<DtService />
+
+		<DtLogin ref="dialogLogin" @signIn="onSignIn" />
+	</view>
+</template>
+
+<script>
+var app=getApp()
+import DtLogin from '../../comps/dt_login.vue';
+import DtService from '../../comps/dt_service.vue';
+import DtCustomBar from '../../comps/dt_custom_bar.vue'
+export default {
+	components: {
+		DtLogin,
+		DtService,
+		DtCustomBar
+	},
+	data() {
+		return {
+			height:'',
+			//todo
+			gridList:[
+				{
+					icon:'../../static/wode/order.png',
+					title:"商城订单",
+					badge:0,
+					index:1
+				},
+				{
+					icon:'../../static/wode/cart.png',
+					title:"购物车",
+					badge:0,
+					index:2
+				},
+				{
+					icon:'../../static/wode/wuye.png',
+					title:"我的报修",
+					badge:0,
+					index:3
+				},
+				{
+					icon:'../../static/wode/jiaofei1.png',
+					title:"物业缴费",
+					badge:0,
+					index:5
+				},
+				{
+					icon:'../../static/wode/contact.png',
+					title:"联系物业",
+					badge:0,
+					index:4
+				}
+				
+			],
+			isFirst:false,
+			//社区 begin
+			userInfo: null,
+			//微信用户信息
+			state: null,
+			anyHousePass: false,
+			//社区end
+			mineItemList: [
+				{
+					itemName: '住户认证',
+					itemIcon: '/static/wode/renzheng.png',
+					index:6
+				},
+				{
+					itemName: '通行人脸',
+					itemIcon: '/static/wode/face.png',
+					index:7
+				},
+				// {
+				// 	itemName: '身份信息',
+				// 	itemIcon: '/static/wode/shenfen.png',
+				// 	index:8
+				// },
+				{
+					itemName: '收货地址',
+					itemIcon: '/static/wode/address.png',
+					index:9
+				},
+				{
+					itemName: '出入记录',
+					itemIcon: '/static/wode/chuxing.png',
+					index:13
+				},
+			],
+			systemItemList:[
+				{
+					itemName: '问题反馈',
+					itemIcon: '/static/wode/fankui.png',
+					index:10
+				},
+				{
+					itemName: '帮助中心',
+					itemIcon: '/static/wode/shuoming.png',
+					index:11
+				},
+				{
+					itemName: '设置',
+					itemIcon: '/static/wode/setting.png',
+					index:12
+				}
+			],
+			//商城绑定的手机号
+			shopPhone:'',
+			memberId: '',
+			dataDetail: {},
+			orderStatusNum: {},
+			userDetail: {},
+			isLogin: false,
+		};
+	},
+	computed: {
+		authStatus:{
+			  get(){
+				  if(this.state==0 && this.anyHousePass==false){
+					  return "未认证"
+				  }else if(this.state==1&&this.anyHousePass==false){
+					  return "待审核"
+				  }else if(this.state==2 ||this.anyHousePass==true){
+					  return "已认证"
+				  }else{
+					  return "未注册"
+				  }
+			  }
+		},
+		username:{
+			get(){
+				if (this.$isEmpty(getApp().globalData.member)) {
+					if (this.$isEmpty(this.userDetail.username)) {
+						return this.shopPhone
+					}else{
+						return this.userDetail.username
+					}
+				}else{
+					return getApp().globalData.member.name
+				}
+			}
+		}
+	},
+	methods: {
+		async tapGetUserInfo(e) {
+			console.log(158, e);
+			if (e.detail.errMsg == 'getUserInfo:ok') {
+				let userInfo = e.detail.userInfo;
+				let resp = await this.$api.updateIcon({
+					_isShowLoading: true,
+					userId: this.memberId,
+					avatar: userInfo.avatarUrl
+				});
+				this.userDetail.avatar = userInfo.avatarUrl;
+			}
+		},
+		showLogin() {
+			this.$refs.dialogLogin.show();
+		},
+		onSignIn(resp) {
+			this.shopPhone=this.$auth.getMineBase().user.mobile || ''
+			console.log(143, resp);
+			this.onPullDownRefreshPage();
+		},
+		tapToWhich(aimUrl) {
+			if (!this.$auth.isAuth) {
+				this.showLogin();
+				return;
+			}
+			uni.navigateTo({
+				url: aimUrl
+			});
+		},
+		tapToOrder() {
+			if (!this.$auth.isAuth) {
+				this.showLogin();
+				return;
+			}
+			uni.navigateTo({
+				url: '/pagesM/pages/mine_order_list'
+			});
+		},
+		tapToCar(){
+			if (!this.$auth.isAuth) {
+				this.showLogin();
+				return;
+			}
+			uni.navigateTo({
+				url:'/pagesM/pages/shop_car'
+			})
+		},
+		onShareAppMessage: function(e) {
+			return {
+				path: '/pagesM/pages/home'
+			}
+		},
+		tapHeadMenu(index){
+			let url;
+			if(index==0){
+				url = '/pagesM/pages/coupon_list'
+			}else if(index==1){
+				url = '/pagesM/pages/mine_collection'
+			}else if(index==2){
+				url = '/pagesM/pages/browse_records'
+			}
+			uni.navigateTo({
+				url: url
+			}); 
+		},
+		tapToMenu(index) {
+			let url=''
+			switch (index) { 
+				case 1: 
+					//商城订单
+					this.tapToOrder()
+					break; 
+				case 2:
+					//购物车
+					this.tapToCar()
+					break;
+				case 3: 
+					// 我的报修
+					if (this.buttonMethod()) {
+						uni.navigateTo({
+						  url: '../services/property/list/list'
+						})
+					}
+					break;
+				case 4: 
+					// 联系物业
+					let phone= uni.getStorageSync("personTel")
+					if (this.$isEmpty(phone)) {
+						this.$u.toast('暂无电话')
+					}else{
+						this.makePhoneCall(phone);
+					}
+					break;
+				case 5:
+					//物业缴费
+					this.$u.toast('即将开放')
+					break;
+				case 6: 
+					//住户认证
+					if (this.buttonMethod()) {
+						uni.navigateTo({
+							url:"myInfo/myInfo"
+						})
+					}
+					break;
+				case 7:
+					// 通行人脸
+					if (this.buttonMethod()) {
+						uni.navigateTo({
+							url:"/pages/uploadFace/uploadFace"
+						})
+					}
+					break;
+				case 8:
+					// 身份信息
+					uni.showToast({
+						title:"暂未开发",
+						icon:"none"
+					})
+					break;
+				case 9:
+					// 收货地址
+					url= '/pagesM/pages/address_list'
+					break;
+				case 10:
+					// 问题反馈
+					url="./feedback/feedback"
+					break;
+				case 11:
+					// 帮助中心
+					url="direction/direction"
+					break;
+				case 12:
+					// 设置
+					url="/pagesM/pages/mine_setting"
+					break;
+				case 13:
+					//出入记录
+					if (this.buttonMethod()) {
+						uni.navigateTo({
+							url:"travelRecord/travelRecord"
+						})
+					}
+					break;
+				default:
+					break;
+			}
+			if (url != '') {
+			  uni.navigateTo({
+			    url: url,
+			  });
+			}
+		},
+		async getMyBaseDatas() {
+			let resp = await this.$api.getMyBaseDatas({
+				_isReject: true,
+				_isPull: this.isPull,
+				memberId: this.memberId
+			});
+			console.log(resp)
+			this.$auth.getMineBase(resp);
+			this.dataDetail = resp;
+			this.orderStatusNum = resp.orderStatusNum || {};
+			this.userDetail = resp.user || {};
+		},
+		onLoadPage() {
+			wx.hideShareMenu();
+			this.communityInitData()
+			this.isLogin = this.$auth.isAuth;
+			this.memberId = this.$auth.getMemberId();
+			this.getMyBaseDatas();
+			// this.memberId = this.$auth.getMemberId();
+			// this.getMyBaseDatas();
+		},
+		// 社区 begin
+		communityInitData(){
+			var that = this; //从全局变量中获取用户信息
+			if (app.globalData.member) {
+			  that.setData({
+			    state: app.globalData.member.state,
+			    anyHousePass: app.globalData.anyHousePass
+			  });
+			}
+		},
+		login(){
+			var that = this; //从全局变量中获取用户信息
+			if (app.globalData.userInfo == null) {
+			  uni.login({
+			    success: function () {
+			      uni.getUserInfo({
+			        success: function (res) {
+						console.log(res);
+					  that.isLogin=true
+			          app.globalData.userInfo = res.userInfo;
+			          that.setData({
+			            userInfo: res.userInfo
+			          });
+			        }
+			      });
+			    }
+			  });
+			} else {
+				that.isLogin=true
+			  that.setData({
+				userInfo: app.globalData.userInfo
+			  });
+			}
+			if (app.globalData.member) {
+			  that.setData({
+			    state: app.globalData.member.state,
+			    anyHousePass: app.globalData.anyHousePass
+			  });
+			}
+		},
+		//用户认证信息
+		buttonMethod: function () {
+		  var that = this; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
+		  var member = app.globalData.member;
+		  var anyHousePass = app.globalData.anyHousePass;
+		  if (member == null) {
+		    //未注册
+			uni.navigateTo({
+				url:"../empty/empty"
+			})
+		    return false;
+		  } else if (member.state == 0 && !anyHousePass) {
+		    //2未认证
+		    uni.navigateTo({
+		    	url:"../empty/empty?type=2"
+		    })
+		    return false;
+		  } else if (member.state == 1 && !anyHousePass) {
+		    //待审核
+		    that.pending();
+		    return false;
+		  } else if (member.state == 2 || anyHousePass) {
+		    return true
+		  }else{
+			  return false
+		  }
+		},
+		//提示用户身份注册
+		footaddmore: function () {
+		  uni.showModal({
+		    title: '提示',
+		    content: ' 请先完成注册',
+		    //cancelText:'去绑定',
+		    cancelText: '取消',
+		    confirmText: '去注册',
+		    success: function (res) {
+		      if (res.confirm) {
+		        console.log('用户点击了确认-去认证'); //跳转到认证页面
+		
+		        uni.navigateTo({
+		          url: '../register/register'
+		        });
+		      } else {//res.cancel
+		        //绑定界面--暂时不用
+		        // wx.navigateTo({
+		        //   url: '/pages/binding/binding',
+		        // })
+		      }
+		    }
+		  });
+		},
+		//用户信息待审核中
+		pending: function () {
+		  let that = this;
+		  var openid = uni.getStorageSync("openid");
+		  let params = {};
+		  params['openid'] = openid;
+		  // let operation = 'miniprogram/getMemberByOpenid';
+		  this.$http.getMemberByOpenid(params).then(res=>{
+			  //获取成功
+			  if (res.data.result_code == 1) {
+			    let member = res.data.member; //待审核
+			  		
+			    if (member.state == 1 && !res.data.anyHousePass) {
+			      app.globalData.oneFailHint('亲,你的信息正在审核,请耐心等待');
+			    } else if (member.state == 2) {
+			      app.globalData.oneFailHint('亲,你的信息已审核通过', function () {
+			        that.setData({
+			          state: member.state
+			        });
+			      });
+			    }
+			  		
+			    app.globalData.member = member;
+			    app.globalData.anyHousePass = res.data.anyHousePass;
+			  } else {
+			    app.globalData.oneFailHint(res.data.result_msg);
+			  }
+		   
+		  });
+		},
+		// 社区 end
+	},
+	onReady() {
+		if (!this.$auth.isAuth) {
+			this.showLogin();
+			return;
+		} else {
+			this.$refs.dialogLogin.hide();
+		}
+	},
+	onShow() {
+		//小程序审核期间隐藏掉
+		let appletType= uni.getStorageSync('appletType')
+		let tmp=this.mineItemList
+		if (appletType=='0') {
+			this.mineItemList.splice(1,1)
+			this.mineItemList.splice(1,1)
+		}else{
+			this.mineItemList=tmp
+		}
+		
+		
+		if (this.isFirst) {
+			this.isFirst=false
+		}else{
+			
+		}
+		this.onShowPage();
+		wx.hideShareMenu();
+		this.communityInitData()
+		this.isLogin = this.$auth.isAuth;
+		this.memberId = this.$auth.getMemberId();
+		this.getMyBaseDatas();
+	},
+	onPullDownRefresh() {
+		this.onPullDownRefreshPage();
+	}
+};
+</script>
+
+<style>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>
+
+<style lang="scss" scoped>
+	.pageBg {
+		// background-color: #FFFFFF;
+	}
+   button::after {
+	  border: none;
+	}
+ .header {
+	// border-bottom-left-radius: 20rpx;
+	border-bottom-right-radius: 60rpx;
+	//todo
+	background-image: url(https://szsq.nxzhsq.cn/community/miniofile/app/bg.png);
+	height: 480upx;
+	background-repeat: no-repeat;
+	background-size: 100% 100%;
+	.member_head_img {
+		margin-right: 30upx;
+		image {
+			//todo
+			width: 110upx;
+			height:110upx;
+			border-radius: 59rpx;
+		}
+
+		.avatar-wrap {
+			display: inline-flex;
+			border: 0;
+			background-color: transparent;
+		}
+	}
+
+	.no_login {
+		display: flex;
+		flex-direction: column;
+		.no_login_btn {
+			border-radius: 25px;
+			//todo
+			font-size: 32upx;
+			color: #fff;
+			width: fit-content;
+			padding: 0 15upx;
+			height: 60upx;
+			line-height: 60upx;
+			background: transparent;
+		}
+	}
+
+	.member_info {
+		display: flex;
+		flex-direction: column;
+		.member_name_box {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			.member_name { 
+				font-size: 40upx;
+				color: #fff;
+				font-weight: bold;
+			}
+			.member_level {
+				background: #ffc600;
+				color: #fff;
+				font-size: 22upx;
+				border-radius: 4upx;
+				padding: 5upx 10upx;
+				margin-left: 10upx;
+			}
+		}
+
+		.member_phone_box {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			.member_phone { 
+				font-size: 24upx;
+				color: #FFFFFF;
+			}
+
+			image {
+				width: 19upx;
+				height: 19upx;
+				padding: 20upx;
+			}
+		}
+	}
+
+	.member_benefits {
+		background: #fff;
+		width: 180upx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		text-align: center;
+		border-radius: 27upx 0px 0px 27upx;
+		height: 54upx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+
+		image {
+			width: 26upx;
+			height: 23upx;
+			padding: 0 10upx 0 30upx;
+		}
+
+		.member_benefits_text {
+			font-size: 24upx;
+			color: $dt-color-primary;
+			letter-spacing: 2upx;
+		}
+	}
+
+	button::after {
+		border: none;
+	}
+}
+
+.coupon_point {
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	height: 110upx;
+	background: #fff;
+	justify-content: space-around;
+
+	.item {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		width: 50%;
+
+		.item_box {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			letter-spacing: 2upx;
+
+			.item_content {
+				color: $dt-color-primary;
+				font-size: 34upx;
+			}
+
+			.item_unit {
+				color: $dt-color-primary;
+				font-size: 22upx;
+				margin-top: 6upx;
+			}
+		}
+
+		.item_text {
+			color: #333333;
+			font-size: 22upx;
+		}
+	}
+
+	.line {
+		width: 1upx;
+		height: 50upx;
+		background: #e5e5e5;
+	}
+}
+
+.mine_order_statue {
+	//todo
+	box-shadow: 0 10rpx #e7f1fd ;
+	margin: 40upx 20upx 0;
+	background: #fff;
+	padding: 10upx 20upx;
+	border-radius: 20rpx;
+	.order_wrap {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		box-sizing: border-box;
+		.mine_order_text {
+			font-size: 28upx;
+			font-weight: bold;
+			color: #333333;
+		}
+
+		.jump_all_order {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+
+			text {
+				color: #999999;
+				font-size: 22upx;
+				margin-right: 10upx;
+			}
+
+			image {
+				width: 10upx;
+				height: 18upx;
+			}
+		}
+	}
+
+	.order_statue_list {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.order_statue_item {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			position: relative;
+			margin-top: 32upx;
+			image {
+				width: 40upx;
+				height: 40upx;
+			}
+
+			text {
+				font-size: 24rpx;
+				color: #333333;
+				letter-spacing: 1upx;
+				margin-top: 10upx;
+			}
+
+			.tip_count {
+				position: absolute;
+				right: 0upx;
+				top: -6rpx;
+				width: 24upx;
+				height: 24upx;
+				border-radius: 50%;
+				background-color: #ff3b30;
+				color: #fff;
+				font-size: 18upx;
+				text-align: center;
+				line-height: 24upx;
+			}
+		}
+	}
+}
+
+.item_list {
+	display: flex;
+	flex-direction: column;
+	background: #fff;
+	margin: 20rpx;
+	border-radius: 20rpx;
+	.item {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 30upx;
+		height: 90upx;
+		border-bottom: 1upx solid #f1f1f1;
+
+		.item_content {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+
+			image {
+				width: 42upx;
+				height: 42upx;
+			}
+
+			text {
+				font-size: 28upx;
+				color: #333333;
+				margin-left: 20upx;
+			}
+		}
+
+		image {
+			width: 10upx;
+			height: 18upx;
+		}
+	}
+	
+	.item:first-child{
+		border: none;
+	}
+
+	.item:last-child {
+		border: none;
+	}
+}
+</style>

File diff suppressed because it is too large
+ 516 - 509
pages/wode/wode.vue


BIN
static/common/banner.png


BIN
static/common/empty.png


BIN
static/wode/churu.png


BIN
static/wode/logout.png


BIN
static/wode/renliang.png


+ 3 - 2
store/index.js

@@ -12,7 +12,7 @@ try{
 }
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = [''];
+let saveStateKeys = ['vuex_isAuth'];
 
 // 保存变量到本地存储中
 const saveLifeData = function(key, value){
@@ -43,7 +43,8 @@ const store = new Vuex.Store({
 		vuex_auth_audit_count: lifeData.vuex_auth_audit_count ? lifeData.vuex_auth_audit_count : 0,
 		//小程序审核状态
 		vuex_appletType: lifeData.vuex_appletType ? lifeData.vuex_appletType : 0,
-		
+		//是否已认证[妈的客户那边要退出登录,社区本来就不需要登录的,靠,sb玩意,还要做个假登录,草]
+		vuex_isAuth: lifeData.vuex_isAuth ? lifeData.vuex_isAuth : false,
 	},
 	mutations: {
 		$uStore(state, payload) {

+ 85 - 49
utils/dialog.js

@@ -1,86 +1,122 @@
 let dialog = {};
 
 dialog.config = {
-  cancelColor:'#888',
-  confirmColor:'#3CC51F',
-  title:'系统提示'
+	cancelColor: '#888',
+	confirmColor: '#3CC51F',
+	title: '系统提示'
 }
 
 dialog.toast = (title, callfun = null, duration = 1000, mask = true, image = '', icon = 'none') => {
-  uni.showToast({
-    title: title,
-    icon: icon,
-    image: image,
-    mask: mask,
-    duration: duration
-  });
-  if (typeof (callfun) == 'function') {
-    setTimeout(() => {
-      callfun()
-    }, duration)
-  }
+	uni.showToast({
+		title: title,
+		icon: icon,
+		image: image,
+		mask: mask,
+		duration: duration
+	});
+	if (typeof(callfun) == 'function') {
+		setTimeout(() => {
+			callfun()
+		}, duration)
+	}
 };
 
 dialog.success = (title, callfun = null, duration = 1000) => {
-  dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_success.png')
+	dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_success.png')
 };
 
 dialog.error = (title, callfun = null, duration = 1000) => {
-  dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_fail.png')
+	dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_fail.png')
 };
 
 dialog.warn = (title, callfun = null, duration = 1000) => {
-  dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_warn.png')
+	dialog.toast(title, callfun, duration, true, '/static/dialog/dialog_warn.png')
 };
 
 dialog.showLoading = (title = '加载中..', mask = true) => {
-  uni.showLoading({
-    title: title,
-    mask: mask
-  });
+	uni.showLoading({
+		title: title,
+		mask: mask
+	});
 };
 
 dialog.hideLoading = () => {
-  uni.hideLoading();
+	uni.hideLoading();
 };
 
 ///弹出框
 dialog.alert = (opt) => {
-  let def = {
-    title: dialog.config.title,
-    content:'',
-    showCancel: false,
-    cancelText: '取消',
-    cancelColor: dialog.config.cancelColor,
-    confirmText: '我知道了',
-    confirmColor: dialog.config.confirmColor,
-  }
-  uni.showModal(Object.assign(def, opt));
+	let def = {
+		title: dialog.config.title,
+		content: '',
+		showCancel: false,
+		cancelText: '取消',
+		cancelColor: dialog.config.cancelColor,
+		confirmText: '我知道了',
+		confirmColor: dialog.config.confirmColor,
+	}
+	uni.showModal(Object.assign(def, opt));
 };
 
 ///确认对话框
 dialog.confirm = (opt) => {
-  let def = {
-    title: dialog.config.title,
-    content:'',
-    showCancel: true,
-    cancelText: '取消',
-    cancelColor: dialog.config.cancelColor,
-    confirmText: '确定',
-    confirmColor: dialog.config.confirmColor,
-  }
-  
-  uni.showModal(Object.assign(def, opt));
+	let def = {
+		title: dialog.config.title,
+		content: '',
+		showCancel: true,
+		cancelText: '取消',
+		cancelColor: dialog.config.cancelColor,
+		confirmText: '确定',
+		confirmColor: dialog.config.confirmColor,
+	}
+
+	uni.showModal(Object.assign(def, opt));
 };
 
 //显示操作菜单
 dialog.actionSheet = (opt) => {
-  let def = {
-    itemColor: "#000000"
-  }
-  uni.showActionSheet(Object.assign(def, opt));
+	let def = {
+		itemColor: "#000000"
+	}
+	uni.showActionSheet(Object.assign(def, opt));
 };
 
 
+/**
+ * 封装模态框
+ */
+dialog.showModal = (content, showCancel = true, confirmColor) => {
+	return new Promise((resolve, reject) => {
+		uni.showModal({
+			title: '提示',
+			content,
+			showCancel,
+			confirmColor: confirmColor ? confirmColor : '#2979ff',
+			success: (res) => {
+				if (res.confirm) {
+					resolve(res)
+				}
+			}
+		});
+	})
+}
+
+dialog.showModalAndBack = (content, confirmColor) => {
+	uni.showModal({
+		title: "提示",
+		content: content,
+		showCancel: false,
+		confirmColor: confirmColor ? confirmColor : '#2979ff',
+		success: (res) => {
+			if (res.confirm) {
+				uni.navigateBack({
+					delta: 1
+				})
+			}
+		}
+	});
+}
+
+
 
-export default dialog;
+export default dialog;

+ 314 - 0
utils/wx_api.js

@@ -0,0 +1,314 @@
+let wxApi = {}
+
+const tips = (title) => {
+	uni.showToast({
+		title,
+		icon: "none"
+	});
+}
+
+const getScopeDesc = (name) => {
+	let title = ''
+	switch (name) {
+		case 'userInfo':
+			title = '用户信息'
+			break;
+		case 'userLocation':
+			title = '地理位置'
+			break;
+		case 'userLocationBackground':
+			title = "后台定位"
+			break;
+		case 'address':
+			title = "通讯地址"
+			break;
+		case 'record':
+			title = "录音功能"
+			break;
+		case 'writePhotosAlbum':
+			title = "添加到相册"
+			break;
+		case 'camera':
+			title = "摄像头"
+			break;
+		case 'invoice':
+			title = "获取发票"
+			break;
+		case 'invoiceTitle':
+			title = "发票抬头"
+			break;
+		case 'werun':
+			title = "微信运动步数"
+			break;
+		default:
+			break;
+	}
+	return title
+}
+
+const settingModal = (content) => {
+	uni.showModal({
+		title: '提示',
+		content,
+		confirmText: '去设置',
+		cancelText: '暂不设置',
+		confirmColor: '#EF9944',
+		success: data => {
+			if (data.confirm) {
+				uni.openSetting();
+			}
+		}
+	});
+}
+
+//打开设置
+const openSetting = (authName) => {
+	return new Promise((resolve, reject) => {
+		const scopeDesc = getScopeDesc(authName)
+		let content = `请先在设置页面打开“${scopeDesc}”使用权限`
+		authName = `scope.${authName}`
+		uni.getSetting({
+			success: (res) => {
+				console.log(res.authSetting);
+				let status = res.authSetting[authName]
+				if (status == undefined) {
+					//首次授权
+					uni.authorize({
+						scope: authName,
+						success: (res) => {
+							//成功授权
+							resolve(res)
+						}
+					})
+					return
+				}
+				if (status) {
+					// 已授权
+					resolve(res)
+				} else {
+					//未授权
+					settingModal(content)
+				}
+			}
+		})
+	})
+}
+// 微信登陆
+wxApi.wxLogin = () => {
+	return new Promise((resolve, reject) => {
+		uni.login({
+			success: function(res) {
+				resolve(res)
+			},
+			fail: function(err) {
+				console.warn(err)
+				reject(err)
+			}
+		})
+	})
+}
+
+//选择图片 res.tempFilePaths[0]
+wxApi.chooseImage = (count = 1, size = 2) => {
+	return new Promise((resolve, reject) => {
+		uni.chooseImage({
+			count,
+			//最多可以选择的图片张数,默认9
+			sourceType: ['album', 'camera'],
+			sizeType: ['compressed'],
+			//可选择原图或压缩后的图片
+			success: res => {
+				if (res.tempFiles[0].size > size * 1024 * 1024) {
+					uni.showToast({
+						title: `上传的照片不能超过${size}m`,
+						icon: "none"
+					})
+					return
+				}
+				resolve(res.tempFilePaths)
+			},
+			fail(err) {
+				reject(err)
+			}
+		});
+
+	})
+}
+
+
+wxApi.downloadFile = (url) => {
+	return new Promise((resolve, reject) => {
+		uni.downloadFile({
+			url, //仅为示例,并非真实的资源
+			success: (res) => {
+				if (res.statusCode === 200) {
+					resolve(res.tempFilePath)
+				} else {
+					reject(res)
+				}
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		});
+	})
+}
+
+wxApi.saveImg = (filePath) => {
+	return new Promise((resolve, reject) => {
+		openSetting('writePhotosAlbum').then(() => {
+			uni.saveImageToPhotosAlbum({
+				filePath,
+				success: function(res) {
+					uni.showToast({
+						title: "保存成功",
+						icon: "none"
+					});
+					resolve(res)
+				},
+				fail: function(err) {
+					tips('保存失败,请稍后重试')
+					reject(err)
+				}
+			});
+		})
+	})
+}
+
+
+wxApi.chooseLocation = () => {
+	return new Promise((resolve, reject) => {
+		openSetting('userLocation').then(() => {
+			uni.chooseLocation({
+				success(res) {
+					resolve(res)
+				},
+				fail(err) {
+					reject(err)
+				}
+			})
+		})
+	})
+}
+
+wxApi.getLocation = () => {
+	return new Promise((resolve, reject) => {
+		uni.getLocation({
+			type: 'gcj02',
+			success: function(res) {
+				resolve(res)
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		});
+	})
+}
+
+wxApi.getConnectedWifi = () => {
+	return new Promise((resolve, reject) => {
+		uni.startWifi({
+			success: function(res) {
+				wx.getConnectedWifi({
+					success: res => {
+						resolve(res)
+					},
+					fail: err => {
+						reject(err)
+					}
+				})
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		});
+	})
+}
+/**
+ * 订阅认证信息
+ */
+wxApi.subscribe = (tmplIds) => {
+		return new Promise((resolve, reject) => {
+			uni.requestSubscribeMessage({
+				tmplIds,
+				success(res) {
+					console.log(res);
+					resolve(res)
+				},
+				fail(err) {
+					console.log(err);
+					reject(err)
+				}
+			})
+		})
+	},
+
+
+	// 获取用户信息
+	wxApi.wxGetUserInfo = () => {
+		return new Promise((resolve, reject) => {
+			uni.getUserInfo({
+				withCredentials: true,
+				success: function(res) {
+					resolve(res)
+				},
+				fail: function(err) {
+					reject(err)
+				},
+			})
+		})
+	}
+
+//新版本的获取用户信息
+wxApi.getUserProfile = () => {
+	return new Promise((resolve, reject) => {
+		uni.getUserProfile({
+			desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+			success: (res) => {
+				resolve(res)
+			},
+			fail: (err) => {
+				reject(err)
+			}
+		})
+	})
+}
+
+let compareVersion = (v1, v2) => {
+	v1 = v1.split('.')
+	v2 = v2.split('.')
+	const len = Math.max(v1.length, v2.length)
+
+	while (v1.length < len) {
+		v1.push('0')
+	}
+	while (v2.length < len) {
+		v2.push('0')
+	}
+
+	for (let i = 0; i < len; i++) {
+		const num1 = parseInt(v1[i])
+		const num2 = parseInt(v2[i])
+
+		if (num1 > num2) {
+			return 1
+		} else if (num1 < num2) {
+			return -1
+		}
+	}
+	return 0
+}
+
+wxApi.versioning = (minVersion) => {
+	const version = wx.getSystemInfoSync().SDKVersion
+	return new Promise((resolve, reject) => {
+		if (compareVersion(version, minVersion) >= 0) {
+			resolve()
+		} else {
+			uni.showModal({
+				content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
+			})
+		}
+	})
+}
+export default wxApi

Some files were not shown because too many files changed in this diff