self_info_view.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { _decorator, Component, Node, Label, Sprite } from 'cc';
  2. import { GameMng } from '../GameMng';
  3. import GBaseUI from '../gcommon/GBaseUI';
  4. import { UIButton } from '../gcommon/UIButton';
  5. import { Tools } from '../Tools';
  6. const { ccclass, property } = _decorator;
  7. @ccclass('self_info_view')
  8. export class self_info_view extends GBaseUI {
  9. @property(Node) btn_close:Node = null
  10. @property(Node) btn_header:Node = null
  11. @property(Node) btn_nick:Node = null
  12. @property(Node) btn_area:Node = null
  13. @property(Node) btn_real:Node = null
  14. @property(Node) btn_phone:Node = null
  15. @property(Node) btn_address:Node = null
  16. @property(Node) lab_name:Node = null;
  17. @property(Node) head_spr:Node = null;
  18. start() {
  19. UIButton.BindClick(this.btn_close,()=>{
  20. this.closeUI()
  21. },this)
  22. UIButton.BindClick(this.btn_header,()=>{
  23. },this)
  24. UIButton.BindClick(this.btn_nick,()=>{
  25. },this)
  26. UIButton.BindClick(this.btn_area,()=>{
  27. },this)
  28. UIButton.BindClick(this.btn_real,()=>{
  29. },this)
  30. UIButton.BindClick(this.btn_phone,()=>{
  31. },this)
  32. UIButton.BindClick(this.btn_address,()=>{
  33. },this)
  34. }
  35. onEnable(){
  36. this.lab_name.getComponent(Label).string = GameMng._userData.user_name
  37. Tools.loadWeiXinHead(GameMng._userData.user_avatar,this.head_spr.getComponent(Sprite))
  38. }
  39. update(deltaTime: number) {
  40. }
  41. }