fix 80326

This commit is contained in:
danshihao
2024-01-08 10:14:52 +08:00
parent 677bf4bc71
commit 8a4aa492cd
4 changed files with 15 additions and 3 deletions
+2 -1
View File
@@ -82,7 +82,8 @@ module.exports = {
link: 'Link', link: 'Link',
isShelf: 'Shelf Or Not', isShelf: 'Shelf Or Not',
sort: 'Sort', 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: { contact: {
+2 -1
View File
@@ -83,7 +83,8 @@ module.exports = {
link: '链接', link: '链接',
isShelf: '是否上架', isShelf: '是否上架',
sort: '排序', sort: '排序',
shelfWarn: '链接为空,请先填写链接' shelfWarn: '链接为空,请先填写链接',
maxLinksReached: '当前上架链接已达上限!'
}, },
// 联络人管理 // 联络人管理
contact: { contact: {
@@ -164,6 +164,12 @@ export default {
this.$message.warning(this.$t('system.friendshipLink.shelfWarn')) this.$message.warning(this.$t('system.friendshipLink.shelfWarn'))
return 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) console.log(record)
const param = Object.assign({}, record) const param = Object.assign({}, record)
param.grounding = record.grounding === true ? '1' : '0' param.grounding = record.grounding === true ? '1' : '0'
@@ -7,6 +7,7 @@
switchFullscreen switchFullscreen
@cancel="handleCancel" @cancel="handleCancel"
@ok="handleOk" @ok="handleOk"
:confirm-loading="confirmLoading"
:visible="visible"> :visible="visible">
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
@@ -129,7 +130,10 @@ export default {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => { }).finally(() => {
this.confirmLoading = false // 防止连点提交
setTimeout(() => {
this.confirmLoading = false
}, 700)
}) })
} }
}) })