12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- var baseLayer = require('BaseLayer');
- import ResMgr from "../base/ResMgr";
- import SoundMgr from "../base/SoundMgr";
- import UserInfoMgr from "../base/user/UserInfoMgr";
- cc.Class({
- extends: baseLayer,
- properties: {
- spHead: cc.Sprite,
- labName: cc.Label,
- labID: cc.Label,
- labPhone: cc.Label,
- maskRealname: cc.Node,
- maskBindphone: cc.Node,
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- this.setData();
- },
- setData(){
- ResMgr.loadTexture('texture/head/h1', (sp)=>{
- this.spHead.spriteFrame = sp;
- this.spHead.node.width = 148;
- this.spHead.node.height = 148;
- });
- this.labName.string = UserInfoMgr.getUserName();
- this.labID.string = `${UserInfoMgr.getUserId()}`;
- this.labPhone.string = '未绑定';
- this.maskRealname.active = false;
- this.maskBindphone.active = true;
- },
- onClickRealName(){
- SoundMgr.playClick();
- },
- onClickBindPhone(){
- SoundMgr.playClick();
- UIMgr.openUI('prefabs/BindPhoneLayer');
- },
- onClickUpVIP(){
- SoundMgr.playClick();
- },
- onClickOut(){
- SoundMgr.playClick();
- },
- });
|