add redpoint
This commit is contained in:
parent
9a3185ef7c
commit
ba3d2993c5
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ const { LogoutTip } = require('../tips/LogoutTip');
|
|||||||
const { operation, OperationType } = require('../Operation/Operation');
|
const { operation, OperationType } = require('../Operation/Operation');
|
||||||
const jcgamelog = require('../jcfw/service/jcgamelog');
|
const jcgamelog = require('../jcfw/service/jcgamelog');
|
||||||
const { InviteTip } = require('../tips/InviteTip');
|
const { InviteTip } = require('../tips/InviteTip');
|
||||||
|
var playerData = require("playerData")
|
||||||
cc.Class({
|
cc.Class({
|
||||||
extends: cc.Component,
|
extends: cc.Component,
|
||||||
|
|
||||||
@ -167,6 +168,11 @@ cc.Class({
|
|||||||
default: null,
|
default: null,
|
||||||
type: cc.Prefab,
|
type: cc.Prefab,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
friendRedPoint:{
|
||||||
|
default:null,
|
||||||
|
type:cc.Node
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -177,8 +183,8 @@ cc.Class({
|
|||||||
this.nd_linkNode.active = !Config.isTest;
|
this.nd_linkNode.active = !Config.isTest;
|
||||||
this.nd_splitLine.active = !Config.isTest;
|
this.nd_splitLine.active = !Config.isTest;
|
||||||
//
|
//
|
||||||
|
|
||||||
cc.uiMain = this;
|
cc.uiMain = this;
|
||||||
|
cc.Notifier.on("showFriendRedPoint", this, this.updateRedPoint.bind(this));
|
||||||
cc.Notifier.on('openSelfPlayerInfoUI', this, this.callInfo.bind(this));
|
cc.Notifier.on('openSelfPlayerInfoUI', this, this.callInfo.bind(this));
|
||||||
cc.Notifier.on('joinTeamRoom', this, this.joinTeamRoom.bind(this));
|
cc.Notifier.on('joinTeamRoom', this, this.joinTeamRoom.bind(this));
|
||||||
// cc.Notifier.on("openheroinfo", this, this.openheroinfo.bind(this));
|
// cc.Notifier.on("openheroinfo", this, this.openheroinfo.bind(this));
|
||||||
@ -258,8 +264,18 @@ cc.Class({
|
|||||||
cc.Notifier.off('buyitem', this);
|
cc.Notifier.off('buyitem', this);
|
||||||
cc.Notifier.off('refreshBaseInfo', this);
|
cc.Notifier.off('refreshBaseInfo', this);
|
||||||
cc.Notifier.off('getreward', this);
|
cc.Notifier.off('getreward', this);
|
||||||
cc.Notifier.on('hasConnectWallet', this);
|
cc.Notifier.off('hasConnectWallet', this);
|
||||||
|
cc.Notifier.off("showFriendRedPoint", this, this.updateRedPoint.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateRedPoint(msg) {
|
||||||
|
if(playerData.friend_red==1){
|
||||||
|
this.friendRedPoint.active = true;
|
||||||
|
}else{
|
||||||
|
this.friendRedPoint.active = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
refreshBaseInfo() {
|
refreshBaseInfo() {
|
||||||
|
|
||||||
NetManage.getUserMainInfo((res)=>{
|
NetManage.getUserMainInfo((res)=>{
|
||||||
@ -496,6 +512,7 @@ cc.Class({
|
|||||||
callFriend() {
|
callFriend() {
|
||||||
var nd = cc.instantiate(this.pb_friend);
|
var nd = cc.instantiate(this.pb_friend);
|
||||||
this.node.addChild(nd);
|
this.node.addChild(nd);
|
||||||
|
this.friendRedPoint.active = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
callEvent() {
|
callEvent() {
|
||||||
|
@ -44,8 +44,7 @@ var rsp = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.showdebug) {
|
if (this.showdebug) {
|
||||||
console.log(mid);
|
|
||||||
console.log(msg);
|
|
||||||
}
|
}
|
||||||
if (this.functionarr[mid]) {
|
if (this.functionarr[mid]) {
|
||||||
this.functionarr[mid](msg);
|
this.functionarr[mid](msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user