zouling 2 місяців тому
батько
коміт
131eabbcea

+ 4 - 3
user_ui/config.js

@@ -1,9 +1,10 @@
 // 应用全局配置
 module.exports = {
-  // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  // baseUrl: 'http://47.99.82.249:5010/prod-api',
-  baseUrl: 'http://192.168.101.245:8065',
+  baseUrl: 'https://zhsq.qs163.cn/prod-api',
+  // baseUrl: 'http://47.99.82.249:5011/prod-api',
+  // baseUrl: 'http://192.168.101.245:8065',
   // baseUrl: 'http://192.168.101.168:8065',
+  // baseUrl: 'http://10.90.90.52:8065',
   // baseUrlimg: 'http://114.99.127.243:2001',
   baseName:'智慧社区用户端',
   // 应用信息

+ 4 - 3
user_ui/work/pages/visitor/vdetail.vue

@@ -51,7 +51,7 @@
 				</view>
 				<view class="adrbox mb16">
 					<view class="tit mb10">房屋地址</view>
-					<view class="txt">{{datainfo.houseAddress}}</view>
+					<view class="txt">{{datainfo.detailAddress}}{{datainfo.houseAddress}}</view>
 				</view>
 				<view class="adrbox">
 					<view class="flexc mb6">
@@ -67,7 +67,7 @@
 				</view>
 			</view>
 			<!-- #ifdef APP-PLUS -->
-			<view class="rhbtn mt30" @click="getShareFn">分享</view>
+			<!-- <view class="rhbtn mt30" @click="getShareFn">分享</view> -->
 			<!-- #endif -->
 			<!-- #ifdef MP-WEIXIN -->
 			<button open-type="share" class="rhbtn mt30">分享</button>
@@ -177,10 +177,11 @@
 				
 			},
 			getShareFn(){
+				 this.$tab.navigateTo(`/work/pages/visitor/vshare?id=${this.id}&cflag=${this.checkflag}`)
 				// #ifdef APP-PLUS
 					uni.shareWithSystem({
 					  summary: '邀请你来我家',
-					  href: 'http://192.168.101.147:9091',
+					  href: 'https://zhsq.qs163.cn/work/pages/visitor/vshare/id='+this.id+'&cflag'+this.checkflag,
 					  success(){
 					    // 分享完成,请注意此时不一定是成功分享
 					  },

+ 94 - 57
user_ui/work/pages/visitor/vshare.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="warrbox flexdc" :style="'padding-top:'+nvaHeight+'px;'">
 		<view class="navbox">
-			<uni-nav-bar title="地址分享" left-icon="left" @clickLeft="getBackFn"  color="#FFFFFF" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">	
+			<uni-nav-bar title="访客信息" left-icon="left" @clickLeft="getBackFn"  color="#FFFFFF" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">	
 			</uni-nav-bar>
 		</view>
 		<!-- <image :src="mbg" class="navbg"></image> -->
@@ -13,19 +13,19 @@
 					<view class="line lib"></view>
 				</view>
 				<view class="vdlist mb26">
-					<view class="list"><text>访客姓名:</text>王女士</view>
-					<view class="list"><text>来访时间:</text>2024-11-20  10:00</view>
+					<view class="list"><text>访客姓名:</text>{{datainfo.name}}</view>
+					<view class="list"><text>来访时间:</text>{{datainfo.visitorTime}}</view>
 					<view class="flexc">
-						<view class="list mw50"><text>来访人数:</text>1人</view>
-						<view class="list mw50"><text>来访事由:</text>亲友</view>
+						<view class="list mw50"><text>来访人数:</text>{{datainfo.num}}人</view>
+						<view class="list mw50"><text>来访事由:</text>{{datainfo.reason}}</view>
 					</view>
 					<view class="flexc">
-						<view class="list mw50"><text>车牌号码:</text>皖A B8888</view>
-						<view class="list mw50"><text>手机号码:</text>1870566558</view>
+						<view class="list mw50"><text>车牌号码:</text>{{datainfo.plateNumber||''}}</view>
+						<view class="list mw50"><text>手机号码:</text>{{datainfo.mobileNumber}}</view>
 					</view>	
 				</view>
 				<!-- 地图 -->
-				<view class="mb22">
+				<view class="mb22" v-if="checkflag">
 					<map
 						id="container"
 						class="map"
@@ -34,20 +34,19 @@
 						@poitap="onClcikImgMap"
 						@tap="onClcikImgMap"
 						:markers="covers"
-						scale="17"
-						:style="'width: 638rpx;height:280rpx;'"
+						scale="18"
+						style="width: 638rpx;height:280rpx;"
 					></map>
 				</view>
-				<view class="adrbox mb16">
+				<!-- <view class="adrbox mb16">
 					<view class="tit mb10">分享人</view>
-					<view class="txt">袁玥</view>
-				</view>
+					<view class="txt">{{datainfo.houseAddress||"分享人"}}</view>
+				</view> -->
 				<view class="adrbox mb16">
 					<view class="tit mb10">房屋地址</view>
-					<view class="txt">安徽省合肥市蜀山区高新技术产业开发区幸福大街88号
-幸福小区5#1304</view>
+					<view class="txt">{{datainfo.detailAddress}}{{datainfo.houseAddress}}</view>
 				</view>
-			</view>	
+			</view>
 		</view>	
 	<loading></loading>	
 	</view>
@@ -56,43 +55,67 @@
 <script>
 	import config from '@/config'
 	const baseUrl = config.baseUrl
+	import {geocodeAddress} from '@/utils/common.js'
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {reservDet} from "@/api/work/people.js"
+	var key='';
+	// #ifdef H5
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
+	// #ifdef APP-PLUS
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
+	// #ifdef MP-WEIXIN
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
 	export default{
 		components:{},
 		data(){
 			return{
 				check: require('@/mine/static/check.png'),
 				ncheck: require('@/mine/static/ncheck.png'),
+				mapimg: require("@/work/static/visitor/adr.png"),
 				nvaHeight:44,
 				checkflag:false,
 				backgroundColor: "transparent",
 				baseUrl:config.baseUrl,
-				type:'',
-				finshtype:3,
+				mapContext:'',
 				center:{
-					lng:'117.211954',
-					lat:'31.839676',
+					lng:'',
+					lat:'',
 				},
-				covers: [{
-					id:0,
-					latitude: '31.839676',
-					longitude: '117.211954',
-					width:18,   //宽
-					height:19,   //高
-					iconPath: require("@/static/images/home/adr.png"),
-					anchor:{x: 0.5, y: 0.5}
-				}],
+				covers:[],
+				// covers: [{
+				// 	id:0,
+				// 	latitude: '31.839676',
+				// 	longitude: '117.211954',
+				// 	width:18,   //宽
+				// 	height:19,   //高
+				// 	iconPath: require("@/work/static/visitor/adr.png"),
+				// 	anchor:{x: 0.5, y: 0.5}
+				// }],
+				id:'',
+				datainfo:{},
 			}
 		},
-		onLoad: function() {
+		onLoad: function(e) {
 			uni.getSystemInfo({
 				success: (e) => {
 					this.nvaHeight = Number(e.statusBarHeight)+44;
 				}
 			})
+			if(e.id){
+				this.id=e.id;
+				this.getDetail()
+			}
+			this.checkflag=e.cflag;
+			if(this.checkflag){
+				this.getcreateMap()
+			}
+			console.log(this.checkflag)
 		},
 		onReady() {
-			this.getcreateMap()
+			
 		},
 		onPageScroll(e) {
 			var scrollTop = Number(e.scrollTop);
@@ -108,11 +131,8 @@
 				//mapId 就是你在 map 标签中定义的 id
 				this.mapContext = uni.createMapContext('container', this);
 			},
-			getAssignFn(){
-				this.type='assign'
-			},
-			getCheckFn(){
-				this.type='assigncheck'
+			onClcikImgMap(){
+				
 			},
 			getOpenFn(){
 				
@@ -122,33 +142,50 @@
 					delta:1
 				})
 			},
-			getClose(){
-				this.type='';
-			},
-			getSure(){
-				this.type='';
-			},
 			getPhoneFn(){
 				uni.makePhoneCall({
 					phoneNumber: '114' //仅为示例
 				});
 			},
-			getPreviewImage(arr,idx){
-				var newArr=[];
-				arr.forEach(ite=>{
-					var ds=this.baseUrl+ite
-					newArr.push(ds)
-				})
-				uni.previewImage({
-					urls: newArr,
-					current:idx,
-					success: function(data) {
-						
-					},
-					fail: function(err) {
-						
+			async getLocation(address) {
+				console.log(address,111)
+				var that=this;
+			      if (!address) {
+			        uni.showToast({ title: '请输入地址', icon: 'none' });
+			        return;
+			      }
+			
+			      try { 
+			        const { latitude, longitude } = await geocodeAddress(address, key);
+			        this.center.lat = latitude;
+			        this.center.lng = longitude;
+					console.log(latitude,longitude)
+					that.covers = [];
+					that.covers = [{
+						id:3,
+						width:18,   //宽
+						height:19,   //高
+						latitude: latitude,
+						longitude: longitude,
+						iconPath: that.mapimg,
+						anchor:{x: 0.5, y: 0.5}
+					}]
+			      } catch (error) {
+			        // uni.showToast({ title: '获取经纬度失败', icon: 'none' });
+			      }
+			},
+			getDetail(){
+				reservDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						this.chooseValue=res.data.portalId;
+						console.log(res.data.detailAddress&&this.checkflag)
+						if(res.data.detailAddress&&this.checkflag){
+							console.log(11)
+							// this.getLocation(res.data.detailAddress)
+						}
 					}
-				});
+				})
 			},
 		}
 	}