Commit 88f26997 authored by jyx's avatar jyx

代码优化

parent 05346ec2
{
"name" : "reader",
"appid" : "__UNI__F7F50FF",
"appid" : "__UNI__1EF86FE",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : 1000,
......
......@@ -90,22 +90,21 @@
}
},
onShow() {
// try {
// // 在子组件重写show()代替onShow()
// if (this.currentPage == 0) {
// this.$refs.index.show();
// } else if (this.currentPage == 1) {
// this.$refs.recommend.show();
// } else if (this.currentPage == 2) {
// this.$refs.user.show();
// }
// } catch (e) {
try {
// 在子组件重写show()代替onShow()
if (this.currentPage == 0) {
this.$refs.index.show();
} else if (this.currentPage == 1) {
this.$refs.recommend.show();
} else if (this.currentPage == 2) {
this.$refs.user.show();
}
} catch (e) {
// }
}
let that = this
uni.$on('refreshPreviousPage', (data) => {
console.log('AAAAAAAAAAA')
if (data.vipFlag == '1') {
// 开通vip刷新状态
if (that.currentPage == 2) {
......
......@@ -192,16 +192,7 @@
path: 'pages/index/index',
extraData: wxData.params,
success(res) {
message.notify('支付成功')
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1000);
uni.navigateBack()
},
fail(res) {
// 未成功跳转到签约小程序
......
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