1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import { _decorator, Component, Node, Label, Sprite } from 'cc';
- import UIDialog from '../Game/UIDialog';
- import { GameMng } from '../GameMng';
- import { UIButton } from '../gcommon/UIButton';
- import { UIManager } from '../gcommon/UIManager';
- import { native_manager } from '../native_manager';
- import { Tools } from '../Tools';
- const { ccclass, property } = _decorator;
- @ccclass('mine_view')
- export class mine_view extends Component {
- @property(Node)
- btn_setting: Node = null;
- @property(Node)
- btn_self_info: Node = null;
- @property(Node)
- btn_quit: Node = null;
- @property(Node)
- btn_share: Node = null;
- @property(Node)
- lab_name: Node = null;
- @property(Node)
- lab_id: Node = null;
- @property(Node)
- lab_login_name: Node = null;
- @property(Node)
- head_spr: Node = null;
- //@property(Node)
- // btn_zhuangban: Node = null;
- start() {
- UIButton.BindClick(this.btn_quit,()=>{
- UIDialog.Show(()=>{},()=>{},"您确定要退出登陆吗?",null,true)
- },this)
- UIButton.BindClick(this.btn_setting,()=>{
- UIManager.AddPrefab(GameMng.Instance.uiSettingView)
- },this)
- UIButton.BindClick(this.btn_self_info,()=>{
- UIManager.AddPrefab(GameMng.Instance.self_info_view)
- },this)
- UIButton.BindClick(this.btn_share,()=>{
- native_manager.share()
- },this)
- // UIButton.BindClick(this.btn_zhuangban,()=>{
- // UIManager.AddPrefab(GameMng.Instance.shop_view)
- // },this)
- }
- onEnable(){
- if(GameMng._userData!=null){
- this.lab_name.getComponent(Label).string = GameMng._userData.user_name
- this.lab_id.getComponent(Label).string = "ID:"+GameMng._userData.userid +""
- this.lab_login_name.getComponent(Label).string = GameMng._userData.user_name
- Tools.loadWeiXinHead(GameMng._userData.user_avatar,this.head_spr.getComponent(Sprite))
- }
- }
- update(deltaTime: number) {
-
- }
- }
|