Commit 05346ec2 authored by jyx's avatar jyx

代码优化

parent c87e33cd
......@@ -102,6 +102,17 @@
// } 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() {
// 渲染完成 初始化首页数据
......@@ -114,15 +125,7 @@
})
}
uni.$on('refreshPreviousPage', (data) => {
if (data.vipFlag == '1') {
// 开通vip刷新状态
if (that.currentPage == 2) {
that.$refs.user.show();
}
}
});
},
methods: {
tabChange(index) {
......
......@@ -193,11 +193,11 @@
extraData: wxData.params,
success(res) {
message.notify('支付成功')
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
setTimeout(() => {
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
uni.navigateBack({
delta: 1,
});
......@@ -221,11 +221,11 @@
paySign: wxParams.paySign,
success(res) {
message.notify('支付成功')
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
setTimeout(() => {
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
uni.navigateBack({
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