diff --git a/miniprogram/api/meeting/meetingRoom.js b/miniprogram/api/meeting/meetingRoom.js
index 38702c0..a32081d 100644
--- a/miniprogram/api/meeting/meetingRoom.js
+++ b/miniprogram/api/meeting/meetingRoom.js
@@ -90,4 +90,12 @@ export function selectReservationByIdRq(id) {
url: '/api/roomContent/selectReservationById/' + id ,
method: "get",
});
+}
+
+// 获取公司地址信息经纬度
+export function selectCoordinateRq() {
+ return request({
+ url: '/api/roomContent/selectCoordinate',
+ method: "get",
+ });
}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/invite/invite.js b/miniprogram/pages/meeting/invite/invite.js
index 9b6416f..93cddc8 100644
--- a/miniprogram/pages/meeting/invite/invite.js
+++ b/miniprogram/pages/meeting/invite/invite.js
@@ -1,5 +1,17 @@
let app = getApp()
+import {
+ selfFormatTimeYMD,
+ selfFormatTimeHM,
+ twoTimeIntervalReturnHours
+} from "../../../utils/util.js"
+
+import {
+ selectReservationByIdRq,
+ selectCoordinateRq
+} from "../../../api/meeting/meetingRoom.js"
+
+
Page({
/**
@@ -8,24 +20,65 @@ Page({
data: {
IMG_NAME: app.IMG_NAME,
mapData: {
- latitude: 33.601291,
- longitude: 119.031829,
- markers: [{
- id: 1,
- latitude: 33.601291,
- longitude: 119.031829,
- title: '淮安茂业天地购物中心'
- }]
- }
+ // latitude: 33.601291,
+ // longitude: 119.031829,
+ // markers: [{
+ // id: 1,
+ // latitude: 33.601291,
+ // longitude: 119.031829,
+ // title: '淮安茂业天地购物中心'
+ // }]
+ },
+ id: null,
+ detail: null,
+ address: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
- // 页面初始化 options为页面跳转所带来的参数
- wx.setNavigationBarTitle({
- title: options.title
+ let _this = this;
+ _this.setData({
+ ...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
+ })
})
},
diff --git a/miniprogram/pages/meeting/invite/invite.wxml b/miniprogram/pages/meeting/invite/invite.wxml
index 7dbd173..524becf 100644
--- a/miniprogram/pages/meeting/invite/invite.wxml
+++ b/miniprogram/pages/meeting/invite/invite.wxml
@@ -2,8 +2,8 @@
- Foarter Space #1
- 江苏省淮安市清江浦区茂业广场
+ 创智中心大厦
+ {{address.address}}
@@ -11,24 +11,28 @@
- 邀请人
+ 发起人
- admin
- 100861008611
+ {{detail.userName}}
+ {{detail.phone}}
+
+ 会议主题
+ {{detail.title}}
+
会面地点
- 写字楼2513
+ {{detail.roomContent.address}}
会面时间
- 2024-01-01 12:20 ~ 2024-01-01 14:20
+ {{detail.timeSlot}}
接受邀请