Commit 88f26997 authored by jyx's avatar jyx

代码优化

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