Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
6e4b484265
1 changed files with 16 additions and 11 deletions
  1. 27
      pages/index/index.js

27
pages/index/index.js

@ -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
},

Loading…
Cancel
Save