chore(cp排行榜): 修复补签时一直出现报错弹窗
This commit is contained in:
parent
b217655395
commit
dc7ccbe6f8
@ -204,7 +204,7 @@ const getMyLotteryTicketCount = async () => {
|
||||
crystal.value = response.body || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ const getUserFragmentBackpack = async () => {
|
||||
debris.value = response.body?.[0]?.quantity || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ const getActivityResource = async () => {
|
||||
goodsList.value = response.body || []
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -380,7 +380,7 @@ const sweepstakes = async (consecutive = 1) => {
|
||||
openPopup('result') //打开中奖结果弹窗
|
||||
isRolling.value = false
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
isRolling.value = false
|
||||
}
|
||||
}
|
||||
@ -412,7 +412,7 @@ const getMyLotteryTicketCount = async () => {
|
||||
crystal.value = response.body || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ const getUserFragmentBackpack = async () => {
|
||||
debris.value = response.body?.[0]?.quantity || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -275,8 +275,7 @@ const getSignInStatus = async () => {
|
||||
signInInfo.value = response.body || {}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to get sign in status:', error)
|
||||
throw error
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,23 +287,22 @@ const getMyLotteryTicketCount = async () => {
|
||||
crystal.value = response.body || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取用户碎片背包
|
||||
const getUserFragmentBackpack = async () => {
|
||||
try {
|
||||
const response = await apiGetUserFragmentBackpack({
|
||||
let response = await apiGetUserFragmentBackpack({
|
||||
userId: getUserId(),
|
||||
// userId: '1957345312961527809',
|
||||
fragmentsIds: ['2011710323414081538'],
|
||||
})
|
||||
if (response.status) {
|
||||
debris.value = response.body?.[0]?.quantity || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,8 +327,9 @@ const postSignIn = async (rewards) => {
|
||||
TipsShow.value = true // 余额不足提示
|
||||
} else if (error.response.errorCode == 3287) {
|
||||
needCheckInTipsShow.value = true // 需要补签提示
|
||||
} else {
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
console.error('签到失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
@ -347,8 +346,9 @@ const postSignInSupplement = async (dayIndex) => {
|
||||
TipsShow.value = true // 余额不足提示
|
||||
} else if (error.response.errorCode == 3283) {
|
||||
needCheckInTipsShow.value = true // 需要补签提示
|
||||
} else {
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
console.error('补签失败:', error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -508,7 +508,7 @@ const apiGetRanking = async () => {
|
||||
myRanking.value = response.body.thisUser || {} // 我的排名
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ const apiGetTop3Rewards = async () => {
|
||||
rewardsTop3.value = response.body || [] // 前三名奖励
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1590,7 +1590,7 @@ const getMyLotteryTicketCount = async () => {
|
||||
crystal.value = response.body || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1606,7 +1606,7 @@ const getUserFragmentBackpack = async () => {
|
||||
debris.value = response.body?.[0]?.quantity || 0
|
||||
}
|
||||
} catch (error) {
|
||||
showError(error.errorMsg)
|
||||
showError(error.response.errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user