数据修改
This commit is contained in:
@@ -110,8 +110,6 @@ export class DataManager {
|
|||||||
// 若你的 BaseData.init 接受 dataId,可传入
|
// 若你的 BaseData.init 接受 dataId,可传入
|
||||||
instance.init?.(dataId);
|
instance.init?.(dataId);
|
||||||
this._dataMap.set(dataId, instance);
|
this._dataMap.set(dataId, instance);
|
||||||
|
|
||||||
console.log(`[DataManager] 实例化并缓存数据: ${dataId}`);
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +121,6 @@ export class DataManager {
|
|||||||
if (data) {
|
if (data) {
|
||||||
data.destroy?.();
|
data.destroy?.();
|
||||||
this._dataMap.delete(dataId);
|
this._dataMap.delete(dataId);
|
||||||
console.log(`[DataManager] 移除数据: ${dataId}`);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -133,7 +130,6 @@ export class DataManager {
|
|||||||
* 重置所有数据
|
* 重置所有数据
|
||||||
*/
|
*/
|
||||||
public resetAllData(): void {
|
public resetAllData(): void {
|
||||||
console.log("[DataManager] 重置所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.reset?.());
|
this._dataMap.forEach((data) => data.reset?.());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +137,6 @@ export class DataManager {
|
|||||||
* 清空所有数据
|
* 清空所有数据
|
||||||
*/
|
*/
|
||||||
public clearAllData(): void {
|
public clearAllData(): void {
|
||||||
console.log("[DataManager] 清空所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.clear?.());
|
this._dataMap.forEach((data) => data.clear?.());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +144,6 @@ export class DataManager {
|
|||||||
* 销毁所有数据
|
* 销毁所有数据
|
||||||
*/
|
*/
|
||||||
public destroyAllData(): void {
|
public destroyAllData(): void {
|
||||||
console.log("[DataManager] 销毁所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.destroy?.());
|
this._dataMap.forEach((data) => data.destroy?.());
|
||||||
this._dataMap.clear();
|
this._dataMap.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ export class GirlBriefData extends BaseData {
|
|||||||
this.vipUnlock = data.vipUnlock;
|
this.vipUnlock = data.vipUnlock;
|
||||||
this.avatarPath = data.avatarPath;
|
this.avatarPath = data.avatarPath;
|
||||||
this.listAvatarPath = data.listAvatarPath;
|
this.listAvatarPath = data.listAvatarPath;
|
||||||
console.log("保存了技师的简要数据,id:", this.id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取 id */
|
/** 获取 id */
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ export class GirlDetailData extends BaseData {
|
|||||||
this.detailDesc = data.detailDesc;
|
this.detailDesc = data.detailDesc;
|
||||||
this.photoData = this.parseAllGirlPhoto(data.commercialImages);
|
this.photoData = this.parseAllGirlPhoto(data.commercialImages);
|
||||||
this.videoData = this.parseAllGirlVideo(data.commercialVideos);
|
this.videoData = this.parseAllGirlVideo(data.commercialVideos);
|
||||||
console.log("保存了技师的详细数据,id:", this.id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取 id */
|
/** 获取 id */
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export class GirlUnlockData extends BaseData {
|
|||||||
if (!exists) {
|
if (!exists) {
|
||||||
this.unlockedImageIds.push(id);
|
this.unlockedImageIds.push(id);
|
||||||
}
|
}
|
||||||
console.log("当前解锁图片的所有id:", this.unlockedImageIds);
|
// console.log("技师 ", this.id, " 当前解锁图片的所有id:",this.unlockedImageIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取所有解锁图片的 id */
|
/** 获取所有解锁图片的 id */
|
||||||
@@ -112,8 +112,8 @@ export class GirlUnlockData extends BaseData {
|
|||||||
let exists = this.isVideoUnlock(id);;
|
let exists = this.isVideoUnlock(id);;
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
this.unlockedVideoIds.push(id);
|
this.unlockedVideoIds.push(id);
|
||||||
}
|
}
|
||||||
console.log("当前解锁视频的所有id:", this.unlockedVideoIds);
|
// console.log("技师 ", this.id, " 当前解锁视频的所有id:",this.unlockedVideoIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取所有解锁视频的 id */
|
/** 获取所有解锁视频的 id */
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ export class LoginData extends BaseData {
|
|||||||
/** 设置登录refresh token */
|
/** 设置登录refresh token */
|
||||||
public set refreshToken(value: string) {
|
public set refreshToken(value: string) {
|
||||||
this._refreshToken = value;
|
this._refreshToken = value;
|
||||||
console.log("设置登录refresh token", this._refreshToken);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取登录refresh token */
|
/** 获取登录refresh token */
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ export class ConfigManager {
|
|||||||
// 若你的 BaseConfig.init 接受 configId,可传入
|
// 若你的 BaseConfig.init 接受 configId,可传入
|
||||||
instance.init?.(configId);
|
instance.init?.(configId);
|
||||||
this._dataMap.set(configId, instance);
|
this._dataMap.set(configId, instance);
|
||||||
|
|
||||||
console.log(`[ConfigManager] 实例化并缓存数据: ${configId}`);
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +167,6 @@ export class ConfigManager {
|
|||||||
if (data) {
|
if (data) {
|
||||||
data.destroy?.();
|
data.destroy?.();
|
||||||
this._dataMap.delete(configId);
|
this._dataMap.delete(configId);
|
||||||
console.log(`[ConfigManager] 移除数据: ${configId}`);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -179,7 +176,6 @@ export class ConfigManager {
|
|||||||
* 重置所有数据
|
* 重置所有数据
|
||||||
*/
|
*/
|
||||||
public resetAllData(): void {
|
public resetAllData(): void {
|
||||||
console.log("[ConfigManager] 重置所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.reset?.());
|
this._dataMap.forEach((data) => data.reset?.());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +183,6 @@ export class ConfigManager {
|
|||||||
* 清空所有数据
|
* 清空所有数据
|
||||||
*/
|
*/
|
||||||
public clearAllData(): void {
|
public clearAllData(): void {
|
||||||
console.log("[ConfigManager] 清空所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.clear?.());
|
this._dataMap.forEach((data) => data.clear?.());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +190,6 @@ export class ConfigManager {
|
|||||||
* 销毁所有数据
|
* 销毁所有数据
|
||||||
*/
|
*/
|
||||||
public destroyAllData(): void {
|
public destroyAllData(): void {
|
||||||
console.log("[ConfigManager] 销毁所有数据");
|
|
||||||
this._dataMap.forEach((data) => data.destroy?.());
|
this._dataMap.forEach((data) => data.destroy?.());
|
||||||
this._dataMap.clear();
|
this._dataMap.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ export class GirlDetailPanel extends li_BaseView {
|
|||||||
LanguageUtils.getText("girldetailpanel.age") + age.toString();
|
LanguageUtils.getText("girldetailpanel.age") + age.toString();
|
||||||
|
|
||||||
const firstPath = girlData.getFirstGrilVideoPath(this.category.toString(), this.id);
|
const firstPath = girlData.getFirstGrilVideoPath(this.category.toString(), this.id);
|
||||||
console.log("firstPath: ", firstPath);
|
|
||||||
ResManager.I.changeBundleVideo(
|
ResManager.I.changeBundleVideo(
|
||||||
this.avatarVideo,
|
this.avatarVideo,
|
||||||
firstPath,
|
firstPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user