Commit 03926975 by fengzhaoyu

fix: 创建加限制

parent 3b2f5084
......@@ -20,4 +20,8 @@ view {
text-align: center;
color: #fff;
background: rgba(234, 12, 40, 1);
}
.gray {
background: rgba(10, 10, 10, 0.2)!important;
}
\ No newline at end of file
......@@ -106,8 +106,8 @@
</view>
</view>
<!-- 保存 -->
<view class="save" onTap="addSchedule">
<view class="button">
<view class="save" onTap="addSchedule1">
<view class="button {{limitClick ? 'gray' : ''}}">
立即创建
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
......
......@@ -46,9 +46,10 @@ create.Page({
isAcrossDay: false,
conflictPeople: [],
placeholder: '',
isIPX: false
isIPX: false,
limitClick: false,
},
limitClick: false,
showPop(event) {
this.setData({
show: true
......@@ -336,11 +337,15 @@ create.Page({
}
},
addSchedule: throttle(async function () {
if (this.limitClick) {
return false
addSchedule1: throttle(async function () {
if (this.data.limitClick) {
return
}
this.limitClick = true
console.log('我重复点击还是走到这了')
this.setData({ limitClick: true });
dd.showLoading({
content: '正在创建...',
});
let data = {
title: this.data.title || `${getApp().globalData.name}创建的会议`,
location: {
......@@ -360,10 +365,10 @@ create.Page({
meetingWayModel: this.data.meetingWayModel
}
const res = await addSchedule(data).catch(err => {
this.limitClick = false
this.setData({ limitClick: false });
dd.hideLoading();
});
if (res.data.code === 0) {
this.limitClick = false
this.$store.data.tabBarIndex = '1'
if (this.data.repeatable === 0) {
if (this.$store.addOnceMeeting) {
......@@ -380,6 +385,8 @@ create.Page({
await this.$store.modifyErpeatMeeting()
}
}
this.setData({ limitClick: false });
dd.hideLoading();
dd.navigateBack()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment