Commit 62f3c838 authored by 劳琪峰's avatar 劳琪峰

chore: 修复新用户登录后没有进行助力的问题

parent 5b0607d2
...@@ -67,7 +67,6 @@ async function tryAssist() { ...@@ -67,7 +67,6 @@ async function tryAssist() {
duration: 2000 duration: 2000
}); });
isAssist.value = true; isAssist.value = true;
// 助力成功后重新获取数据
await updateInvitationInfo(); await updateInvitationInfo();
return Promise.resolve(); return Promise.resolve();
} else { } else {
...@@ -91,7 +90,7 @@ async function tryAssist() { ...@@ -91,7 +90,7 @@ async function tryAssist() {
} }
async function initComponent() { async function initComponent() {
await tryAssist() await tryAssist().catch(console.log) // catch是为了不阻断逻辑
await updateInvitationInfo() await updateInvitationInfo()
...@@ -128,7 +127,7 @@ onMounted(async () => { ...@@ -128,7 +127,7 @@ onMounted(async () => {
<template <template
v-for="i in 2"> v-for="i in 2">
<image <image
v-if="i-1 < 2 - invitationInfo.nextRewardNeedCount" v-if="isLogin ? i-1 < 2 - invitationInfo.nextRewardNeedCount : false"
class="avatar" class="avatar"
:src="getCdnUrl('home/icon-fill.png')" :src="getCdnUrl('home/icon-fill.png')"
/> />
......
...@@ -62,6 +62,7 @@ const isLogin = computed(()=>{ ...@@ -62,6 +62,7 @@ const isLogin = computed(()=>{
}) })
function updateShareData(data) { function updateShareData(data) {
console.log('updateShareData:', data)
Object.assign(shareData.value, data) Object.assign(shareData.value, data)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment