Commit 753a2c50 by fengzhaoyu

fix: 修改多次创建问题

parent 1c04d685
...@@ -48,7 +48,7 @@ create.Page({ ...@@ -48,7 +48,7 @@ create.Page({
placeholder: '', placeholder: '',
isIPX: false isIPX: false
}, },
limitClick: false,
showPop(event) { showPop(event) {
this.setData({ this.setData({
show: true show: true
...@@ -337,6 +337,10 @@ create.Page({ ...@@ -337,6 +337,10 @@ create.Page({
}, },
addSchedule: throttle(async function () { addSchedule: throttle(async function () {
if (this.limitClick) {
return false
}
this.limitClick = true
let data = { let data = {
title: this.data.title || `${getApp().globalData.name}创建的会议`, title: this.data.title || `${getApp().globalData.name}创建的会议`,
location: { location: {
...@@ -355,8 +359,11 @@ create.Page({ ...@@ -355,8 +359,11 @@ create.Page({
meetingRoomId: this.$store.data.roomId, meetingRoomId: this.$store.data.roomId,
meetingWayModel: this.data.meetingWayModel meetingWayModel: this.data.meetingWayModel
} }
const res = await addSchedule(data); const res = await addSchedule(data).catch(err => {
this.limitClick = false
});
if (res.data.code === 0) { if (res.data.code === 0) {
this.limitClick = false
this.$store.data.tabBarIndex = '1' this.$store.data.tabBarIndex = '1'
if (this.data.repeatable === 0) { if (this.data.repeatable === 0) {
if (this.$store.addOnceMeeting) { if (this.$store.addOnceMeeting) {
...@@ -368,7 +375,6 @@ create.Page({ ...@@ -368,7 +375,6 @@ create.Page({
id: res.data.data.id id: res.data.data.id
}) })
} }
} else { } else {
if (this.$store.modifyErpeatMeeting) { if (this.$store.modifyErpeatMeeting) {
await this.$store.modifyErpeatMeeting() await this.$store.modifyErpeatMeeting()
......
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