1234567891011121314151617181920212223242526272829303132333435363738 |
- import { _decorator, Component, Node, Label, Sprite } from 'cc';
- import { GameMng } from '../GameMng';
- import GBaseUI from '../gcommon/GBaseUI';
- import { UIButton } from '../gcommon/UIButton';
- import { Tools } from '../Tools';
- import { userData } from '../UserData/userData';
- const { ccclass, property } = _decorator;
- @ccclass('user_info_view')
- export class user_info_view extends GBaseUI {
- @property(Node)
- lab_name: Node = null;
- @property(Node)
- btn_close: Node = null;
- @property(Node)
- spr_icon: Node = null;
- @property(Node)
- lab_id: Node = null;
- start() {
- UIButton.BindClick(this.btn_close,()=>{
- this.closeUI()
- },this)
-
- }
- show(user_data:userData){
- Tools.loadWeiXinHead(user_data.user_avatar,this.spr_icon.getComponent(Sprite))
- this.lab_name.getComponent(Label).string = user_data.user_name
- this.lab_id.getComponent(Label).string ="ID:"+user_data.userid
- }
- update(deltaTime: number) {
-
- }
- }
|