This commit is contained in:
SelfRidicule 2024-03-06 18:09:17 +08:00
parent e83ddfcefb
commit bcfaf78e7c
3 changed files with 84 additions and 19 deletions

View File

@ -90,4 +90,12 @@ export function selectReservationByIdRq(id) {
url: '/api/roomContent/selectReservationById/' + id , url: '/api/roomContent/selectReservationById/' + id ,
method: "get", method: "get",
}); });
}
// 获取公司地址信息经纬度
export function selectCoordinateRq() {
return request({
url: '/api/roomContent/selectCoordinate',
method: "get",
});
} }

View File

@ -1,5 +1,17 @@
let app = getApp() let app = getApp()
import {
selfFormatTimeYMD,
selfFormatTimeHM,
twoTimeIntervalReturnHours
} from "../../../utils/util.js"
import {
selectReservationByIdRq,
selectCoordinateRq
} from "../../../api/meeting/meetingRoom.js"
Page({ Page({
/** /**
@ -8,24 +20,65 @@ Page({
data: { data: {
IMG_NAME: app.IMG_NAME, IMG_NAME: app.IMG_NAME,
mapData: { mapData: {
latitude: 33.601291, // latitude: 33.601291,
longitude: 119.031829, // longitude: 119.031829,
markers: [{ // markers: [{
id: 1, // id: 1,
latitude: 33.601291, // latitude: 33.601291,
longitude: 119.031829, // longitude: 119.031829,
title: '淮安茂业天地购物中心' // title: '淮安茂业天地购物中心'
}] // }]
} },
id: null,
detail: null,
address: {},
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// 页面初始化 options为页面跳转所带来的参数 let _this = this;
wx.setNavigationBarTitle({ _this.setData({
title: options.title ...options
})
// 获取详情
_this.getDetail();
// 获取地址信息
_this.getAddress()
},
// 获取地址信息
getAddress() {
let _this = this;
selectCoordinateRq().then(res => {
_this.setData({
address : res,
mapData: {
latitude: res.lat,
longitude: res.lng,
markers: [{
id: 1,
latitude: res.lat,
longitude: res.lng,
title: res.address,
}]
},
})
})
},
// 获取详情
getDetail() {
let _this = this;
let id = _this.data.id;
selectReservationByIdRq(id).then(res => {
let detail = res.data;
// 时间段
detail.timeSlot = selfFormatTimeYMD(detail.startTime) + ' ' + selfFormatTimeHM(detail.startTime) + '~' + selfFormatTimeHM(detail.endDate);
_this.setData({
detail
})
}) })
}, },

View File

@ -2,8 +2,8 @@
<!-- 顶部标题信息 --> <!-- 顶部标题信息 -->
<view class="topHead"> <view class="topHead">
<view class="name">Foarter Space #1</view> <view class="name">创智中心大厦</view>
<view class="address">江苏省淮安市清江浦区茂业广场</view> <view class="address">{{address.address}}</view>
</view> </view>
<!-- 地图 --> <!-- 地图 -->
@ -11,24 +11,28 @@
<!-- 邀请人信息 --> <!-- 邀请人信息 -->
<view class="personView"> <view class="personView">
<view class="label">邀请人</view> <view class="label">发起人</view>
<view class="item"> <view class="item">
<image class="headImg" src="{{IMG_NAME + '/profile/static/index/banner/1.jpg'}}" mode="aspectFill"></image> <image class="headImg" src="{{IMG_NAME + '/profile/static/index/banner/1.jpg'}}" mode="aspectFill"></image>
<view class="dataView"> <view class="dataView">
<view class="name">admin</view> <view class="name">{{detail.userName}}</view>
<view class="phone">100861008611</view> <view class="phone">{{detail.phone}}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 其他信息 --> <!-- 其他信息 -->
<view class="otherView">
<view class="title">会议主题</view>
<view class="content">{{detail.title}}</view>
</view>
<view class="otherView"> <view class="otherView">
<view class="title">会面地点</view> <view class="title">会面地点</view>
<view class="content">写字楼2513</view> <view class="content">{{detail.roomContent.address}}</view>
</view> </view>
<view class="otherView"> <view class="otherView">
<view class="title">会面时间</view> <view class="title">会面时间</view>
<view class="content">2024-01-01 12:20 ~ 2024-01-01 14:20</view> <view class="content">{{detail.timeSlot}}</view>
</view> </view>
<!-- 确认支付 --> <!-- 确认支付 -->
<view class="submitBtn">接受邀请</view> <view class="submitBtn">接受邀请</view>