✨ 个人中心:优化登录后的数据读取
This commit is contained in:
+4
-2
@@ -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>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
]">
|
||||
<view class="">
|
||||
<view class="num-title">当前余额(元)</view>
|
||||
<view class="wallet-num">{{ fen2yuan(userInfo.money) }}</view>
|
||||
<view class="wallet-num">{{ fen2yuan(userWallet.balance) }}</view>
|
||||
</view>
|
||||
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/recharge-log')">
|
||||
充值记录
|
||||
@@ -48,7 +48,7 @@
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
import PayWalletApi from '@/sheep/api/pay/wallet';
|
||||
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="ss-flex ss-row-between ss-col-center ss-m-t-64">
|
||||
<view class="money-num">{{ state.showMoney ? fen2yuan(userInfo.money) : '*****' }}</view>
|
||||
<view class="money-num">{{ state.showMoney ? fen2yuan(userWallet.balance) : '*****' }}</view>
|
||||
<button class="ss-reset-button topup-btn" @tap="sheep.$router.go('/pages/pay/recharge')">
|
||||
充值
|
||||
</button>
|
||||
@@ -122,7 +122,8 @@
|
||||
value: '2',
|
||||
},
|
||||
];
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
|
||||
// 格式化时间段
|
||||
const dateFilterText = computed(() => {
|
||||
@@ -167,6 +168,8 @@
|
||||
state.date = [state.today, state.today];
|
||||
getLogList();
|
||||
getSummary();
|
||||
// 刷新钱包的缓存
|
||||
sheep.$store('user').getWallet();
|
||||
});
|
||||
|
||||
// 处理 tab 切换
|
||||
|
||||
Reference in New Issue
Block a user