refactor: 统一调用 showComingSoon & 防止重复触发

- coming-soon-mixin: 全局 \.info 配置 3s 自动关闭、顶部居中
- fwsc/xqsc: 禁用 tab 改走 showComingSoon
- qych: 卡片按钮使用 showComingSoon,外部链接固定 _blank 打开
- hyzt: 进入专题时加 messageShowing 锁,避免连点产生重复 toast

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
liulong 2026-06-09 22:02:13 +08:00
parent cbb4096ea4
commit b57a015ae4
4 changed files with 19 additions and 9 deletions

View File

@ -15,6 +15,11 @@ export default {
prev.close() prev.close()
this[COMING_SOON_INSTANCE] = null this[COMING_SOON_INSTANCE] = null
} }
this.$message.config({
duration: 3000, // 3s后自动关闭
placement: 'top', // 顶部居中
offset: [0, 100], // 离顶部100px
})
this.$message.info(text).then((instance) => { this.$message.info(text).then((instance) => {
this[COMING_SOON_INSTANCE] = instance this[COMING_SOON_INSTANCE] = instance
}) })

View File

@ -424,7 +424,7 @@ export default {
}, },
goToTab({path, disable}) { goToTab({path, disable}) {
if (disable) { if (disable) {
this.$message.info('敬请期待'); this.showComingSoon();
return return
} }
this.$router.push(path); this.$router.push(path);

View File

@ -39,6 +39,7 @@
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
export default { export default {
name: 'hyzt', name: 'hyzt',
@ -55,11 +56,15 @@ export default {
return index === 2 ? '进入交易大厅' : '进入专题'; return index === 2 ? '进入交易大厅' : '进入专题';
}, },
goToHref(href) { goToHref(href) {
if (href) { if (this.messageShowing) return;
window.open(href, '_blank');
} else { this.messageShowing = true;
this.$message.info('敬请期待');
} this.$message.info('敬请期待');
setTimeout(() => {
this.messageShowing = false;
}, 3000);
}, },
}, },
}; };

View File

@ -325,10 +325,10 @@ export default {
methods: { methods: {
goPage(url) { goPage(url) {
if (url) { if (url) {
window.open(url); window.open(url, '_blank');
} else { return;
this.$message.info('敬请期待')
} }
this.showComingSoon();
}, },
handleCardBtnClick(item) { handleCardBtnClick(item) {
if (item.externalLink) { if (item.externalLink) {