|
@@ -871,6 +871,13 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ getReqData() {
|
|
|
|
+ let reqData = JSON.stringify({
|
|
|
|
+ gameName: "TQ",
|
|
|
|
+ gameUserName: "zhangSan"
|
|
|
|
+ });
|
|
|
|
+ return reqData;
|
|
|
|
+ }
|
|
sendPost2025(reqUrl, data, call) {
|
|
sendPost2025(reqUrl, data, call) {
|
|
let isDev = true;
|
|
let isDev = true;
|
|
let urlTop = "https://api.kessongame.site/";
|
|
let urlTop = "https://api.kessongame.site/";
|
|
@@ -4420,6 +4427,7 @@
|
|
this.n_Logout = (this.getChild("n_Logout"));
|
|
this.n_Logout = (this.getChild("n_Logout"));
|
|
this.n_zhuCe = (this.getChild("n_zhuCe"));
|
|
this.n_zhuCe = (this.getChild("n_zhuCe"));
|
|
this.n_dengLu = (this.getChild("n_dengLu"));
|
|
this.n_dengLu = (this.getChild("n_dengLu"));
|
|
|
|
+ this.btn_fuli = (this.getChild("btn_fuli"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ui_UIMain.URL = "ui://isxx5ak7kt443qc";
|
|
ui_UIMain.URL = "ui://isxx5ak7kt443qc";
|
|
@@ -5837,7 +5845,7 @@
|
|
console.log('zh:' + JSON.stringify(data));
|
|
console.log('zh:' + JSON.stringify(data));
|
|
this.ui.nameTxt.text = data.spbt;
|
|
this.ui.nameTxt.text = data.spbt;
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
- this.ui.n_zuanShi.text = data.spjg + "";
|
|
|
|
|
|
+ this.ui.n_zuanShi.text = "X" + data.zssl + "";
|
|
let baseUrl = "asset/sound/ogg/";
|
|
let baseUrl = "asset/sound/ogg/";
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
}
|
|
}
|
|
@@ -5850,6 +5858,38 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ class ui_UIMsg extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "UIMsg"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.tipsNode = (this.getChild("tipsNode"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_UIMsg.URL = "ui://isxx5ak7hkrz3qt";
|
|
|
|
+
|
|
|
|
+ class UIMsg extends UIBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ super();
|
|
|
|
+ }
|
|
|
|
+ onConstructor() {
|
|
|
|
+ this.ui = ui_UIMsg.createInstance();
|
|
|
|
+ this.contentPane = this.ui;
|
|
|
|
+ this.isEject = false;
|
|
|
|
+ this.isMuti = true;
|
|
|
|
+ }
|
|
|
|
+ show(msg, callback) {
|
|
|
|
+ super.show();
|
|
|
|
+ this.ui.tipsNode.msgTxt.text = msg;
|
|
|
|
+ this.ui.alpha = 1;
|
|
|
|
+ Laya.Tween.to(this.ui, { alpha: 0 }, 500, null, Laya.Handler.create(this, () => {
|
|
|
|
+ this.hide();
|
|
|
|
+ callback && callback();
|
|
|
|
+ }), 1000);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ UIMsg.uiName = "UIMsg";
|
|
|
|
+
|
|
class UIShop extends UIBase {
|
|
class UIShop extends UIBase {
|
|
constructor() {
|
|
constructor() {
|
|
super();
|
|
super();
|
|
@@ -5870,12 +5910,43 @@
|
|
this.ballRodArr = [];
|
|
this.ballRodArr = [];
|
|
this.itemNums = Object.keys(cfgTable.ballrodData).length;
|
|
this.itemNums = Object.keys(cfgTable.ballrodData).length;
|
|
this.ui.myNode.myList.numItems = this.itemNums;
|
|
this.ui.myNode.myList.numItems = this.itemNums;
|
|
|
|
+ this.loadDjdata_old();
|
|
|
|
+ }
|
|
|
|
+ loadDjdata_old() {
|
|
|
|
+ let fff = cfgTable.daoJuData;
|
|
this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
|
|
this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
|
|
- console.log('zh:obj=' + this.ui.myNode.djList);
|
|
|
|
this.daoJuArr = [];
|
|
this.daoJuArr = [];
|
|
this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
|
|
this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
|
|
this.ui.myNode.djList.numItems = this.itemNumsForDj;
|
|
this.ui.myNode.djList.numItems = this.itemNumsForDj;
|
|
- console.log('zh:999=' + this.itemNumsForDj);
|
|
|
|
|
|
+ }
|
|
|
|
+ getProductList() {
|
|
|
|
+ let reqData = xGame.httpMgr.getReqData();
|
|
|
|
+ let pd = JSON.parse(reqData);
|
|
|
|
+ pd.splx = "Consumable";
|
|
|
|
+ reqData = JSON.stringify(pd);
|
|
|
|
+ xGame.httpMgr.sendPost2025('getProductList', reqData, (res) => {
|
|
|
|
+ try {
|
|
|
|
+ let code = res.code;
|
|
|
|
+ let msg = res.msg;
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ let data = res.data;
|
|
|
|
+ for (let index = 0; index < data.length; index++) {
|
|
|
|
+ let element = data[index];
|
|
|
|
+ cfgTable.daoJuData[element.spid] = element;
|
|
|
|
+ }
|
|
|
|
+ console.log("fffddd=" + JSON.stringify(cfgTable.daoJuData));
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ xGame.uiMgr.Show(UIMsg, msg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (error) {
|
|
|
|
+ console.log('error=' + error);
|
|
|
|
+ alert(error);
|
|
|
|
+ }
|
|
|
|
+ finally {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
show(type) {
|
|
show(type) {
|
|
super.show();
|
|
super.show();
|
|
@@ -5925,8 +5996,8 @@
|
|
let ballRod = new BallRodDisplay(obj, index);
|
|
let ballRod = new BallRodDisplay(obj, index);
|
|
this.ballRodArr.push(ballRod);
|
|
this.ballRodArr.push(ballRod);
|
|
}
|
|
}
|
|
- renderDaoJu(sort, obj) {
|
|
|
|
- let index = this.getIndexBySortForDj(sort + 1) - 1;
|
|
|
|
|
|
+ renderDaoJu(idx, obj) {
|
|
|
|
+ let index = this.getIndexBySortForDj(idx + 1) - 1;
|
|
let b = new DaoJuDisplay(obj, index);
|
|
let b = new DaoJuDisplay(obj, index);
|
|
this.daoJuArr.push(b);
|
|
this.daoJuArr.push(b);
|
|
}
|
|
}
|
|
@@ -5938,10 +6009,10 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- getIndexBySortForDj(sort) {
|
|
|
|
|
|
+ getIndexBySortForDj(idx) {
|
|
let object = cfgTable.daoJuData;
|
|
let object = cfgTable.daoJuData;
|
|
for (const key in object) {
|
|
for (const key in object) {
|
|
- if (object[key].sort == sort) {
|
|
|
|
|
|
+ if (object[key].idx == idx) {
|
|
return parseInt(key);
|
|
return parseInt(key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -6534,38 +6605,6 @@
|
|
}
|
|
}
|
|
UISkill.uiName = "UISkill";
|
|
UISkill.uiName = "UISkill";
|
|
|
|
|
|
- class ui_UIMsg extends fgui.GComponent {
|
|
|
|
- static createInstance() {
|
|
|
|
- return (fgui.UIPackage.createObject("game", "UIMsg"));
|
|
|
|
- }
|
|
|
|
- onConstruct() {
|
|
|
|
- this.tipsNode = (this.getChild("tipsNode"));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- ui_UIMsg.URL = "ui://isxx5ak7hkrz3qt";
|
|
|
|
-
|
|
|
|
- class UIMsg extends UIBase {
|
|
|
|
- constructor() {
|
|
|
|
- super();
|
|
|
|
- }
|
|
|
|
- onConstructor() {
|
|
|
|
- this.ui = ui_UIMsg.createInstance();
|
|
|
|
- this.contentPane = this.ui;
|
|
|
|
- this.isEject = false;
|
|
|
|
- this.isMuti = true;
|
|
|
|
- }
|
|
|
|
- show(msg, callback) {
|
|
|
|
- super.show();
|
|
|
|
- this.ui.tipsNode.msgTxt.text = msg;
|
|
|
|
- this.ui.alpha = 1;
|
|
|
|
- Laya.Tween.to(this.ui, { alpha: 0 }, 500, null, Laya.Handler.create(this, () => {
|
|
|
|
- this.hide();
|
|
|
|
- callback && callback();
|
|
|
|
- }), 1000);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- UIMsg.uiName = "UIMsg";
|
|
|
|
-
|
|
|
|
class ui_UIModeSelection extends fgui.GComponent {
|
|
class ui_UIModeSelection extends fgui.GComponent {
|
|
static createInstance() {
|
|
static createInstance() {
|
|
return (fgui.UIPackage.createObject("game", "UIModeSelection"));
|
|
return (fgui.UIPackage.createObject("game", "UIModeSelection"));
|
|
@@ -6850,6 +6889,35 @@
|
|
}
|
|
}
|
|
UIReg.uiName = "UIReg";
|
|
UIReg.uiName = "UIReg";
|
|
|
|
|
|
|
|
+ class ui_UIFuli1 extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "UIFuli1"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n1 = (this.getChild("n1"));
|
|
|
|
+ this.n2 = (this.getChild("n2"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_UIFuli1.URL = "ui://isxx5ak7im8nv59g";
|
|
|
|
+
|
|
|
|
+ class UIFuli1 extends UIBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ super();
|
|
|
|
+ }
|
|
|
|
+ onConstructor() {
|
|
|
|
+ this.ui = ui_UIFuli1.createInstance();
|
|
|
|
+ this.contentPane = this.ui;
|
|
|
|
+ this.isEject = false;
|
|
|
|
+ }
|
|
|
|
+ show() {
|
|
|
|
+ super.show();
|
|
|
|
+ }
|
|
|
|
+ closeSelf() {
|
|
|
|
+ this.hide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ UIFuli1.uiName = "UIFuli1";
|
|
|
|
+
|
|
class ui_UIGetAward extends fgui.GComponent {
|
|
class ui_UIGetAward extends fgui.GComponent {
|
|
static createInstance() {
|
|
static createInstance() {
|
|
return (fgui.UIPackage.createObject("game", "UIGetAward"));
|
|
return (fgui.UIPackage.createObject("game", "UIGetAward"));
|
|
@@ -7191,6 +7259,9 @@
|
|
gotoRegUser() {
|
|
gotoRegUser() {
|
|
xGame.uiMgr.Show(UIReg);
|
|
xGame.uiMgr.Show(UIReg);
|
|
}
|
|
}
|
|
|
|
+ showFuLi() {
|
|
|
|
+ xGame.uiMgr.Show(UIFuli1);
|
|
|
|
+ }
|
|
c_btn_for_user() {
|
|
c_btn_for_user() {
|
|
this.ui.n_Logout.visible = false;
|
|
this.ui.n_Logout.visible = false;
|
|
this.ui.n_dengLu.visible = false;
|
|
this.ui.n_dengLu.visible = false;
|
|
@@ -7242,6 +7313,7 @@
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
|
|
+ this.addUIClick(this.ui.btn_fuli, this.showFuLi);
|
|
}
|
|
}
|
|
show(showFailWords) {
|
|
show(showFailWords) {
|
|
super.show();
|
|
super.show();
|
|
@@ -13719,6 +13791,77 @@
|
|
}
|
|
}
|
|
ui_Component52.URL = "ui://isxx5ak7ihpy43t";
|
|
ui_Component52.URL = "ui://isxx5ak7ihpy43t";
|
|
|
|
|
|
|
|
+ class ui_Component_fl_1 extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_fl_1"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n0 = (this.getChild("n0"));
|
|
|
|
+ this.btn_no = (this.getChild("btn_no"));
|
|
|
|
+ this.btn_buy = (this.getChild("btn_buy"));
|
|
|
|
+ this.n6 = (this.getChild("n6"));
|
|
|
|
+ this.n7 = (this.getChild("n7"));
|
|
|
|
+ this.n8 = (this.getChild("n8"));
|
|
|
|
+ this.n5 = (this.getChild("n5"));
|
|
|
|
+ this.n9 = (this.getChild("n9"));
|
|
|
|
+ this.n10 = (this.getChild("n10"));
|
|
|
|
+ this.txt_price = (this.getChild("txt_price"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_Component_fl_1.URL = "ui://isxx5ak7im8nv59h";
|
|
|
|
+
|
|
|
|
+ class ui_Component_fl_btn_lv extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_fl_btn_lv"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n0 = (this.getChild("n0"));
|
|
|
|
+ this.n2 = (this.getChild("n2"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_Component_fl_btn_lv.URL = "ui://isxx5ak7im8nv59l";
|
|
|
|
+
|
|
|
|
+ class ui_Component_fl_btn_h extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_fl_btn_h"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n0 = (this.getChild("n0"));
|
|
|
|
+ this.n2 = (this.getChild("n2"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_Component_fl_btn_h.URL = "ui://isxx5ak7im8nv59m";
|
|
|
|
+
|
|
|
|
+ class ui_Component_fl_2 extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_fl_2"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n0 = (this.getChild("n0"));
|
|
|
|
+ this.btn_no = (this.getChild("btn_no"));
|
|
|
|
+ this.btn_buy = (this.getChild("btn_buy"));
|
|
|
|
+ this.txt_price = (this.getChild("txt_price"));
|
|
|
|
+ this.n4 = (this.getChild("n4"));
|
|
|
|
+ this.n6 = (this.getChild("n6"));
|
|
|
|
+ this.n7 = (this.getChild("n7"));
|
|
|
|
+ this.n5 = (this.getChild("n5"));
|
|
|
|
+ this.n8 = (this.getChild("n8"));
|
|
|
|
+ this.n9 = (this.getChild("n9"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_Component_fl_2.URL = "ui://isxx5ak7im8nv59n";
|
|
|
|
+
|
|
|
|
+ class ui_UIFuli2 extends fgui.GComponent {
|
|
|
|
+ static createInstance() {
|
|
|
|
+ return (fgui.UIPackage.createObject("game", "UIFuli2"));
|
|
|
|
+ }
|
|
|
|
+ onConstruct() {
|
|
|
|
+ this.n1 = (this.getChild("n1"));
|
|
|
|
+ this.n0 = (this.getChild("n0"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ui_UIFuli2.URL = "ui://isxx5ak7im8nv59o";
|
|
|
|
+
|
|
class ui_drawBtn extends fgui.GButton {
|
|
class ui_drawBtn extends fgui.GButton {
|
|
static createInstance() {
|
|
static createInstance() {
|
|
return (fgui.UIPackage.createObject("game", "drawBtn"));
|
|
return (fgui.UIPackage.createObject("game", "drawBtn"));
|
|
@@ -16122,6 +16265,12 @@
|
|
fgui.UIObjectFactory.setExtension(ui_Component124.URL, ui_Component124);
|
|
fgui.UIObjectFactory.setExtension(ui_Component124.URL, ui_Component124);
|
|
fgui.UIObjectFactory.setExtension(ui_Component125.URL, ui_Component125);
|
|
fgui.UIObjectFactory.setExtension(ui_Component125.URL, ui_Component125);
|
|
fgui.UIObjectFactory.setExtension(ui_Component52.URL, ui_Component52);
|
|
fgui.UIObjectFactory.setExtension(ui_Component52.URL, ui_Component52);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_UIFuli1.URL, ui_UIFuli1);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_fl_1.URL, ui_Component_fl_1);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_fl_btn_lv.URL, ui_Component_fl_btn_lv);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_fl_btn_h.URL, ui_Component_fl_btn_h);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_fl_2.URL, ui_Component_fl_2);
|
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_UIFuli2.URL, ui_UIFuli2);
|
|
fgui.UIObjectFactory.setExtension(ui_drawBtn.URL, ui_drawBtn);
|
|
fgui.UIObjectFactory.setExtension(ui_drawBtn.URL, ui_drawBtn);
|
|
fgui.UIObjectFactory.setExtension(ui_Component43.URL, ui_Component43);
|
|
fgui.UIObjectFactory.setExtension(ui_Component43.URL, ui_Component43);
|
|
fgui.UIObjectFactory.setExtension(ui_wordsDisplay.URL, ui_wordsDisplay);
|
|
fgui.UIObjectFactory.setExtension(ui_wordsDisplay.URL, ui_wordsDisplay);
|
|
@@ -17450,10 +17599,7 @@
|
|
this.getConfigFromServer = () => __awaiter(this, void 0, void 0, function* () {
|
|
this.getConfigFromServer = () => __awaiter(this, void 0, void 0, function* () {
|
|
try {
|
|
try {
|
|
this.httpReqOkCount = 0;
|
|
this.httpReqOkCount = 0;
|
|
- let reqData = JSON.stringify({
|
|
|
|
- gameName: "TQ",
|
|
|
|
- gameUserName: "zhangSan"
|
|
|
|
- });
|
|
|
|
|
|
+ let reqData = xGame.httpMgr.getReqData();
|
|
console.log('zh:第1个请求getClassicCfg');
|
|
console.log('zh:第1个请求getClassicCfg');
|
|
const classicCfg = yield this.sendPostAsync('getClassicCfg', reqData);
|
|
const classicCfg = yield this.sendPostAsync('getClassicCfg', reqData);
|
|
this.classicCfg = classicCfg;
|
|
this.classicCfg = classicCfg;
|
|
@@ -17528,10 +17674,7 @@
|
|
this.getConfigFromServer();
|
|
this.getConfigFromServer();
|
|
}
|
|
}
|
|
test() {
|
|
test() {
|
|
- let reqData = JSON.stringify({
|
|
|
|
- gameName: "TQ",
|
|
|
|
- gameUserName: "zhangSan"
|
|
|
|
- });
|
|
|
|
|
|
+ let reqData = xGame.httpMgr.getReqData();
|
|
xGame.httpMgr.sendPost2025('getClassicCfg', reqData, (res) => {
|
|
xGame.httpMgr.sendPost2025('getClassicCfg', reqData, (res) => {
|
|
console.log('zh:1s');
|
|
console.log('zh:1s');
|
|
try {
|
|
try {
|
|
@@ -22385,7 +22528,7 @@
|
|
console.log('zh:' + JSON.stringify(data));
|
|
console.log('zh:' + JSON.stringify(data));
|
|
this.ui.nameTxt.text = data.spbt;
|
|
this.ui.nameTxt.text = data.spbt;
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
- this.ui.n_zuanShi.text = data.spjg + "";
|
|
|
|
|
|
+ this.ui.n_zuanShi.text = "X" + data.zssl + "";
|
|
let baseUrl = "asset/sound/ogg/";
|
|
let baseUrl = "asset/sound/ogg/";
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
}
|
|
}
|
|
@@ -22418,12 +22561,43 @@
|
|
this.ballRodArr = [];
|
|
this.ballRodArr = [];
|
|
this.itemNums = Object.keys(cfgTable.ballrodData).length;
|
|
this.itemNums = Object.keys(cfgTable.ballrodData).length;
|
|
this.ui.myNode.myList.numItems = this.itemNums;
|
|
this.ui.myNode.myList.numItems = this.itemNums;
|
|
|
|
+ this.loadDjdata_old();
|
|
|
|
+ }
|
|
|
|
+ loadDjdata_old() {
|
|
|
|
+ let fff = cfgTable.daoJuData;
|
|
this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
|
|
this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
|
|
- console.log('zh:obj=' + this.ui.myNode.djList);
|
|
|
|
this.daoJuArr = [];
|
|
this.daoJuArr = [];
|
|
this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
|
|
this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
|
|
this.ui.myNode.djList.numItems = this.itemNumsForDj;
|
|
this.ui.myNode.djList.numItems = this.itemNumsForDj;
|
|
- console.log('zh:999=' + this.itemNumsForDj);
|
|
|
|
|
|
+ }
|
|
|
|
+ getProductList() {
|
|
|
|
+ let reqData = xGame.httpMgr.getReqData();
|
|
|
|
+ let pd = JSON.parse(reqData);
|
|
|
|
+ pd.splx = "Consumable";
|
|
|
|
+ reqData = JSON.stringify(pd);
|
|
|
|
+ xGame.httpMgr.sendPost2025('getProductList', reqData, (res) => {
|
|
|
|
+ try {
|
|
|
|
+ let code = res.code;
|
|
|
|
+ let msg = res.msg;
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ let data = res.data;
|
|
|
|
+ for (let index = 0; index < data.length; index++) {
|
|
|
|
+ let element = data[index];
|
|
|
|
+ cfgTable.daoJuData[element.spid] = element;
|
|
|
|
+ }
|
|
|
|
+ console.log("fffddd=" + JSON.stringify(cfgTable.daoJuData));
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ xGame.uiMgr.Show(UIMsg, msg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (error) {
|
|
|
|
+ console.log('error=' + error);
|
|
|
|
+ alert(error);
|
|
|
|
+ }
|
|
|
|
+ finally {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
show(type) {
|
|
show(type) {
|
|
super.show();
|
|
super.show();
|
|
@@ -22473,8 +22647,8 @@
|
|
let ballRod = new BallRodDisplay$1(obj, index);
|
|
let ballRod = new BallRodDisplay$1(obj, index);
|
|
this.ballRodArr.push(ballRod);
|
|
this.ballRodArr.push(ballRod);
|
|
}
|
|
}
|
|
- renderDaoJu(sort, obj) {
|
|
|
|
- let index = this.getIndexBySortForDj(sort + 1) - 1;
|
|
|
|
|
|
+ renderDaoJu(idx, obj) {
|
|
|
|
+ let index = this.getIndexBySortForDj(idx + 1) - 1;
|
|
let b = new DaoJuDisplay$1(obj, index);
|
|
let b = new DaoJuDisplay$1(obj, index);
|
|
this.daoJuArr.push(b);
|
|
this.daoJuArr.push(b);
|
|
}
|
|
}
|
|
@@ -22486,10 +22660,10 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- getIndexBySortForDj(sort) {
|
|
|
|
|
|
+ getIndexBySortForDj(idx) {
|
|
let object = cfgTable.daoJuData;
|
|
let object = cfgTable.daoJuData;
|
|
for (const key in object) {
|
|
for (const key in object) {
|
|
- if (object[key].sort == sort) {
|
|
|
|
|
|
+ if (object[key].idx == idx) {
|
|
return parseInt(key);
|
|
return parseInt(key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -22996,6 +23170,24 @@
|
|
}
|
|
}
|
|
UIReg$1.uiName = "UIReg";
|
|
UIReg$1.uiName = "UIReg";
|
|
|
|
|
|
|
|
+ class UIFuli1$1 extends UIBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ super();
|
|
|
|
+ }
|
|
|
|
+ onConstructor() {
|
|
|
|
+ this.ui = ui_UIFuli1.createInstance();
|
|
|
|
+ this.contentPane = this.ui;
|
|
|
|
+ this.isEject = false;
|
|
|
|
+ }
|
|
|
|
+ show() {
|
|
|
|
+ super.show();
|
|
|
|
+ }
|
|
|
|
+ closeSelf() {
|
|
|
|
+ this.hide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ UIFuli1$1.uiName = "UIFuli1";
|
|
|
|
+
|
|
class UITry$1 extends UIBase {
|
|
class UITry$1 extends UIBase {
|
|
constructor() {
|
|
constructor() {
|
|
super();
|
|
super();
|
|
@@ -23423,6 +23615,9 @@
|
|
gotoRegUser() {
|
|
gotoRegUser() {
|
|
xGame.uiMgr.Show(UIReg$1);
|
|
xGame.uiMgr.Show(UIReg$1);
|
|
}
|
|
}
|
|
|
|
+ showFuLi() {
|
|
|
|
+ xGame.uiMgr.Show(UIFuli1$1);
|
|
|
|
+ }
|
|
c_btn_for_user() {
|
|
c_btn_for_user() {
|
|
this.ui.n_Logout.visible = false;
|
|
this.ui.n_Logout.visible = false;
|
|
this.ui.n_dengLu.visible = false;
|
|
this.ui.n_dengLu.visible = false;
|
|
@@ -23474,6 +23669,7 @@
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
|
|
+ this.addUIClick(this.ui.btn_fuli, this.showFuLi);
|
|
}
|
|
}
|
|
show(showFailWords) {
|
|
show(showFailWords) {
|
|
super.show();
|
|
super.show();
|