From 8a4aa492cd2ae390899f1b7221795d2267248964 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 8 Jan 2024 10:14:52 +0800 Subject: [PATCH] fix 80326 --- src/common/lang/system/en.js | 3 ++- src/common/lang/system/zh.js | 3 ++- .../system/firendshipLinkManage/FriendshipLinkList.vue | 6 ++++++ .../firendshipLinkManage/modules/FriendshipLinkModal.vue | 6 +++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/common/lang/system/en.js b/src/common/lang/system/en.js index a7db7c84..1db66d2f 100644 --- a/src/common/lang/system/en.js +++ b/src/common/lang/system/en.js @@ -82,7 +82,8 @@ module.exports = { link: 'Link', isShelf: 'Shelf Or Not', sort: 'Sort', - shelfWarn: 'the link is empty please fill in the link first' + shelfWarn: 'the link is empty please fill in the link first', + maxLinksReached: '当前上架链接已达上限!' }, // 联络人管理 contact: { diff --git a/src/common/lang/system/zh.js b/src/common/lang/system/zh.js index bcd8912d..74b713d8 100644 --- a/src/common/lang/system/zh.js +++ b/src/common/lang/system/zh.js @@ -83,7 +83,8 @@ module.exports = { link: '链接', isShelf: '是否上架', sort: '排序', - shelfWarn: '链接为空,请先填写链接' + shelfWarn: '链接为空,请先填写链接', + maxLinksReached: '当前上架链接已达上限!' }, // 联络人管理 contact: { diff --git a/src/views/system/firendshipLinkManage/FriendshipLinkList.vue b/src/views/system/firendshipLinkManage/FriendshipLinkList.vue index d5fb1d98..5c6373f6 100644 --- a/src/views/system/firendshipLinkManage/FriendshipLinkList.vue +++ b/src/views/system/firendshipLinkManage/FriendshipLinkList.vue @@ -164,6 +164,12 @@ export default { this.$message.warning(this.$t('system.friendshipLink.shelfWarn')) return } + // 1开启 0未开启 + if (this.dataSource.reduce((pre, cur) => pre += (cur.grounding ? 1 : 0), 0) > 6) { + this.$message.warning('最多上架六个友情链接') + record.grounding = false + return + } console.log(record) const param = Object.assign({}, record) param.grounding = record.grounding === true ? '1' : '0' diff --git a/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue b/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue index 067ad0a2..fb267d87 100644 --- a/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue +++ b/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue @@ -7,6 +7,7 @@ switchFullscreen @cancel="handleCancel" @ok="handleOk" + :confirm-loading="confirmLoading" :visible="visible"> @@ -129,7 +130,10 @@ export default { this.$message.warning(res.message) } }).finally(() => { - this.confirmLoading = false + // 防止连点提交 + setTimeout(() => { + this.confirmLoading = false + }, 700) }) } })