fix: 充值体验修复——回调写星尘流水(明细页有记录)+重推幂等+退款回调写流水+充值成功返回我的+我的页onShow刷新余额

This commit is contained in:
Hermes Agent
2026-09-14 15:21:24 +08:00
parent e6cb577305
commit c7d4158aca
3 changed files with 67 additions and 30 deletions
+8 -2
View File
@@ -108,7 +108,7 @@
</template>
<script setup>
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { ref, computed, onMounted } from 'vue'
import { useUserStore } from '@/stores/user'
import { knowledgeApi, aiChatApi, request } from '@/utils/api'
@@ -174,9 +174,15 @@ const quotaPercent = computed(() => {
onMounted(() => {
loadStats()
if (userStore.isLoggedIn) {
loadVpayInfo()
userStore.fetchMe()
loadCollected()
}
})
// 每次进入/返回本页都刷新余额与额度(充值页支付成功后返回时余额同步)
onShow(() => {
if (userStore.isLoggedIn) {
loadVpayInfo()
loadQuota()
}
})