|
@@ -1030,7 +1030,7 @@ const onIptSetErrorTxt = (params = {}) => {
|
|
|
} else {
|
|
|
iptErrMsgTxt.value = "";
|
|
|
if(params.actionType != 'discord_blur') {
|
|
|
- setDiscordErrTxt();
|
|
|
+ setDiscordErrTxt({getDuildId: true});
|
|
|
}
|
|
|
}
|
|
|
} else if(currentCurrencyInfo.value.currencyCode != 'USD') {
|
|
@@ -1087,7 +1087,7 @@ const setDiscordErrTxt = (params = {showPop: false}) => {
|
|
|
if(discordData.text) {
|
|
|
let validata = checkInviteUrl(discordData.text);
|
|
|
if(validata) {
|
|
|
- getDiscordInviteInfo(discordData.text, (res) => {
|
|
|
+ getDiscordInviteInfo({inviteUrl: discordData.text, getDuildId: params.getDuildId}, (res) => {
|
|
|
console.log('discordData',res)
|
|
|
// 未知的邀请链接
|
|
|
if(res.inviteCode != res.data.code || !res.data.guildId) {
|
|
@@ -1103,15 +1103,15 @@ const setDiscordErrTxt = (params = {showPop: false}) => {
|
|
|
iptErrMsgTxt.value = '';
|
|
|
iptErrType = '';
|
|
|
}
|
|
|
- }
|
|
|
- if(params.showPop && res.data) {
|
|
|
- showDiscordInvitePop.value = true;
|
|
|
- setTimeout(() => {
|
|
|
- showDiscordInvitePop.value = false;
|
|
|
- }, 2000)
|
|
|
- }
|
|
|
- if(params.fromType == 'discord') {
|
|
|
- onIptSetErrorTxt();
|
|
|
+ if(params.showPop && res.data) {
|
|
|
+ showDiscordInvitePop.value = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ showDiscordInvitePop.value = false;
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+ if(params.fromType == 'discord') {
|
|
|
+ onIptSetErrorTxt();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -1169,14 +1169,14 @@ const checkInviteUrl = (inviteUrl) => {
|
|
|
}
|
|
|
|
|
|
/**获取discord 邀请信息 */
|
|
|
-const getDiscordInviteInfo = (inviteUrl, cb) => {
|
|
|
+const getDiscordInviteInfo = ({inviteUrl, getDuildId}, cb) => {
|
|
|
if(!inviteUrl) return;
|
|
|
let inviteCode = '';
|
|
|
let arr = inviteUrl.split('/');
|
|
|
if(arr.length > 0) {
|
|
|
inviteCode = arr[arr.length - 1];
|
|
|
}
|
|
|
- if(discordInviteInfo.value.guildId && discordInviteInfo.value.inviteCode == inviteCode) {
|
|
|
+ if(!getDuildId && discordInviteInfo.value.guildId && discordInviteInfo.value.inviteCode == inviteCode) {
|
|
|
return;
|
|
|
}
|
|
|
getInviteGuildInfo({
|