个人中心:优化登录后的数据读取

This commit is contained in:
YunaiV
2023-12-28 22:00:07 +08:00
parent 1a07dc4a40
commit c3cc5d653d
12 changed files with 125 additions and 171 deletions
+4 -2
View File
@@ -38,7 +38,7 @@
</view>
<view class="check-box ss-flex ss-col-center ss-p-l-10">
<view class="userInfo-money ss-m-r-10" v-if="item.value === 'wallet'">
余额: {{ fen2yuan(userInfo.money) }}
余额: {{ fen2yuan(userWallet.money) }}
</view>
<radio
:value="item.value"
@@ -83,7 +83,7 @@
import PayChannelApi from '@/sheep/api/pay/channel';
import { getPayMethods } from '@/sheep/platform/pay';
const userInfo = computed(() => sheep.$store('user').userInfo);
const userWallet = computed(() => sheep.$store('user').userWallet);
// 检测支付环境
const state = reactive({
@@ -189,6 +189,8 @@
state.orderType = options.orderType;
}
setOrder(id);
// 刷新钱包的缓存
sheep.$store('user').getWallet();
});
</script>