Browse Source

fix(Walletflow): 修复生命周期钩子函数调用顺序问题

修复Walletflow页面onLoad和onShow生命周期钩子函数调用顺序,确保数据正确加载
修改recharge页面充值成功后的跳转逻辑和样式
master
前端-胡立永 2 weeks ago
parent
commit
264769cdd6
2 changed files with 10 additions and 3 deletions
  1. +5
    -0
      pages_order/mine/Walletflow.vue
  2. +5
    -3
      pages_order/mine/recharge.vue

+ 5
- 0
pages_order/mine/Walletflow.vue View File

@ -93,8 +93,13 @@
}, },
onLoad() { onLoad() {
this.getAccountBalance(); this.getAccountBalance();
},
onShow() {
this.getFlowList(); this.getFlowList();
}, },
onReachBottom() {
this.loadMore()
},
methods: { methods: {
// //
getAccountBalance() { getAccountBalance() {


+ 5
- 3
pages_order/mine/recharge.vue View File

@ -188,14 +188,16 @@
uni.showToast({ uni.showToast({
title: `充值成功,获得${this.totalBeans}豆豆`, title: `充值成功,获得${this.totalBeans}豆豆`,
icon: 'success'
icon: 'none'
}) })
// //
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
setTimeout(() => { setTimeout(() => {
uni.navigateBack()
uni.reLaunch({
url: '/pages/index/center'
})
}, 1500) }, 1500)
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
@ -268,7 +270,7 @@
} }
.package-item { .package-item {
width: calc(50% - 8rpx);
width: calc(50% - 16rpx);
background: #f8f9ff; background: #f8f9ff;
border: 2rpx solid #f0f0f0; border: 2rpx solid #f0f0f0;
border-radius: 16rpx; border-radius: 16rpx;


Loading…
Cancel
Save