Browse Source

[fix] bug

A\An 2 years ago
parent
commit
5bc1d0b555
1 changed files with 18 additions and 3 deletions
  1. 18 3
      src/view/iframe/publish/give-dialog.vue

+ 18 - 3
src/view/iframe/publish/give-dialog.vue

@@ -1435,7 +1435,18 @@ const getDiscordInviteInfo = ({inviteUrl, getDuildId}, cb) => {
         }, {
         }, {
             err: err
             err: err
         });
         });
-        getGuildInfoByOpenApi({inviteCode}, cb);
+
+        let errMsg = err;
+        if(typeof errMsg == 'object') {
+            errMsg = JSON.stringify(err);
+        }
+        if(errMsg.indexOf('code 404') > -1) {
+            discordInviteInfo.value = {};
+            iptErrMsgTxt.value = discordIptErrTxt;
+        } else {
+            getGuildInfoByOpenApi({inviteCode}, cb);
+
+        }
     });
     });
 }
 }
 
 
@@ -1494,8 +1505,12 @@ const inviteGuildResHandler = (res, params) => {
             icon,
             icon,
         }
         }
     }
     }
-    discordInviteInfo.value = resData.data;
-
+    if(res.code == inviteCode) {
+         discordInviteInfo.value = resData.data;
+    } else {
+        discordInviteInfo.value = {};
+        iptErrMsgTxt.value = discordIptErrTxt;
+    }
     return resData;
     return resData;
 };
 };