|
|
|
@ -95,18 +95,10 @@ Page({ |
|
|
|
if (this.data.path && '/pages/index/index' != this.data.path) { |
|
|
|
util.navigateTo(this.data.path) |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} }) |
|
|
|
if(app.globalData.userInfo){ |
|
|
|
this.fetchMemberIfo() |
|
|
|
} else { |
|
|
|
receiveMember().then(result => { |
|
|
|
if (result.data && result.data.hasGetMember && !this.data.landInfo) { |
|
|
|
if(result.data.type === 1){ |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} }) |
|
|
|
} else { |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} }) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} }) |
|
|
|
} |
|
|
|
getPopupInfo().then(result => { |
|
|
|
if (result.data && !this.data.landInfo) { |
|
|
|
@ -253,8 +245,21 @@ Page({ |
|
|
|
onEvent: function (message) { |
|
|
|
if(message.what == 223){ |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/need-member.png'} }) |
|
|
|
} else if(message.what == 888 && app.globalData.userInfo){ |
|
|
|
this.fetchMemberIfo() |
|
|
|
} |
|
|
|
}, |
|
|
|
fetchMemberIfo: function(){ |
|
|
|
receiveMember().then(result => { |
|
|
|
if (result.data && result.data.hasGetMember && !this.data.landInfo) { |
|
|
|
if(result.data.type === 1){ |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} }) |
|
|
|
} else { |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} }) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
stopTouchMove: function (e) { |
|
|
|
return false |
|
|
|
}, |
|
|
|
|