fix
设置页面资源
This commit is contained in:
@@ -24,7 +24,7 @@ import { ThemeData } from "../../data/ThemeData";
|
||||
import { GirlData } from "../../data/GirlData";
|
||||
import { WalletData } from "../../data/WalletData";
|
||||
import { AccountData } from "../../data/AccountData";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -74,9 +74,7 @@ export class ThemePanel extends li_BaseView {
|
||||
}
|
||||
}
|
||||
// 请求主题数据
|
||||
const reqData = {
|
||||
|
||||
};
|
||||
const reqData = {};
|
||||
let res = await ThemeService.I.reqHallTheme(reqData);
|
||||
if (res && res.code === proto.cs.EnmRetCode.SUCCESS) {
|
||||
// 保存数据
|
||||
@@ -90,14 +88,12 @@ export class ThemePanel extends li_BaseView {
|
||||
item.refresh(id);
|
||||
newNode.active = true;
|
||||
this.cache.push(item);
|
||||
this.content.addChild(newNode);
|
||||
this.content.addChild(newNode);
|
||||
}
|
||||
}
|
||||
|
||||
// 请求每日推荐
|
||||
const reqData2 = {
|
||||
|
||||
};
|
||||
const reqData2 = {};
|
||||
let res2 = await GirlService.I.reqDailyRecommend(reqData2);
|
||||
if (res2 && res2.code === proto.cs.EnmRetCode.SUCCESS) {
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
@@ -136,10 +132,10 @@ export class ThemePanel extends li_BaseView {
|
||||
});
|
||||
Utils.addInnerEL(InnerMsgCode.BalanceChange, this, () => {
|
||||
this.refreshCoinNum();
|
||||
});
|
||||
});
|
||||
Utils.addInnerEL(InnerMsgCode.VipExpireChange, this, () => {
|
||||
this.refreshVipExpire();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
enterShop() {
|
||||
@@ -147,7 +143,29 @@ export class ThemePanel extends li_BaseView {
|
||||
}
|
||||
|
||||
chatWithRec() {
|
||||
NavigationManager.Instance.navigateToChat(this.recId);
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
|
||||
// 是否已经解锁
|
||||
const isRelease = girlData.getIsRelease(
|
||||
girlData.getGrilCategoryById(this.recId).toString(),
|
||||
this.recId
|
||||
);
|
||||
const isFree =
|
||||
girlData.getGrilPrice(
|
||||
girlData.getGrilCategoryById(this.recId).toString(),
|
||||
this.recId
|
||||
) == 0;
|
||||
if (isRelease || isFree) {
|
||||
NavigationManager.Instance.navigateToGirlDetail(this.recId);
|
||||
ViewManager.I.closeView(this.node);
|
||||
} else {
|
||||
//未解锁
|
||||
ViewManager.I.openBundlesPopupView("GirlListPopupPanel", {
|
||||
base: this,
|
||||
category: girlData.getGrilCategoryById(this.recId),
|
||||
id: this.recId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
openSetting() {
|
||||
@@ -172,18 +190,14 @@ export class ThemePanel extends li_BaseView {
|
||||
const leftTime = Utils.formatVipLeftTime(vipExpire);
|
||||
this.vipLeftTime.string = LanguageUtils.getText(
|
||||
"purchasepanel.vip_left"
|
||||
).replace("${leftTime}", leftTime);
|
||||
}
|
||||
).replace("${leftTime}", leftTime);
|
||||
}
|
||||
|
||||
onDestroy(): void {
|
||||
Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, () => {
|
||||
this.recName.string = LanguageUtils.getText(this.rectNameKey);
|
||||
});
|
||||
Utils.removeInnerEL(InnerMsgCode.BalanceChange, this, () => {
|
||||
|
||||
});
|
||||
Utils.removeInnerEL(InnerMsgCode.VipExpireChange, this, () => {
|
||||
|
||||
});
|
||||
Utils.removeInnerEL(InnerMsgCode.BalanceChange, this, () => {});
|
||||
Utils.removeInnerEL(InnerMsgCode.VipExpireChange, this, () => {});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user