mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 16:39:37 +08:00
描述:1
This commit is contained in:
parent
990bbc0cc8
commit
fb83bd6e31
@ -108,3 +108,21 @@ export function getMeetingRoomServiceAndEquipmentRq(id) {
|
|||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否参与过会议
|
||||||
|
export function roomContentIsVisitorRq(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/roomContent/isVisitor',
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 参与会议
|
||||||
|
export function roomContentAddVisitorRq(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/roomContent/addVisitor',
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
let app = getApp()
|
let app = getApp()
|
||||||
|
|
||||||
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
selfFormatTimeYMD,
|
selfFormatTimeYMD,
|
||||||
selfFormatTimeHM,
|
selfFormatTimeHM,
|
||||||
@ -8,7 +10,9 @@ import {
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
selectReservationByIdRq,
|
selectReservationByIdRq,
|
||||||
selectCoordinateRq
|
selectCoordinateRq,
|
||||||
|
roomContentIsVisitorRq,
|
||||||
|
roomContentAddVisitorRq
|
||||||
} from "../../../api/meeting/meetingRoom.js"
|
} from "../../../api/meeting/meetingRoom.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -143,7 +147,7 @@ Page({
|
|||||||
userAuthorizationSuccess(openid, user, token) {
|
userAuthorizationSuccess(openid, user, token) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.setData({
|
_this.setData({
|
||||||
authorizationShow : false
|
authorizationShow: false
|
||||||
})
|
})
|
||||||
|
|
||||||
// 清空所有缓存
|
// 清空所有缓存
|
||||||
@ -154,6 +158,61 @@ Page({
|
|||||||
wx.setStorageSync('userId', user.id)
|
wx.setStorageSync('userId', user.id)
|
||||||
wx.setStorageSync('token', token)
|
wx.setStorageSync('token', token)
|
||||||
|
|
||||||
|
// 判断是否参与过会议
|
||||||
|
_this.whetherParticipate();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 判断是否参与过会议
|
||||||
|
whetherParticipate() {
|
||||||
|
let _this = this
|
||||||
|
roomContentIsVisitorRq({
|
||||||
|
"userId": _this.data.detail.userId,
|
||||||
|
"participantId": wx.getStorageSync('userId'),
|
||||||
|
"reservationId": _this.data.detail.id,
|
||||||
|
}).then(res => {
|
||||||
|
console.log('whetherParticipate', res);
|
||||||
|
if (res.code == 0) { // 未预约
|
||||||
|
_this.setData({
|
||||||
|
participateShow: true
|
||||||
|
})
|
||||||
|
} else { // 已预约
|
||||||
|
_this.setData({
|
||||||
|
openDoorShow: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 参与会议
|
||||||
|
participateMeeting() {
|
||||||
|
let _this = this;
|
||||||
|
roomContentAddVisitorRq({
|
||||||
|
"userId": _this.data.detail.userId,
|
||||||
|
"participantId": wx.getStorageSync('userId'),
|
||||||
|
"reservationId": _this.data.detail.id,
|
||||||
|
"participantPhone": wx.getStorageSync('user').mobile
|
||||||
|
}).then(res => {
|
||||||
|
console.log('participateMeeting', res);
|
||||||
|
if (res.code == 0) { //参与成功
|
||||||
|
_this.setData({
|
||||||
|
participateShow: false,
|
||||||
|
openDoorShow: true
|
||||||
|
})
|
||||||
|
} else { //参与失败
|
||||||
|
Notify({
|
||||||
|
type: 'danger',
|
||||||
|
message: res.msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 开门
|
||||||
|
openDoor(){
|
||||||
|
Notify({
|
||||||
|
type: 'danger',
|
||||||
|
message: '尚未完成!'
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {
|
||||||
|
"van-notify": "@vant/weapp/notify/index"
|
||||||
|
},
|
||||||
"navigationBarTitleText": "邀请"
|
"navigationBarTitleText": "邀请"
|
||||||
}
|
}
|
@ -39,7 +39,10 @@
|
|||||||
<button class="loginBtn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>
|
<button class="loginBtn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>
|
||||||
</view>
|
</view>
|
||||||
<!-- 接受邀请 -->
|
<!-- 接受邀请 -->
|
||||||
<view class="submitBtn" wx:if="{{participateShow}}">接受邀请</view>
|
<view class="submitBtn" wx:if="{{participateShow}}" bind:tap="participateMeeting">接受邀请</view>
|
||||||
<!-- 点击开门 -->
|
<!-- 点击开门 -->
|
||||||
<view class="submitBtn" wx:if="{{openDoorShow}}">点击开门</view>
|
<view class="submitBtn" wx:if="{{openDoorShow}}" bind:tap="openDoor">点击开门</view>
|
||||||
|
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<van-notify id="van-notify" />
|
||||||
</view>
|
</view>
|
Loading…
x
Reference in New Issue
Block a user