|
|
@@ -134,6 +134,7 @@ Page({
|
|
|
var url = 'v1/virtual_pay/recharge/status'
|
|
|
var success = function (res) {
|
|
|
if (res.data && res.data.state === 1) {
|
|
|
+ getApp().globalData.rechargeChanged = true
|
|
|
that.getCashTotal()
|
|
|
wx.showToast({
|
|
|
title: '充值成功',
|
|
|
@@ -171,6 +172,7 @@ Page({
|
|
|
that.setData({
|
|
|
lock: false
|
|
|
})
|
|
|
+ that.refreshPreviousPage()
|
|
|
console.log('that.data.source', that.data.source)
|
|
|
if (that.data.source) {
|
|
|
wx.navigateBack()
|
|
|
@@ -179,6 +181,22 @@ Page({
|
|
|
wx.navigateBack()
|
|
|
}
|
|
|
},
|
|
|
+ refreshPreviousPage () {
|
|
|
+ var pages = getCurrentPages()
|
|
|
+ var delta = this.data.source ? 2 : 1
|
|
|
+ var prevPage = pages[pages.length - 1 - delta]
|
|
|
+ if (!prevPage) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (prevPage.refreshBalancePage) {
|
|
|
+ prevPage.refreshBalancePage()
|
|
|
+ } else if (prevPage.refreshCashPage) {
|
|
|
+ prevPage.refreshCashPage()
|
|
|
+ } else if (prevPage.getCashTotal && prevPage.getCashList) {
|
|
|
+ prevPage.getCashTotal()
|
|
|
+ prevPage.getCashList()
|
|
|
+ }
|
|
|
+ },
|
|
|
onShareAppMessage: function (val) {
|
|
|
return _request.share({
|
|
|
sc: 'xcx_user_recharge'
|