新ui入版
This commit is contained in:
@@ -36,7 +36,7 @@ import MachineInfoService from "db://assets/Scripts/chat18x/foundation/identity/
|
||||
import { AuthService } from "db://assets/Scripts/chat18x/network/services/AuthService";
|
||||
import { PlayerDataService } from "db://assets/Scripts/chat18x/network/services/PlayerDataService";
|
||||
import { ApiCode } from "db://assets/Scripts/chat18x/network/client/types";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -48,7 +48,7 @@ export class PreloadUI extends Component {
|
||||
|
||||
private jinduBar: Node = null;
|
||||
private jinduFilled: Sprite = null;
|
||||
private LabProgress: Label = null;
|
||||
//private LabProgress: Label = null;
|
||||
private loginNode: Node = null;
|
||||
private btnLogin: Node = null; //登录按钮
|
||||
|
||||
@@ -59,9 +59,9 @@ export class PreloadUI extends Component {
|
||||
this.jinduFilled = this.jinduBar
|
||||
.getChildByName("jinduFilled")
|
||||
.getComponent(Sprite);
|
||||
this.LabProgress = this.node
|
||||
.getChildByName("LabProgress")
|
||||
.getComponent(Label);
|
||||
// this.LabProgress = this.node
|
||||
// .getChildByName("LabProgress")
|
||||
// .getComponent(Label);
|
||||
this.loginNode = this.node.getChildByName("loginNode");
|
||||
this.btnLogin = this.loginNode.getChildByName("btnLogin");
|
||||
|
||||
@@ -75,7 +75,7 @@ export class PreloadUI extends Component {
|
||||
|
||||
// 初始化配置
|
||||
ConfigManager.I.init();
|
||||
//console.log(ConfigManager.tables.TbGlobalConfig.GameName);
|
||||
//console.log(ConfigManager.tables.TbGlobalConfig.GameName);
|
||||
// 初始化环境配置
|
||||
AppConfig.I;
|
||||
// 初始化数据层
|
||||
@@ -208,7 +208,7 @@ export class PreloadUI extends Component {
|
||||
|
||||
// 进入登录模块
|
||||
private enterLoginModule() {
|
||||
this.LabProgress.node.active = false;
|
||||
//this.LabProgress.node.active = false;
|
||||
this.jinduBar.active = false;
|
||||
this.loginNode.active = true;
|
||||
}
|
||||
@@ -257,10 +257,10 @@ export class PreloadUI extends Component {
|
||||
// })
|
||||
|
||||
// 游客登录
|
||||
const deviceId = DeviceIdService.I.id;
|
||||
const deviceId = DeviceIdService.I.id;
|
||||
const machineIdentifier = MachineInfoService.I.getMachineIdentifier();
|
||||
const reqData = {
|
||||
platType: 'guset',
|
||||
platType: "guset",
|
||||
userId: deviceId,
|
||||
device: deviceId,
|
||||
os: 3,
|
||||
@@ -277,18 +277,16 @@ export class PreloadUI extends Component {
|
||||
loginData.expire = resData.expire;
|
||||
const playerData = DataManager.I.getDataById<PlayerData>(DataId.Player);
|
||||
playerData.name = resData.name;
|
||||
|
||||
|
||||
this.loginFinish = true;
|
||||
|
||||
// this.reqMyInfo();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 请求个人信息
|
||||
private async reqMyInfo() {
|
||||
const reqData = {
|
||||
|
||||
};
|
||||
const reqData = {};
|
||||
console.log("个人信息请求数据:", reqData);
|
||||
let res = await PlayerDataService.I.reqMyInfo(reqData);
|
||||
console.log("个人信息响应数据:", res);
|
||||
@@ -297,7 +295,7 @@ export class PreloadUI extends Component {
|
||||
// 保存数据
|
||||
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||
walletData.diamond = resData.diamond;
|
||||
walletData.vipExpire = resData.vipExpire;
|
||||
walletData.vipExpire = resData.vipExpire;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +303,7 @@ export class PreloadUI extends Component {
|
||||
//let islogin = HttpUnit.IsLogin();
|
||||
//console.log("进入游戏,登录状态:", islogin);
|
||||
this.jinduBar.active = false;
|
||||
this.LabProgress.node.active = false;
|
||||
//this.LabProgress.node.active = false;
|
||||
//this.btnLogin.node.active = false
|
||||
// if (islogin) {
|
||||
// } else {
|
||||
@@ -318,5 +316,5 @@ export class PreloadUI extends Component {
|
||||
|
||||
private registerListener() {
|
||||
GButton.BandClick(this.btnLogin, this.onLogin, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user