浏览代码

[edit][按钮]

zhangwei 2 年之前
父节点
当前提交
3ba6acaa1a
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 1 1
      src/view/iframe/treasure-hunt/components/btn.vue
  2. 1 2
      src/view/iframe/treasure-hunt/cover.vue

+ 1 - 1
src/view/iframe/treasure-hunt/components/btn.vue

@@ -47,7 +47,7 @@ let props = defineProps({
 const emit = defineEmits(['on-click'])
 
 const clickBtn = () => {
-    if (!props.disabled) {
+    if (props.disabled == false && props.loading == false) {
         emit('on-click')
     }
 }

+ 1 - 2
src/view/iframe/treasure-hunt/cover.vue

@@ -310,7 +310,7 @@ async function clickBtn() {
         window.open('https://twitter.com/search?q=%23denet');
         return
     }
-
+    state.btn_loading = true
 
     Report.reportLog({
         businessType: Report.businessType.buttonClick,
@@ -321,7 +321,6 @@ async function clickBtn() {
         postId: state.postId
     });
 
-    state.btn_loading = true
     setTimeout(() => {
         if (state.btn_loading == true) {
             state.btn_loading = false