panhui hace 3 años
padre
commit
bfd043ea3d
Se han modificado 1 ficheros con 16 adiciones y 14 borrados
  1. 16 14
      src/components/rice/Share.vue

+ 16 - 14
src/components/rice/Share.vue

@@ -88,20 +88,22 @@ const shareUser = ref({});
 const shareTips = ref('');
 const shareTips = ref('');
 const shareSucc = ref(0);
 const shareSucc = ref(0);
 onMounted(() => {
 onMounted(() => {
-    if (store.state.riceShare) {
-        showHelp.value = true;
-        http.http
-            .post('/riceInvite/helpOthers', {
-                helperId: store.state.userInfo.id,
-                helpeeId: store.state.shareRiceId
-            })
-            .then(res => {
-                shareTips.value = res.msg;
-                shareUser.value = res.map;
-                shareSucc.value = Number(res.code);
-                store.commit('setRiceShare', false);
-            });
-    }
+    setTimeout(() => {
+        if (store.state.riceShare) {
+            showHelp.value = true;
+            http.http
+                .post('/riceInvite/helpOthers', {
+                    helperId: store.state.userInfo.id,
+                    helpeeId: store.state.shareRiceId
+                })
+                .then(res => {
+                    shareTips.value = res.msg;
+                    shareUser.value = res.map;
+                    shareSucc.value = Number(res.code);
+                    store.commit('setRiceShare', false);
+                });
+        }
+    }, 1000);
 });
 });
 </script>
 </script>