zouling hai 3 meses
pai
achega
717b181164

+ 12 - 0
property_ui/1.txt

@@ -0,0 +1,12 @@
+包名:qswg.management.app
+
+
+证书别名:__uni__35b39a9
+证书私钥密码:rlO66MnA
+
+MD5: 88:6B:3A:CF:1E:7C:E5:E1:68:1B:11:9F:12:4A:4C:97
+SHA1: 2D:05:E4:2C:E2:00:0A:BF:03:58:2A:94:94:38:65:BE:5B:1C:F1:1B
+
+高德key:c99089913eec7e8472a6f7cb228c22eb
+
+极光appkey:

+ 5 - 3
property_ui/components/swiper/notice.vue

@@ -5,9 +5,11 @@
 			<!-- :indicator-color="nactiveColor" :indicator-active-color="activeColor" -->
 			<swiper class="swiper" circular :autoplay="autoplay" :interval="interval" :duration="duration" vertical='true'>
 				<swiper-item v-for="(ite,idx) in noticelist" :key="">
-					<view class="flexc swipers" @click="getDetail(ite.noticeId)">
-						<view class="tit over">{{ite.noticeTitle}}</view>
-						<view class="num flexcc">{{ite.num}}</view>
+					<view class="flexc swipers" @click="getDetail(ite.repairId)">
+						<!-- <view class="tit over">{{ite.noticeTitle}}</view>
+						<view class="num flexcc">{{ite.num}}</view> -->
+						<view class="tit over">您有1条报修信息,请及时查看处理!</view>
+						<view class="num flexcc">{{noticelist.length}}</view>
 						<image :src="rimg" class="rimg"></image>
 						<!-- <view class="time">{{ite.issuerTime}}</view> -->
 						<!-- <view class="time" v-if="ite.createTime">{{ite.createTime.substring(0,10)}}</view> -->

BIN=BIN
property_ui/e608f7d0d023b456faa9868f29d342d5.keystore


+ 81 - 4
property_ui/manage/components/car/list.vue

@@ -431,9 +431,9 @@
 						<view class="flexcj">
 							<view class="num">{{ite.duration}}</view>
 							<!-- 管理员 -->
-							<view class="f12 cofe fw5" @click.stop="getReadlist(ite.manualId)">已读名单</view>
+							<view class="f12 cofe fw5" v-if="checkPermi(['wuYe:manual:getRead'])" @click.stop="getReadlist(ite.manualId)">已读名单</view>
 							<!-- 员工 -->
-							<view class="f12 co27 fw5">进度:{{ite.progress||0}}%</view>
+							<view class="f12 co27 fw5" v-else>进度:{{ite.progress||0}}%</view>
 						</view>
 						<view class="time">{{ite.publishTime}}</view>
 					</view>
@@ -454,8 +454,9 @@
 		</block>
 		<block v-if="type=='readcount'" >
 			<view class="readlist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
-				<image class="head" :src="man" v-if="ite.sex==1"></image>
-				<image class="head" :src="woman" v-else></image>
+				<image class="head" :src="head" ></image>
+				<!-- <image class="head" :src="man" v-if="ite.sex==1"></image>
+				<image class="head" :src="woman" v-else></image> -->
 				<view class="flex1">
 					<view class="tit">{{ite.staffName}}</view>
 					<view class="time"><text>阅读总时长 |</text> {{kaTime(ite.staffTime)}}</view>
@@ -532,9 +533,85 @@
 				niconc:require('@/manage/static/news/niconc.png'),
 				nicond:require('@/manage/static/news/nicond.png'),
 				nicone:require('@/manage/static/news/nicone.png'),
+				head:require('@/manage/static/news/head.png'),
 				del:require('@/manage/static/news/delb.png'),
 				baseUrl:config.baseUrl,
 				delBtnWidth:66,//左滑默认宽度
+				OwOlist: [
+				        //表情包和表情路径
+				        { title: "微笑", url: "weixiao.gif" },
+				        { title: "嘻嘻", url: "xixi.gif" },
+				        { title: "哈哈", url: "haha.gif" },
+				        { title: "可爱", url: "keai.gif" },
+				        { title: "可怜", url: "kelian.gif" },
+				        { title: "挖鼻", url: "wabi.gif" },
+				        { title: "吃惊", url: "chijing.gif" },
+				        { title: "害羞", url: "haixiu.gif" },
+				        { title: "挤眼", url: "jiyan.gif" },
+				        { title: "闭嘴", url: "bizui.gif" },
+				        { title: "鄙视", url: "bishi.gif" },
+				        { title: "爱你", url: "aini.gif" },
+				        { title: "泪", url: "lei.gif" },
+				        { title: "偷笑", url: "touxiao.gif" },
+				        { title: "亲亲", url: "qinqin.gif" },
+				        { title: "生病", url: "shengbing.gif" },
+				        { title: "太开心", url: "taikaixin.gif" },
+				        { title: "白眼", url: "baiyan.gif" },
+				        { title: "右哼哼", url: "youhengheng.gif" },
+				        { title: "左哼哼", url: "zuohengheng.gif" },
+				        { title: "嘘", url: "xu.gif" },
+				        { title: "衰", url: "shuai.gif" },
+				        { title: "吐", url: "tu.gif" },
+				        { title: "哈欠", url: "haqian.gif" },
+				        { title: "抱抱", url: "baobao.gif" },
+				        { title: "怒", url: "nu.gif" },
+				        { title: "疑问", url: "yiwen.gif" },
+				        { title: "馋嘴", url: "chanzui.gif" },
+				        { title: "拜拜", url: "baibai.gif" },
+				        { title: "思考", url: "sikao.gif" },
+				        { title: "汗", url: "han.gif" },
+				        { title: "困", url: "kun.gif" },
+				        { title: "睡", url: "shui.gif" },
+				        { title: "钱", url: "qian.gif" },
+				        { title: "失望", url: "shiwang.gif" },
+				        { title: "酷", url: "ku.gif" },
+				        { title: "色", url: "se.gif" },
+				        { title: "哼", url: "heng.gif" },
+				        { title: "鼓掌", url: "guzhang.gif" },
+				        { title: "晕", url: "yun.gif" },
+				        { title: "悲伤", url: "beishang.gif" },
+				        { title: "抓狂", url: "zhuakuang.gif" },
+				        { title: "黑线", url: "heixian.gif" },
+				        { title: "阴险", url: "yinxian.gif" },
+				        { title: "怒骂", url: "numa.gif" },
+				        { title: "互粉", url: "hufen.gif" },
+				        { title: "书呆子", url: "shudaizi.gif" },
+				        { title: "愤怒", url: "fennu.gif" },
+				        { title: "感冒", url: "ganmao.gif" },
+				        { title: "心", url: "xin.gif" },
+				        { title: "伤心", url: "shangxin.gif" },
+				        { title: "猪", url: "zhu.gif" },
+				        { title: "熊猫", url: "xiongmao.gif" },
+				        { title: "兔子", url: "tuzi.gif" },
+				        { title: "喔克", url: "ok.gif" },
+				        { title: "耶", url: "ye.gif" },
+				        { title: "棒棒", url: "good.gif" },
+				        { title: "不", url: "no.gif" },
+				        { title: "赞", url: "zan.gif" },
+				        { title: "来", url: "lai.gif" },
+				        { title: "弱", url: "ruo.gif" },
+				        { title: "草泥马", url: "caonima.gif" },
+				        { title: "神马", url: "shenma.gif" },
+				        { title: "囧", url: "jiong.gif" },
+				        { title: "浮云", url: "fuyun.gif" },
+				        { title: "给力", url: "geili.gif" },
+				        { title: "围观", url: "weiguan.gif" },
+				        { title: "威武", url: "weiwu.gif" },
+				        { title: "话筒", url: "huatong.gif" },
+				        { title: "蜡烛", url: "lazhu.gif" },
+				        { title: "蛋糕", url: "dangao.gif" },
+				        { title: "发红包", url: "fahongbao.gif" },
+				      ],
 			}
 		},
 		mounted() {

+ 5 - 5
property_ui/manage/pages/community/newsyg.vue

@@ -3,7 +3,7 @@
 		<view class="cartop">
 			<view class="tabtop flexc">
 				<view class="tabt" :class="tabval==ite.dictValue?'act':''" v-for="(ite,idx) in wzlxList" :key="idx" @click="getTabFn(ite.dictValue)">{{ite.dictLabel}}</view>
-				<view class="numbox" @click="getCount">
+				<view class="numbox" @click="getCount" v-if="checkPermi(['wuYe:staffTrainTime:list'])">
 					阅读统计
 				</view>
 			</view>
@@ -116,14 +116,14 @@
 				})
 			},
 			getDetail(data){
-				if(this.tabval=='ystv'){
+				if(this.type=='ystv'){
 					this.$tab.navigateTo("/manage/pages/community/newsygdetail?id="+data)
-				}else{
-					this.$tab.navigateTo("/manage/pages/community/newsaddvideo?id="+data)
+				// }else{
+				// 	this.$tab.navigateTo("/manage/pages/community/newsaddvideo?id="+data)
 				}
 			},
 			getPut(id){
-				if(checkPermi((['wuye:partyNews:edit']))){
+				if(checkPermi((['wuYe:manual:add']))){
 					this.$tab.navigateTo("/manage/pages/community/newsadd?id="+id)
 				}else{
 					this.$tab.navigateTo("/manage/pages/community/newsygdetail?id="+id)

+ 2 - 2
property_ui/manage/pages/community/readcount.vue

@@ -33,7 +33,7 @@
 			</view> -->
 		</view>
 		<!-- 列表 -->
-		<view class="carlists">
+		<view class="carlists mt5">
 			<car-list :datainfo="list" :wtdt="wtdt" type='readcount' @getDetail="getDetail"></car-list>
 		</view>
 		<loading></loading>
@@ -169,7 +169,7 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
-.car{padding: 172rpx 0 0rpx;}
+.car{padding: 186rpx 0 0rpx;}
 .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
 	.topa{padding: 20rpx;padding-bottom: 30rpx;
 		.resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}

BIN=BIN
property_ui/manage/static/news/head.png


+ 23 - 4
property_ui/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "若依移动端",
+    "name" : "智慧社区物管端",
     "appid" : "__UNI__35B39A9",
     "description" : "",
     "versionName" : "1.1.0",
@@ -14,7 +14,9 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Maps" : {}
+        },
         "distribute" : {
             "android" : {
                 "permissions" : [
@@ -36,8 +38,25 @@
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },
-            "ios" : {},
-            "sdkConfigs" : {}
+            "ios" : {
+                "dSYMs" : false
+            },
+            "sdkConfigs" : {
+                "share" : {},
+                "ad" : {},
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "c99089913eec7e8472a6f7cb228c22eb",
+                        "appkey_android" : "c99089913eec7e8472a6f7cb228c22eb"
+                    }
+                }
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "static/applogo.png",
+                    "xhdpi" : "static/applogo.png"
+                }
+            }
         }
     },
     "quickapp" : {},

+ 6 - 6
property_ui/mine/components/box/list.vue

@@ -14,12 +14,12 @@
 						<view class="flexc mb6">
 							<view class="name flex1 over">{{ite.nickName}}</view>
 							<view class="tit flex0 ml10">
-								<block v-if="ite.targetType==1">评论</block>
-								<block v-if="ite.targetType==2">点赞</block>
-								<block v-if="ite.targetType==3">收藏</block>
-								<block v-if="ite.targetType==4">回复</block>
-								<block v-if="ite.targetType==5 ">点赞</block>
-								了你的文章</view>
+								<block v-if="ite.targetType==1">评论了你的文章</block>
+								<block v-if="ite.targetType==2">点赞了你的文章</block>
+								<block v-if="ite.targetType==3">收藏了你的文章</block>
+								<block v-if="ite.targetType==4">回复了你的评论</block>
+								<block v-if="ite.targetType==5">点赞了你的评论</block>
+								</view>
 							<view class="time flex0 ml10">{{ite.createTime}}</view>
 						</view>
 						<view class="flexc overh mb4">

+ 53 - 24
property_ui/pages/index/index.vue

@@ -28,75 +28,75 @@
 				<notice :noticelist="noticelist"  :autoplay='autoplay' @getNoticeDet="getNoticeDet"></notice>
 			</view>
 			<!-- 统计 -->
-			<view class="contbox">
+			<view class="contbox" v-if="checkPermi(['wuYe:statistics:num:app'])">
 				<view class="cont flexc">
 					<image :src="conta"></image>
 					<view>今日数据统计</view>
 				</view>
 				<view class="lists">
 					<view class="list">
-						<view class="tit">{{count.kxcw}}</view>
+						<view class="tit">{{count.kxcw||0}}</view>
 						<view class="txt">空闲车位</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.kxcdz}}</view>
+						<view class="tit">{{count.kxcdz||0}}</view>
 						<view class="txt">空闲充电桩</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.jrcl}}</view>
+						<view class="tit">{{count.jrcl||0}}</view>
 						<view class="txt">进入车辆</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.lkcl}}</view>
+						<view class="tit">{{count.lkcl||0}}</view>
 						<view class="txt">离开车辆</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.wlcl}}</view>
+						<view class="tit">{{count.wlcl||0}}</view>
 						<view class="txt">外来车辆</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.wtdj}}</view>
+						<view class="tit">{{count.wtdj||0}}</view>
 						<view class="txt">违停登记</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.wlry}}</view>
+						<view class="tit">{{count.wlry||0}}</view>
 						<view class="txt">外来人员</view>
 					</view>
 					<view class="list">
-						<view class="tit">{{count.jrry}}</view>
+						<view class="tit">{{count.jrry||0}}</view>
 						<view class="txt">进入人员</view>
 					</view>
 					<block v-if="zhanflag">
 						<view class="list">
-							<view class="tit ca">{{count.yxg}}</view>
+							<view class="tit ca">{{count.yxg||0}}</view>
 							<view class="txt">已巡更</view>
 						</view>
 						<view class="list">
-							<view class="tit ca">{{count.wxg}}</view>
+							<view class="tit ca">{{count.wxg||0}}</view>
 							<view class="txt">未巡更</view>
 						</view>
 						<view class="list">
-							<view class="tit cb">{{count.jzdd}}</view>
+							<view class="tit cb">{{count.jzdd||0}}</view>
 							<view class="txt">家政订单</view>
 						</view>
 						<view class="list">
-							<view class="tit cb">{{count.wcdd}}</view>
+							<view class="tit cb">{{count.wcdd||0}}</view>
 							<view class="txt">完成订单</view>
 						</view>
 						<view class="list">
-							<view class="tit cc">{{count.jrbx}}</view>
+							<view class="tit cc">{{count.jrbx||0}}</view>
 							<view class="txt">今日报修</view>
 						</view>
 						<view class="list">
-							<view class="tit cc">{{count.ypbx}}</view>
+							<view class="tit cc">{{count.ypbx||0}}</view>
 							<view class="txt">已派报修</view>
 						</view>
 						<view class="list">
-							<view class="tit cc">{{count.tsjy}}</view>
+							<view class="tit cc">{{count.tsjy||0}}</view>
 							<view class="txt">投诉建议</view>
 						</view>
 						<view class="list">
-							<view class="tit cc">{{count.yhjy}}</view>
+							<view class="tit cc">{{count.yhjy||0}}</view>
 							<view class="txt">已回投诉</view>
 						</view>
 					</block>
@@ -128,7 +128,7 @@
 						<view class="imgs"><image :src="htabd" class="imgd"></image></view>
 						<view class="txt">违停管理</view>
 					</view>
-					<view class="list bimga" @click="getPeopleFn">
+					<view class="list bimga" @click="getPeopleFn" v-if="checkPermi(['wuYe:residentInfo:list'])">
 						<view class="imgs"><image :src="htabe" class="imge"></image></view>
 						<view class="txt">人员管理</view>
 					</view>
@@ -136,11 +136,11 @@
 						<view class="imgs"><image :src="htabf" class="imgf"></image></view>
 						<view class="txt">来访管理</view>
 					</view>
-					<view class="list bimga" @click="getMoneyFn">
+					<view class="list bimga" @click="getMoneyFn"  v-if="checkPermi(['wuYe:fee:list'])">
 						<view class="imgs"><image :src="htabg" class="imgd"></image></view>
 						<view class="txt">物业费管理</view>
 					</view>
-					<view class="list bimga" @click="getHouseFn">
+					<view class="list bimga" @click="getHouseFn"  v-if="checkPermi(['wuYe:houseInfo:list'])">
 						<view class="imgs"><image :src="htabh" class="imgd"></image></view>
 						<view class="txt">房屋管理</view>
 					</view>
@@ -205,6 +205,8 @@
 import footers from '@/components/footer/footer.vue'
 import notice from '@/components/swiper/notice.vue'
 import {getUserProfile} from "@/api/system/user.js"
+import {repairList} from "@/api/work/service.js"
+import self from '@/utils/location.js';
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 import {getCount} from "@/api/work/index.js"
   export default {
@@ -249,7 +251,7 @@ import {getCount} from "@/api/work/index.js"
 			autoplay:false,
 			zhanflag:true,
 			count:"",//统计
-			noticelist:[{noticeTitle:"您有1条报修信息,请及时查看处理!",num:'4'},{noticeTitle:"您有1条报修信息,请及时查看处理!",num:'12'}]
+			noticelist:[],
 		}
 	},
 	onPageScroll(e) {
@@ -261,17 +263,44 @@ import {getCount} from "@/api/work/index.js"
 		}
 	},
     onLoad: function() {
+		var that=this;
 		uni.getSystemInfo({
 			success: (e) => {
 				this.nvaHeight = Number(e.statusBarHeight)+44;
 			}
 		})
-		this.getCount()
+		if(checkPermi(['wuYe:statistics:num:app'])){
+			this.getCount()
+		}
+		if(checkPermi(['wuYe:repair:list'])){
+			this.repairList()
+		}
+		// #ifndef H5
+		self.getLocation(function(res){
+			if(res==-1){
+				
+			}else{
+				that.city=res.city;
+			}			
+		})
+		// #endif
     },
 	methods:{
 		checkPermi, checkRole,
-		getNoticeDet(){
-			
+		getNoticeDet(data){
+			this.$tab.navigateTo(`/service/pages/service/warrantydetail?id=`+data) 
+		},
+		repairList(){
+			var params={
+				pageSize: 10,
+				pageNum: 1,
+				repairStatus: 1,
+			}
+			repairList(params).then(res=>{
+				if(res.code==200){
+					this.noticelist=res.rows
+				}
+			})
 		},
 		getCount(){
 			getCount().then(res => {

+ 1 - 1
property_ui/pages/mine/avatar/index.vue

@@ -68,7 +68,7 @@
 		 */
 		data() {
 			return {
-				imageSrc:config.baseUrl+store.getters.avatar,
+				imageSrc:store.getters.avatar?config.baseUrl+store.getters.avatar:require('@/static/images/profile.jpg'),
 				isShowImg: false,
 				// 初始化的宽高
 				cropperInitW: SCREEN_WIDTH,

+ 23 - 11
property_ui/pages/mine/index.vue

@@ -8,7 +8,7 @@
 		<image :src="bgimg" class="navbg"></image>
 		<view class="mbox">
 			<view class="infobox flexc" @click="handleToInfo">
-				<image  @click.stop="handleToAvatar" :src="avatar?avatar:avatarimg" class="limg" mode="aspectFill"></image>
+				<image  @click.stop="handleToAvatar" :src="avatar?baseUrl+avatar:avatarimg" class="limg" mode="aspectFill"></image>
 				<view class="cbox">
 					<view class="tit flexc">{{name?name:'登录账号'}}
 					
@@ -33,14 +33,14 @@
 				
 			</view>
 			<view class="conts flexc">
-				<!-- v-if="checkPermi([''])" -->
-				<view class="contn"  @click="handleToYy">
+				<!--  -->
+				<view class="contn"  @click="handleDjAdd" v-if="checkPermi(['wuYe:partyNews:add'])">
 					<view class="img">
 						<image :src="listimga" class="imga"></image>
 					</view>
 					<view class="ctit">党建发布</view>
 				</view>
-				<view class="contn"  @click="handleToYy">
+				<view class="contn" >
 					<view class="img">
 						<image :src="listimgb" class="imgb"></image>
 					</view>
@@ -52,7 +52,7 @@
 					</view>
 					<view class="ctit">商品发布</view>	
 				</view>
-				<view class="contn">
+				<view class="contn" @click="handTsFn" v-if="checkPermi(['wuYe:suggestion:list'])">
 					<view class="img">
 						<image :src="listimgd" class="imgc"></image>
 					</view>
@@ -60,35 +60,35 @@
 				</view>
 			</view>
 			<view class="mbgbox">
-				<view class="flexc mine_list" @click="getClockcontFn" >
+				<view class="flexc mine_list" @click="getWarrantyFn" v-if="checkPermi(['wuYe:repair:list'])">
 					<view class="limg">
 						<image :src="listimge" class="imga"></image>
 					</view>
 					<view class="tit flex1">报修管理</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getYqMeetFn">
+				<view class="flexc mine_list" @click="getFeeFn" v-if="checkPermi(['wuYe:fee:list'])">
 					<view class="limg">
 						<image :src="listimgf" class="imgb"></image>
 					</view>
 					<view class="tit flex1">物业费催缴</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getMyHdFn">
+				<view class="flexc mine_list" @click="getMyHdFn" v-if="checkPermi(['wuYe:news:getCommentInteraction'])">
 					<view class="limg">
 						<image :src="listimgo" class="imga"></image>
 					</view>
 					<view class="tit flex1">我的互动</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getWdHdFn" >
+				<view class="flexc mine_list" @click="getWdHdFn" v-if="checkPermi(['wuYe:commentIndex:list'])">
 					<view class="limg">
 						<image :src="listimgq" class="imga"></image>
 					</view>
 					<view class="tit flex1">我的点评赞</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getPlShFn">
+				<view class="flexc mine_list" @click="getPlShFn" v-if="checkPermi(['wuYe:commentIndex:commentSh'])">
 					<view class="limg">
 						<image :src="listimgp" class="imgg"></image>
 					</view>
@@ -202,7 +202,7 @@
 		},
 		computed: {
 			avatar() {
-				return this.baseUrl+this.$store.state.user.avatar
+				return this.$store.state.user.avatar
 			},
 			windowHeight() {
 				return uni.getSystemInfoSync().windowHeight - 50
@@ -242,6 +242,18 @@
 			handleToSetting() {
 			  this.$tab.navigateTo('/pages/mine/setting/index')
 			},
+			handleDjAdd(){//党建发布
+				this.$tab.navigateTo('/manage/pages/community/newsadddj')
+			},
+			handTsFn(){//投诉回复
+				this.$tab.navigateTo('/service/pages/service/complaint')
+			},
+			getWarrantyFn(){//报修管理
+				this.$tab.navigateTo('/service/pages/service/warranty')
+			},
+			getFeeFn(){//物业费
+				this.$tab.navigateTo('/work/pages/manage/money')
+			},
 			getPlShFn(){//评论审核
 				this.$tab.navigateTo('/mine/pages/news/sh')
 			},

+ 2 - 2
property_ui/pages/mine/info.vue

@@ -5,7 +5,7 @@
 				<view class="chmain">
 					<uni-forms-item label="头像" name="phonenumber">
 						<view class="flexjd mt10">
-							<image :src="avatar?avatar:aphoto" class="inimg" @click="handleToAvatar"></image>
+							<image :src="avatar?baseUrl+avatar:aphoto" class="inimg" @click="handleToAvatar"></image>
 						</view>	
 					</uni-forms-item>
 					<uni-forms-item label="用户名称" name="nickName">
@@ -104,7 +104,7 @@
 		},
 		computed: {
 			avatar() {
-				return this.baseUrl+this.$store.state.user.avatar
+				return this.$store.state.user.avatar
 			},
 		},
 		methods: {

+ 49 - 67
property_ui/people/pages/people/comeadd.vue

@@ -83,7 +83,7 @@
 						<view class="flexc">
 							<!-- disabled -->
 							<uni-easyinput :disabled="isdisabled" v-model="datainfo.plateNumber" :inputBorder='false' placeholder="拍照自动识别" />
-							<view class="aphoto" @click="getaddImage">
+							<view class="aphoto" @click="getaddImagea">
 								<image :src="aphoto"></image>
 							</view>
 							
@@ -116,6 +116,7 @@
 	import {uploadIdentify,uploadmore} from '@/utils/common.js'
 	import {visitorAdd,reservAdd,visitorDet,reservDet,visitorPut,reservPut} from "@/api/work/people.js"
 	import {houseInfolistNoPage} from "@/api/work/work.js"
+	import {getlicensePlate} from "@/api/system/card.js"
 	import wSelect from "@/people/components/w-select/w-select.vue"
 	export default {
 		components: {wSelect},
@@ -315,45 +316,11 @@
 					this.datainfo.detailAddress=e.location;
 				}
 			},
-			getaddImage(e) {
-				let that = this;
-				let file = [],
-					count = 9
-				uni.chooseImage({
-					success: function(res) {
-						let img = res.tempFilePaths;
-						if (img.length + file.length > count) {
-							uni.showToast({
-								title: '最多上传' + count + '张图片',
-								icon: 'none',
-								duration: 2000
-							})
-						} else {
-							let imglen = res.tempFilePaths.length;
-							var fuwufile = [];
-							uploadmore('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
-								that.phofile = that.phofile.concat(rs);
-							})
-						}
-					}
-				});
-			},
 			// getaddImage(e) {
 			// 	let that = this;
-			// 	// var rs=['D:\\idcard.png']
-			// 	// if(rs&&rs.length>0){
-			// 	// 	var obj={
-			// 	// 		type:e,
-			// 	// 		// url:baseUrl+rs.join(',')
-			// 	// 		url:rs.join(',')
-			// 	// 	}
-			// 	// 	that.getOcrIdCard(obj)
-			// 	// }
-			// 	// return
 			// 	let file = [],
 			// 		count = 9
 			// 	uni.chooseImage({
-			// 		count: 1,
 			// 		success: function(res) {
 			// 			let img = res.tempFilePaths;
 			// 			if (img.length + file.length > count) {
@@ -365,43 +332,58 @@
 			// 			} else {
 			// 				let imglen = res.tempFilePaths.length;
 			// 				var fuwufile = [];
-			// 				uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
-			// 					var resurl = rs[0];
-			// 					if (e == 'front') {
-			// 						that.datainfo.front = resurl.fileName;
-			// 					} else {
-			// 						that.datainfo.back = resurl.fileName;
-			// 					}
-			// 					if (rs && rs.length > 0) {
-			// 						var obj = {
-			// 							type: e,
-			// 							url: resurl.urlOnline
-			// 						}
-			// 						that.getOcrIdCard(obj)
-			// 					}
+			// 				uploadmore('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
+			// 					that.phofile = that.phofile.concat(rs);
 			// 				})
 			// 			}
 			// 		}
 			// 	});
 			// },
-			// getOcrIdCard(obj) {
-			// 	var params = {
-			// 		image: obj.url,
-			// 		idCardSide: obj.type
-			// 	}
-			// 	getOcrIdCard(params).then(res => {
-			// 		if (res.code == 200) {
-			// 			var datainfo = res.data;
-			// 			if (obj.type == 'front') {
-			// 				this.datainfo.realName = datainfo.realName;
-			// 				this.datainfo.idCard = datainfo.idCard;
-			// 				this.datainfo.address = datainfo.address;
-			// 			} else {
-			// 				this.datainfo.expirationDate = datainfo.expirationDate
-			// 			}
-			// 		}
-			// 	})
-			// }
+			getaddImagea(e){
+				if(this.isdisabled){
+					return
+				}
+				let that = this;
+				let file =[],count=9
+				uni.chooseImage({
+					count: 1,
+					success:function(res){
+						let img= res.tempFilePaths;
+						if(img.length + file.length > count){
+							uni.showToast({
+								title: '最多上传'+count+'张图片',
+								icon: 'none',
+								duration: 2000
+							})
+						}else{
+							let imglen = res.tempFilePaths.length;
+							var fuwufile = [];
+							uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+								var resurl=rs[0];
+								if(rs&&rs.length>0){
+									var obj={
+										url:resurl.urlOnline
+									}
+									that.getOcrIdCard(obj)
+								}
+							})	
+						}
+					}
+				});
+			},
+			getOcrIdCard(obj){
+				var params={
+					image:obj.url,
+				}
+				getlicensePlate(params).then(res=>{
+					if(res.code==200){
+						var code=res.msg;
+						if(code){
+							this.datainfo.plateNumber=code;
+						}
+					}
+				})
+			}
 		}
 	}
 </script>

+ 31 - 0
property_ui/plugins/amap-wx.130.js

@@ -0,0 +1,31 @@
+function AMapWX(a){this.key=a.key;this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};this.MeRequestConfig={key:a.key,serviceName:"https://restapi.amap.com/rest/me"}}
+AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(c){c=c.longitude+","+c.latitude;wx.setStorage({key:"userLocation",data:c});b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(d){d.data&&b(d.data)}});a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getMEKeywordsSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.city&&(d.city=b.city);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);b.sig&&(d.sig=
+b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/local",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEIdSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.id&&(d.id=b.id);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/id",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&
+0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEPolygonSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.polygon&&(d.polygon=b.polygon);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);
+b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/polygon",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEaroundSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.center&&(d.center=b.center);b.radius&&(d.radius=b.radius);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&
+(d.pageSize=b.pageSize);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/around",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getGeo=function(a){var b=this.requestConfig,c=a.options;b={key:this.key,extensions:"all",s:b.s,platform:b.platform,appname:this.key,sdkversion:b.sdkversion,logversion:b.logversion};c.address&&(b.address=c.address);c.city&&(b.city=c.city);c.batch&&(b.batch=c.batch);c.sig&&(b.sig=c.sig);wx.request({url:"https://restapi.amap.com/v3/geocode/geo",data:b,method:"GET",header:{"content-type":"application/json"},success:function(d){(d=d.data)&&d.status&&"1"===d.status?a.success(d):a.fail({errCode:"0",
+errMsg:d})},fail:function(d){a.fail({errCode:"0",errMsg:d.errMsg||""})}})};
+AMapWX.prototype.getRegeo=function(a){function b(d){var e=c.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:c.key,location:d,extensions:"all",s:e.s,platform:e.platform,appname:c.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){g=g.data.regeocode;var h=g.addressComponent,f=[],k=g.roads[0].name+"\u9644\u8fd1",m=d.split(",")[0],n=d.split(",")[1];if(g.pois&&
+g.pois[0]){k=g.pois[0].name+"\u9644\u8fd1";var l=g.pois[0].location;l&&(m=parseFloat(l.split(",")[0]),n=parseFloat(l.split(",")[1]))}h.provice&&f.push(h.provice);h.city&&f.push(h.city);h.district&&f.push(h.district);h.streetNumber&&h.streetNumber.street&&h.streetNumber.number?(f.push(h.streetNumber.street),f.push(h.streetNumber.number)):f.push(g.roads[0].name);f=f.join("");a.success([{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:k,longitude:m,latitude:n,id:0,regeocodeData:g}])}else a.fail({errCode:g.data.infocode,
+errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this;a.location?b(a.location):c.getWxLocation(a,function(d){b(d)})};
+AMapWX.prototype.getWeather=function(a){function b(g){var h="base";a.type&&"forecast"==a.type&&(h="all");wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:d.key,city:g,extensions:h,s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(f){if(f.data.status&&"1"==f.data.status)if(f.data.lives){if((f=f.data.lives)&&0<f.length){f=f[0];var k={city:{text:"\u57ce\u5e02",data:f.city},
+weather:{text:"\u5929\u6c14",data:f.weather},temperature:{text:"\u6e29\u5ea6",data:f.temperature},winddirection:{text:"\u98ce\u5411",data:f.winddirection+"\u98ce"},windpower:{text:"\u98ce\u529b",data:f.windpower+"\u7ea7"},humidity:{text:"\u6e7f\u5ea6",data:f.humidity+"%"}};k.liveData=f;a.success(k)}}else f.data.forecasts&&f.data.forecasts[0]&&a.success({forecast:f.data.forecasts[0]});else a.fail({errCode:f.data.infocode,errMsg:f.data.info})},fail:function(f){a.fail({errCode:"0",errMsg:f.errMsg||""})}})}
+function c(g){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:d.key,location:g,extensions:"all",s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(h){if(h.data.status&&"1"==h.data.status){h=h.data.regeocode;if(h.addressComponent)var f=h.addressComponent.adcode;else h.aois&&0<h.aois.length&&(f=h.aois[0].adcode);b(f)}else a.fail({errCode:h.data.infocode,errMsg:h.data.info})},
+fail:function(h){a.fail({errCode:"0",errMsg:h.errMsg||""})}})}var d=this,e=d.requestConfig;a.city?b(a.city):d.getWxLocation(a,function(g){c(g)})};
+AMapWX.prototype.getPoiAround=function(a){function b(e){e={key:c.key,location:e,s:d.s,platform:d.platform,appname:c.key,sdkversion:d.sdkversion,logversion:d.logversion};a.querytypes&&(e.types=a.querytypes);a.querykeywords&&(e.keywords=a.querykeywords);wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){if((g=g.data)&&g.pois){for(var h=[],f=0;f<g.pois.length;f++){var k=0==
+f?a.iconPathSelected:a.iconPath;h.push({latitude:parseFloat(g.pois[f].location.split(",")[1]),longitude:parseFloat(g.pois[f].location.split(",")[0]),iconPath:k,width:22,height:32,id:f,name:g.pois[f].name,address:g.pois[f].address})}a.success({markers:h,poisData:g.pois})}}else a.fail({errCode:g.data.infocode,errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this,d=c.requestConfig;a.location?b(a.location):c.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getStaticmap=function(a){function b(e){c.push("location="+e);a.zoom&&c.push("zoom="+a.zoom);a.size&&c.push("size="+a.size);a.scale&&c.push("scale="+a.scale);a.markers&&c.push("markers="+a.markers);a.labels&&c.push("labels="+a.labels);a.paths&&c.push("paths="+a.paths);a.traffic&&c.push("traffic="+a.traffic);e="https://restapi.amap.com/v3/staticmap?"+c.join("&");a.success({url:e})}var c=[];c.push("key="+this.key);var d=this.requestConfig;c.push("s="+d.s);c.push("platform="+d.platform);
+c.push("appname="+d.appname);c.push("sdkversion="+d.sdkversion);c.push("logversion="+d.logversion);a.location?b(a.location):this.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getInputtips=function(a){var b=Object.assign({},this.requestConfig);a.location&&(b.location=a.location);a.keywords&&(b.keywords=a.keywords);a.type&&(b.type=a.type);a.city&&(b.city=a.city);a.citylimit&&(b.citylimit=a.citylimit);wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.tips&&a.success({tips:c.data.tips})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||
+""})}})};
+AMapWX.prototype.getDrivingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.waypoints&&(b.waypoints=a.waypoints);a.avoidpolygons&&(b.avoidpolygons=a.avoidpolygons);a.avoidroad&&(b.avoidroad=a.avoidroad);wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths,
+taxi_cost:c.data.route.taxi_cost||""})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getWalkingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getTransitRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.city&&(b.city=a.city);a.cityd&&(b.cityd=a.cityd);wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&(c=c.data.route,a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||
+"",transits:c.transits}))},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getRidingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/riding",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};module.exports.AMapWX=AMapWX;

+ 2 - 7
property_ui/service/pages/service/patrol.vue

@@ -159,7 +159,7 @@
 			},
 			getCount(){
 				var params={};
-				params.checkTime=this.time()
+				params.createTime=this.time()
 				xgdjlCount(params).then(res=>{
 					if(res.code==200){
 						var data=res.data;
@@ -187,14 +187,9 @@
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
 				}
-				params.checkTime=this.time()
+				params.createTime=this.time()
 				if(this.tabval!=0){
 					params.checkStatus=this.tabval;
-					// if(this.tabval==2){
-					// 	params.checkTime=this.tabval;
-					// }else if(this.tabval==1){
-					// 	params.creatTime=this.tabval;
-					// }
 				}
 				// 
 				// xgdglList ,xgdjlList

+ 1 - 1
property_ui/service/pages/service/warrantydetail.vue

@@ -76,7 +76,7 @@
 				
 			</view>
 		</view>	
-		<view class="rfbtn" @click="getAssignFn" v-if="repairStatus==1">去指派</view>
+		<view class="rfbtn" @click="getAssignFn" v-if="repairStatus==1&&checkPermi(['wuYe:repair:assign'])">去指派</view>
 		<view class="rfbtn rfbga" @click="getCheckFn(1)" v-if="repairStatus==2">我已上门</view>
 		<view class="rfbtn rfbga" @click="getCheckFn(2)" v-if="repairStatus==3">我已完成</view>
 	<pop-up :type="type" @getClose='getClose' :bxlbList="bxlbList" :bxlb="datainfo.maintenanceCategory" :vxsztList="vxsztList" :peolist="peolist" :finshtype='repairStatus' @getSure="getSure"></pop-up>

+ 16 - 0
property_ui/utils/initmap.js

@@ -0,0 +1,16 @@
+import amap from '@/plugins/amap-wx.130.js';
+// 调用高德SDK
+var key='';
+// #ifdef H5
+key='fba818d626f91cf5a13cd61943a7667e'
+// #endif
+// #ifdef APP-PLUS
+key='ccbe52b1ec5f66295fa4609c90a819b7'
+// #endif
+// #ifdef MP-WEIXIN
+key='ccbe52b1ec5f66295fa4609c90a819b7'
+// #endif
+const myAmapFun =new amap.AMapWX({
+	key:key
+})
+export default myAmapFun

+ 295 - 0
property_ui/utils/location.js

@@ -0,0 +1,295 @@
+import myAmapFun from "@/utils/initmap.js"
+import {showConfirm} from '@/utils/common'
+
+var __CFG = null;
+//系统参数
+__CFG = __CFG || {
+	'lat': '',
+	'lng': '',
+	'address': '',
+	'city':'',
+	"UxLocation": {
+		"lng": "",
+		"lat": "",
+		"address": "",
+		'city':'',
+	},
+};
+function setUxLocation(UxLocation){
+    UxLocation = UxLocation || {};
+	__CFG.lng = UxLocation.lng || '';
+	__CFG.lat = UxLocation.lat || '';
+	__CFG.address = UxLocation.address || UxLocation.addr || '';
+	__CFG.city = UxLocation.city || UxLocation.city || '';
+	__CFG.UxLocation = UxLocation;
+}
+//设置浏览器cookie
+function set_cookie(key, value, expire, path){
+	var keys = __CFG.C_PREFIX + key;
+	path = path || '/';
+	var a = keys + "=" + value;
+	if(typeof(expire) != 'undefined'){
+		var date = new Date();
+		expire = parseInt(expire,10);
+		date.setTime(date.getTime() + expire*1000);
+		a += "; expires="+date.toGMTString();
+	}
+	a += ";path="+path;
+	if(__CFG.C_DOMAIN){
+		a += ";domain="+__CFG.C_DOMAIN;
+	}
+	document.cookie = a;
+};
+
+//删除浏览器cookie
+function remove_cookie(key){
+	if (!key) {
+		return false;
+	} else {
+		var keys = __CFG.C_PREFIX + key;
+		document.cookie = keys+"=;expires="+(new Date(0)).toGMTString();
+	}
+};
+
+//获取浏览器cookie
+function get_cookie(key) {
+	if (!key) {
+		return false;
+	} else {
+		var keys = __CFG.C_PREFIX + key;
+		var reg = new RegExp("(^| )" + keys + "=([^;]*)(;|\x24)");
+		var result = reg.exec(document.cookie);
+		if (result) {
+			return result[2] || '';
+		}
+		return '';
+	}
+};
+
+function getLocation(callback) {
+	
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+		var num=1;
+		// #ifdef MP-WEIXIN
+		uni.getSetting({
+			success(res) {
+				if(res.authSetting['scope.userLocation'] != undefined){
+					if (res.authSetting['scope.userLocation']) {
+						getLocationaddr(callback)
+						// 已经授权,可以直接调用 getLocation 获取地理位置
+					} else {
+						showConfirm('您还未开启定位,是否去开启定位?').then(cres => {
+						  if (cres.confirm) {
+						    uni.openSetting({
+						    	success(res2) {
+						    		if (res2.authSetting['scope.userLocation']) {
+						    			
+						    		}
+						    	}
+						    });
+							callback(-1)
+						  }
+						})
+					};
+				}else{
+					var uxlocation = {"lng": "", "lat": "", "address": ""};
+					// var citynum=1;
+					uni.getLocation({
+						type: 'gcj02',
+						geocode: 'true',
+						success: function(ares) {
+							uxlocation.lat = ares.latitude;
+							uxlocation.lng = res.longitude;
+							myAmapFun.getRegeo({
+								success: function(data) {
+									// citynum=0;
+									uxlocation.address = data[0].name+data[0].desc||data[0].regeocodeData.formatted_address;
+									uxlocation.city = data[0].regeocodeData.addressComponent.city;
+									setUxLocation(uxlocation);
+									// uni.hideLoading();
+									// console.log(uxlocation,23)
+									callback(uxlocation);
+									//成功回调
+								},
+								fail: function(info) {
+									//失败回调
+								}
+							})
+							// if(citynum==1){
+							// 	setUxLocation(uxlocation);
+							// 	callback(uxlocation);
+							// }
+						},
+						
+						fail: function(error) {
+							uni.showToast({
+								icon: 'none',
+								title: '定位失败'
+							})
+					
+							// #ifdef APP-PLUS
+							// #endif
+					
+						},
+						complete: function(rs) {
+							// console.log('complete:'+JSON.stringify(rs))
+						}
+					})
+				}
+			},
+			fail(err) {
+				console.log(err)
+			},
+		})
+		// #endif
+		// #ifdef APP-PLUS
+		let system = uni.getSystemInfoSync();
+			if(system.platform === "android"){
+				var context = plus.android.importClass("android.content.Context");
+				var locationManger = plus.android.importClass("android.location.LocationManager");
+				var main = plus.android.runtimeMainActivity();
+				var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+				if(!mainSvr.isProviderEnabled(locationManger.GPS_PROVIDER)){
+					uni.showModal({
+						title:"提示",
+						content:"请授权位置获取地址",
+						showCancel:false,
+							success() {
+								if(!mainSvr.isProviderEnabled(locationManger.GPS_PROVIDER)){
+									var Intent = plus.android.importClass("android.content.Intent");
+									var Settings = plus.android.importClass("android.provider.Settings");
+									var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+									main.startActivity(intent);
+								}else{
+									console.log("定位已开启")
+									_self.setSite()
+								}
+							}
+						})
+				}else{
+					plus.android.requestPermissions(
+						['android.permission.ACCESS_FINE_LOCATION'], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
+						function(resultObj) {
+							var result = 0;
+							for (var i = 0; i < resultObj.granted.length; i++) {
+								var grantedPermission = resultObj.granted[i];
+								console.log('已获取的权限:' + grantedPermission);
+								result = 1
+							}
+							for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+								var deniedPresentPermission = resultObj.deniedPresent[i];
+								console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+								result = 0
+							}
+							for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+								var deniedAlwaysPermission = resultObj.deniedAlways[i];
+								console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+								result = -1
+							}
+							// resolve(result);
+							// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
+							if (result != 1) {
+								showConfirm('您还未开启定位,是否去开启定位?').then(res => {
+								  if (res.confirm) {
+								    gotoAppPermissionSetting()
+									callback(result)
+								  }
+								})
+							}else{
+								getLocationaddr(callback)
+							}
+						},
+						function(error) {
+							console.log('申请权限错误:' + error.code + " = " + error.message);
+							// resolve({
+							// 	code: error.code,
+							// 	message: error.message
+							// });
+						}
+					);
+				}
+			}
+			
+		// #endif
+};
+// 跳转到**应用**的权限页面
+function gotoAppPermissionSetting() {
+	var isIos
+	// #ifdef APP-PLUS
+	isIos = (plus.os.name == "iOS")
+	// #endif
+	if (isIos) {
+		var UIApplication = plus.ios.import("UIApplication");
+		var application2 = UIApplication.sharedApplication();
+		var NSURL2 = plus.ios.import("NSURL");
+		// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");		
+		var setting2 = NSURL2.URLWithString("app-settings:");
+		application2.openURL(setting2);
+
+		plus.ios.deleteObject(setting2);
+		plus.ios.deleteObject(NSURL2);
+		plus.ios.deleteObject(application2);
+	} else {
+		var Intent = plus.android.importClass("android.content.Intent");
+		var Settings = plus.android.importClass("android.provider.Settings");
+		var Uri = plus.android.importClass("android.net.Uri");
+		var mainActivity = plus.android.runtimeMainActivity();
+		var intent = new Intent();
+		intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+		var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+		intent.setData(uri);
+		mainActivity.startActivity(intent);
+	}
+}
+function getLocationaddr(callback){
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	var uxlocation = {"lng": "", "lat": "", "address": ""};
+	uni.getLocation({
+		type: 'gcj02',
+		geocode: 'true',
+		success: function(res) {
+			uxlocation.lat = res.latitude;
+			uxlocation.lng = res.longitude;
+			myAmapFun.getRegeo({
+				success: function(data) {
+					uxlocation.address = data[0].name+data[0].desc||data[0].regeocodeData.formatted_address;
+					uxlocation.city = data[0].regeocodeData.addressComponent.city;
+					setUxLocation(uxlocation);
+					// uni.hideLoading();
+					// console.log(uxlocation,23)
+					callback(uxlocation);
+					//成功回调
+				},
+				fail: function(info) {
+					//失败回调
+					console.log(info,223)
+				}
+			})
+			// if(citynum==1){
+			// 	setUxLocation(uxlocation);
+			// 	callback(uxlocation);
+			// }
+		},
+		
+		fail: function(error) {
+			uni.showToast({
+				icon: 'none',
+				title: '定位失败'
+			})
+	
+			// #ifdef APP-PLUS
+			// #endif
+	
+		},
+		complete: function(rs) {
+			// console.log('complete:'+JSON.stringify(rs))
+		}
+	})
+}
+
+const self = {
+	getLocation,
+	setUxLocation,
+	__CFG
+}
+export default self

+ 0 - 24
property_ui/work/pages/manage/addhouse.vue

@@ -193,16 +193,6 @@
 	import {getDictionaryFn} from "@/api/system/user.js"
 	import {houseInfoAdd,houseInfoPut,houseInfoDet} from "@/api/work/work.js"
 	import {getrealEstateCertificatee} from "@/api/system/card.js"
-	var key='';
-	// #ifdef H5
-	key='8de52b560193f01932ad997dba3e76c0'
-	// #endif
-	// #ifdef APP-PLUS
-	key='ccbe52b1ec5f66295fa4609c90a819b7'
-	// #endif
-	// #ifdef MP-WEIXIN
-	key='ccbe52b1ec5f66295fa4609c90a819b7'
-	// #endif
 	export default{
 		components:{},
 		data(){
@@ -355,20 +345,6 @@
 					}
 				})
 			},
-			async getLocation(address) {
-			      if (!address) {
-			        uni.showToast({ title: '请输入地址', icon: 'none' });
-			        return;
-			      }
-			
-			      try {
-			        const { latitude, longitude } = await geocodeAddress(address, key);
-			        this.latitude = latitude;
-			        this.longitude = longitude;
-			      } catch (error) {
-			        uni.showToast({ title: '获取经纬度失败', icon: 'none' });
-			      }
-			},
 			getSubmit(){
 				this.$refs.form.validate().then(res => {
 					var params=JSON.parse(JSON.stringify(this.datainfo))