Commit 05346ec2 authored by jyx's avatar jyx

代码优化

parent c87e33cd
...@@ -102,6 +102,17 @@ ...@@ -102,6 +102,17 @@
// } catch (e) { // } catch (e) {
// } // }
let that = this
uni.$on('refreshPreviousPage', (data) => {
console.log('AAAAAAAAAAA')
if (data.vipFlag == '1') {
// 开通vip刷新状态
if (that.currentPage == 2) {
that.$refs.user.show();
}
}
});
}, },
mounted() { mounted() {
// 渲染完成 初始化首页数据 // 渲染完成 初始化首页数据
...@@ -114,15 +125,7 @@ ...@@ -114,15 +125,7 @@
}) })
} }
uni.$on('refreshPreviousPage', (data) => {
if (data.vipFlag == '1') {
// 开通vip刷新状态
if (that.currentPage == 2) {
that.$refs.user.show();
}
}
});
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
......
...@@ -193,11 +193,11 @@ ...@@ -193,11 +193,11 @@
extraData: wxData.params, extraData: wxData.params,
success(res) { success(res) {
message.notify('支付成功') message.notify('支付成功')
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
setTimeout(() => { setTimeout(() => {
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
}); });
...@@ -221,11 +221,11 @@ ...@@ -221,11 +221,11 @@
paySign: wxParams.paySign, paySign: wxParams.paySign,
success(res) { success(res) {
message.notify('支付成功') message.notify('支付成功')
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
setTimeout(() => { setTimeout(() => {
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment