mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 14:19:38 +08:00
1
This commit is contained in:
parent
ba9882a3a3
commit
c0aca237b7
@ -134,3 +134,12 @@ export function roomContentAddVisitorRq(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 取消预约
|
||||
export function cancelOrderRq(data) {
|
||||
return request({
|
||||
url: '/api/roomContent/cancelOrder',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
const app = getApp()
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM
|
||||
@ -7,7 +10,8 @@ import {
|
||||
|
||||
import {
|
||||
selectReservationListByUserIdRq,
|
||||
selectVisitorInvitationRecordRq
|
||||
selectVisitorInvitationRecordRq,
|
||||
cancelOrderRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
@ -263,6 +267,39 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
cancelOrder(e) {
|
||||
console.log('cancelOrder', e);
|
||||
let id = e.currentTarget.dataset.id
|
||||
const beforeClose = (action) => {
|
||||
console.log('action', action);
|
||||
return new Promise((resolve) => {
|
||||
if (action === 'confirm') {
|
||||
cancelOrderRq({
|
||||
id,
|
||||
cancelResaon: ""
|
||||
}).then(res => {
|
||||
console.log('cancelOrderRq', res);
|
||||
if (res.code == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
resolve(true);
|
||||
})
|
||||
} else {
|
||||
// 拦截取消操作
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '是否要取消订单!',
|
||||
beforeClose,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@ -2,7 +2,9 @@
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
},
|
||||
"navigationBarTitleText": "会议预约记录",
|
||||
"onReachBottomDistance": 100
|
||||
|
@ -23,7 +23,7 @@
|
||||
<view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||
<button class="shareBtn" open-type="share" data-id="{{item.id}}">转发</button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{item.showCancel}}">取消订单</view>
|
||||
<view class="btn" wx:if="{{item.showCancel}}" bind:tap="cancelOrder" data-id="{{item.id}}">取消订单</view>
|
||||
<view class="btn" wx:if="{{item.showDetail}}" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -53,4 +53,9 @@
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
|
||||
</view>
|
Loading…
x
Reference in New Issue
Block a user