推荐列表实现虚拟+无限循环

This commit is contained in:
2025-10-14 16:59:02 +08:00
parent a389733596
commit b40b02e2a2
4 changed files with 336 additions and 180 deletions
+1 -1
View File
@@ -396,7 +396,7 @@ export default class ResManager {
spttemp.frameUrl = url; spttemp.frameUrl = url;
// 加载 // 加载
assetManager.loadRemote<ImageAsset>(url, (err, res: ImageAsset) => { assetManager.loadRemote<ImageAsset>(url, (err, res: ImageAsset) => {
logger.log("changeRemoteSpriteFrame方法加载远程图片: ", url); //logger.log("changeRemoteSpriteFrame方法加载远程图片: ", url);
if (err) { if (err) {
logger.log(err); logger.log(err);
return; return;
+148 -111
View File
@@ -34,6 +34,8 @@ import proto from "db://assets/Scripts/proto/proto.pb.js";
import { MainController } from "../../core/MainController"; import { MainController } from "../../core/MainController";
import { logger } from "db://assets/Scripts/Main/Common/Logger"; import { logger } from "db://assets/Scripts/Main/Common/Logger";
import { RecomandItem } from "../../uiitems/RecomandItem"; import { RecomandItem } from "../../uiitems/RecomandItem";
import HXZ_ScrollViewList from "db://assets/Scripts/Main/Common/ScrollViewList";
import ScrollViewListItem from "db://assets/Scripts/Main/Common/ScrollviewListItem";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -54,7 +56,11 @@ export class ThemePanel extends li_BaseView {
cache: ThemeItem[] = []; cache: ThemeItem[] = [];
recItemCache: RecomandItem[] = []; // 不再需要手动管理 recItemCache
// recItemCache: RecomandItem[] = [];
// 虚拟列表组件
private scrollViewList: HXZ_ScrollViewList = null;
// 子页面管理 // 子页面管理
@@ -76,6 +82,9 @@ export class ThemePanel extends li_BaseView {
private isLoadingMore: boolean = false; private isLoadingMore: boolean = false;
private hasMoreData: boolean = true; private hasMoreData: boolean = true;
// 记录上次触发加载的 ID,避免重复触发
private lastLoadTriggerId: number = -1;
onLoadCT() { onLoadCT() {
Utils.parseNode(this.node, this._nodeTab); Utils.parseNode(this.node, this._nodeTab);
@@ -93,6 +102,15 @@ export class ThemePanel extends li_BaseView {
if (this.recomandScroll) { if (this.recomandScroll) {
this.recomandScrollView = this.recomandScrollView =
this.recomandScroll.getComponentInChildren(ScrollView); this.recomandScroll.getComponentInChildren(ScrollView);
// 获取虚拟列表组件(需要在场景中手动添加 HXZ_ScrollViewList 组件)
this.scrollViewList =
this.recomandScroll.getComponentInChildren(HXZ_ScrollViewList);
if (!this.scrollViewList) {
logger.warn(
"[ThemePanel] recomandScroll 节点缺少 HXZ_ScrollViewList 组件,请在编辑器中添加"
);
}
} }
this.registerListener(); this.registerListener();
@@ -100,6 +118,7 @@ export class ThemePanel extends li_BaseView {
this.itemInst.node.active = false; this.itemInst.node.active = false;
this.recItemInst = this._nodeTab.recItem.getComponent(RecomandItem); this.recItemInst = this._nodeTab.recItem.getComponent(RecomandItem);
// 虚拟列表会自动管理模板节点的显隐,但保留兼容性代码
this.recItemInst.node.active = false; this.recItemInst.node.active = false;
this.themeContent = this._nodeTab.allThemecontent; this.themeContent = this._nodeTab.allThemecontent;
@@ -249,6 +268,38 @@ export class ThemePanel extends li_BaseView {
} }
} }
/**
* 虚拟列表渲染回调
* 该方法需要在 Cocos Creator 编辑器中配置到 HXZ_ScrollViewList 的 renderEvent
* @param itemNode 虚拟列表传入的节点
* @param index 数据索引
*/
onRenderRecommendItem(itemNode: Node, index: number): void {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
const girlIDs = girlData.getRecommendListIds();
if (index < girlIDs.length) {
const girlId = girlIDs[index];
const item = itemNode.getComponent(RecomandItem);
if (!item) {
logger.error(
`[ThemePanel] 节点缺少 RecomandItem 组件,index: ${index}`
);
return;
}
// 确保节点已初始化
if (!item._initialized) {
item.init();
}
// 刷新数据
item.refresh(girlId);
itemNode.active = true;
}
}
/** /**
* 处理推荐数据 * 处理推荐数据
*/ */
@@ -277,59 +328,62 @@ export class ThemePanel extends li_BaseView {
/** /**
* 渲染推荐列表数据(首次渲染) * 渲染推荐列表数据(首次渲染)
* 【已废弃】使用虚拟列表后,不再需要手动渲染,通过 numItems 触发自动渲染
*/ */
private renderRecommendData(): void { private renderRecommendData_DEPRECATED(): void {
if (this.recItemCache.length > 0) return; // 该方法已被虚拟列表的自动渲染机制替代
// 保留此方法仅用于参考,实际不再调用
// 重置分页状态
this.currentPage = 1;
this.hasMoreData = true;
this.isLoadingMore = false;
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
// 获取推荐列表的所有 ID
let girlIDs = girlData.getRecommendListIds();
// 遍历创建推荐项
for (let id of girlIDs) {
let newNode = instantiate(this.recItemInst.node);
let item = newNode.getComponent(RecomandItem);
item.init();
item.refresh(id);
newNode.active = true;
this.recItemCache.push(item);
this.recGirlContent.addChild(newNode);
}
// 检查首次加载的数据量,判断是否还有更多数据
if (girlIDs.length < this.pageLimit) {
this.hasMoreData = false;
}
logger.log(`[ThemePanel] 渲染推荐列表完成,共 ${girlIDs.length} 个推荐项`);
} }
/** /**
* 滚动到底部回调(Cocos Creator 内置事件 * 滚动到底部回调(已废弃
* 该方法不再使用,改用 onRecommendScrolling() 中的滚动偏移量检测
* scroll-to-bottom 事件触发不稳定,改为在 scrolling 事件中检测距离底部的距离
*/ */
private onRecommendScrollToBottom(): void { private onRecommendScrollToBottom_DEPRECATED(): void {
logger.log("[ThemePanel] 推荐列表滚动到底部"); logger.log("[ThemePanel] 推荐列表滚动到底部");
this.loadMoreRecommendData(); this.loadMoreRecommendData();
} }
/** /**
* 滚动中回调,用于检测接近底部 * 滚动中回调,基于虚拟列表 displayData 检测并触发分页加载
* 当显示到接近已加载数据末尾时(倒数第3个),自动加载下一页
*/ */
private onRecommendScrolling(): void { private onRecommendScrolling(): void {
if (!this.recomandScrollView) return; if (!this.scrollViewList) return;
// 获取滚动进度(0-1 // 获取虚拟列表的 displayData 和总数
const scrollOffset = this.recomandScrollView.getScrollOffset(); const displayData = this.scrollViewList.displayData;
const maxScrollOffset = this.recomandScrollView.getMaxScrollOffset(); const numItems = this.scrollViewList.numItems;
// 当滚动到距离底部 100 像素以内时,开始加载 // 检查数据有效性
if (maxScrollOffset.y > 0 && scrollOffset.y >= maxScrollOffset.y - 100) { if (!displayData || displayData.length === 0 || numItems === 0) return;
// 获取当前显示的最后一个 item 的 ID
const lastDisplayedId = displayData[displayData.length - 1].id;
// 调试日志(显示当前滚动状态)
const firstDisplayedId = displayData[0].id;
logger.log(
`[滚动] 显示范围: ID ${firstDisplayedId}-${lastDisplayedId}, 总数: ${numItems}, 已加载页: ${this.currentPage}`
);
// 触发条件:显示到倒数第 3 个 item 时开始加载下一页
// 例如:总数 10,显示到 ID=7 时触发(10-3=7
// 总数 20,显示到 ID=17 时触发(20-3=17
const threshold = numItems - 3;
if (lastDisplayedId >= threshold && lastDisplayedId > this.lastLoadTriggerId) {
logger.log(
`[ThemePanel] 接近末尾 (${lastDisplayedId}/${numItems}),触发加载第 ${
this.currentPage + 1
}`
);
// 记录本次触发的 ID,避免重复触发
this.lastLoadTriggerId = lastDisplayedId;
// 触发分页加载
this.loadMoreRecommendData(); this.loadMoreRecommendData();
} }
} }
@@ -376,12 +430,16 @@ export class ThemePanel extends li_BaseView {
logger.log("[ThemePanel] 已加载所有推荐数据"); logger.log("[ThemePanel] 已加载所有推荐数据");
} }
// 渲染新增数据 // 使用虚拟列表:更新总数量,自动触发渲染
this.renderMoreRecommendData(girls.length); if (this.scrollViewList) {
const allGirlIDs = girlData.getRecommendListIds();
logger.log( this.scrollViewList.numItems = allGirlIDs.length;
`[ThemePanel] 第 ${this.currentPage} 页加载完成,新增 ${girls.length}` logger.log(
); `[ThemePanel] 第 ${this.currentPage} 页加载完成,新增 ${girls.length} 项,总计 ${allGirlIDs.length}`
);
} else {
logger.warn("[ThemePanel] scrollViewList 未初始化,无法更新列表");
}
} else { } else {
logger.warn("[ThemePanel] 加载下一页推荐数据失败:", res); logger.warn("[ThemePanel] 加载下一页推荐数据失败:", res);
// 加载失败,回退页码 // 加载失败,回退页码
@@ -398,31 +456,12 @@ export class ThemePanel extends li_BaseView {
/** /**
* 渲染新增的推荐数据 * 渲染新增的推荐数据
* 【已废弃】使用虚拟列表后,通过更新 numItems 自动触发渲染
* @param newCount 新增数据的数量 * @param newCount 新增数据的数量
*/ */
private renderMoreRecommendData(newCount: number): void { private renderMoreRecommendData_DEPRECATED(newCount: number): void {
if (newCount <= 0) return; // 该方法已被虚拟列表的自动渲染机制替代
// 保留此方法仅用于参考,实际不再调用
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
const allGirlIDs = girlData.getRecommendListIds();
// 只渲染新增的部分(从末尾开始取 newCount 个)
const startIndex = allGirlIDs.length - newCount;
const newGirlIDs = allGirlIDs.slice(startIndex);
logger.log(`[ThemePanel] 开始渲染 ${newCount} 个新增推荐项`);
for (let id of newGirlIDs) {
let newNode = instantiate(this.recItemInst.node);
let item = newNode.getComponent(RecomandItem);
item.init();
item.refresh(id);
newNode.active = true;
this.recItemCache.push(item);
this.recGirlContent.addChild(newNode);
}
logger.log(`[ThemePanel] 新增推荐项渲染完成`);
} }
/** /**
@@ -446,19 +485,18 @@ export class ThemePanel extends li_BaseView {
GButton.BandClick(this.recomandListBtn, this.openRecomandList, this); GButton.BandClick(this.recomandListBtn, this.openRecomandList, this);
GButton.BandClick(this.moreThemeBtn, this.openMoreTheme, this); GButton.BandClick(this.moreThemeBtn, this.openMoreTheme, this);
// 注册推荐列表滚动事件 // 注册推荐列表滚动事件(延迟到下一帧,确保虚拟列表已初始化)
if (this.recomandScrollView) { this.scheduleOnce(() => {
this.recomandScrollView.node.on( if (this.scrollViewList) {
"scroll-to-bottom", // 只监听 scrolling 事件,通过滚动偏移量检测是否接近底部
this.onRecommendScrollToBottom, this.scrollViewList.node.on("scrolling", this.onRecommendScrolling, this);
this logger.log("[ThemePanel] 虚拟列表滚动事件已绑定");
); } else {
this.recomandScrollView.node.on( logger.warn(
"scrolling", "[ThemePanel] 无法绑定滚动事件,scrollViewList 未初始化"
this.onRecommendScrolling, );
this }
); }, 0.1);
}
Utils.addInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChange); Utils.addInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChange);
Utils.addInnerEL(InnerMsgCode.BalanceChange, this, this.onBalanceChange); Utils.addInnerEL(InnerMsgCode.BalanceChange, this, this.onBalanceChange);
@@ -477,8 +515,23 @@ export class ThemePanel extends li_BaseView {
this.themeScroll.active = false; this.themeScroll.active = false;
this.recomandScroll.active = true; this.recomandScroll.active = true;
//todo:是否需要刷新数据 // 使用虚拟列表:设置数据总量,自动触发渲染
this.renderRecommendData(); if (this.scrollViewList) {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
const girlIDs = girlData.getRecommendListIds();
// 重置分页状态(仅在首次打开时)
if (this.scrollViewList.numItems === 0) {
this.currentPage = 1;
this.hasMoreData = true;
this.isLoadingMore = false;
}
this.scrollViewList.numItems = girlIDs.length;
logger.log(`[ThemePanel] 打开推荐列表,共 ${girlIDs.length}`);
} else {
logger.warn("[ThemePanel] scrollViewList 未初始化");
}
this.updateTagState(true); this.updateTagState(true);
} }
@@ -562,27 +615,19 @@ export class ThemePanel extends li_BaseView {
this.cache = []; this.cache = [];
} }
// 清理推荐项缓存 // 虚拟列表自动管理对象池,只需重置数量
if (this.recItemCache && this.recItemCache.length > 0) { if (this.scrollViewList) {
logger.log( this.scrollViewList.numItems = 0;
`[ThemePanel] 清理 ${this.recItemCache.length} 个推荐项缓存节点` logger.log("[ThemePanel] 重置虚拟列表项数量");
);
for (let i = this.recItemCache.length - 1; i >= 0; i--) {
if (
this.recItemCache[i] &&
this.recItemCache[i].node &&
this.recItemCache[i].node.isValid
) {
this.recItemCache[i].node.destroy();
}
}
this.recItemCache = [];
} }
// 重置推荐列表分页状态 // 重置推荐列表分页状态
this.currentPage = 1; this.currentPage = 1;
this.hasMoreData = true; this.hasMoreData = true;
this.isLoadingMore = false; this.isLoadingMore = false;
// 重置触发记录
this.lastLoadTriggerId = -1;
} }
/** /**
@@ -617,18 +662,10 @@ export class ThemePanel extends li_BaseView {
this.isLoading = false; this.isLoading = false;
this.loadingPromise = null; this.loadingPromise = null;
// 移除推荐列表滚动事件监听 // 移除虚拟列表滚动事件监听
if (this.recomandScrollView) { if (this.scrollViewList) {
this.recomandScrollView.node.off( this.scrollViewList.node.off("scrolling", this.onRecommendScrolling, this);
"scroll-to-bottom", logger.log("[ThemePanel] 虚拟列表滚动事件已移除");
this.onRecommendScrollToBottom,
this
);
this.recomandScrollView.node.off(
"scrolling",
this.onRecommendScrolling,
this
);
} }
// 移除事件监听器(修复回调函数引用问题) // 移除事件监听器(修复回调函数引用问题)
+27 -6
View File
@@ -29,7 +29,15 @@ export class RecomandItem extends Component {
private id: number; private id: number;
// 标记是否已初始化(用于虚拟列表复用)
public _initialized: boolean = false;
// 兼容原有调用方式的 init 方法
init() { init() {
if (this._initialized) {
return;
}
Utils.parseNode(this.node, this._nodeTab); Utils.parseNode(this.node, this._nodeTab);
this.recPic = this._nodeTab.recPic.getComponent(Sprite); this.recPic = this._nodeTab.recPic.getComponent(Sprite);
@@ -45,6 +53,14 @@ export class RecomandItem extends Component {
this.chatBtn = this._nodeTab.chatBtn; this.chatBtn = this._nodeTab.chatBtn;
GButton.BandClick(this.chatBtn, this.chatToHer, this); GButton.BandClick(this.chatBtn, this.chatToHer, this);
GButton.BandClick(this._nodeTab.detailBtn, this.gotoDetail, this); GButton.BandClick(this._nodeTab.detailBtn, this.gotoDetail, this);
this._initialized = true;
}
// 节点回收到对象池时调用,重置状态
reset(): void {
this.id = -1;
this.node.active = false;
} }
refresh(girlId: number) { refresh(girlId: number) {
@@ -72,7 +88,7 @@ export class RecomandItem extends Component {
}); });
const star = girlData.getStar(category.toString(), this.id); const star = girlData.getStar(category.toString(), this.id);
logger.log("好感度:" + star); //logger.log("好感度:" + star);
for (let i = 0; i < this.hearts.length; i++) { for (let i = 0; i < this.hearts.length; i++) {
const element = this.hearts[i]; const element = this.hearts[i];
if (star > i) { if (star > i) {
@@ -100,11 +116,16 @@ export class RecomandItem extends Component {
const currentPanel = NavigationManager.Instance.getCurrentActivePanelNode(); const currentPanel = NavigationManager.Instance.getCurrentActivePanelNode();
if (currentPanel) { if (currentPanel) {
const chatData = { girlId: this.id, base: currentPanel }; const chatData = { girlId: this.id, base: currentPanel };
NavigationManager.Instance.openSubPanel("ChatPanel", currentPanel, chatData, { NavigationManager.Instance.openSubPanel(
openAnimation: PageTransitionType.SLIDE_LEFT, "ChatPanel",
closeAnimation: PageTransitionType.SLIDE_RIGHT, currentPanel,
hideBasePanel: true, chatData,
}); {
openAnimation: PageTransitionType.SLIDE_LEFT,
closeAnimation: PageTransitionType.SLIDE_RIGHT,
hideBasePanel: true,
}
);
} else { } else {
logger.warn("[RecomandItem] 无法获取当前激活的主页面"); logger.warn("[RecomandItem] 无法获取当前激活的主页面");
} }
+160 -62
View File
@@ -25,17 +25,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 464 "__id__": 471
}, },
{ {
"__id__": 466 "__id__": 473
}, },
{ {
"__id__": 468 "__id__": 475
} }
], ],
"_prefab": { "_prefab": {
"__id__": 470 "__id__": 477
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -88,17 +88,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 457 "__id__": 464
}, },
{ {
"__id__": 459 "__id__": 466
}, },
{ {
"__id__": 461 "__id__": 468
} }
], ],
"_prefab": { "_prefab": {
"__id__": 463 "__id__": 470
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -7514,23 +7514,23 @@
"__id__": 330 "__id__": 330
}, },
{ {
"__id__": 424 "__id__": 426
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 450 "__id__": 457
}, },
{ {
"__id__": 452 "__id__": 459
}, },
{ {
"__id__": 454 "__id__": 461
} }
], ],
"_prefab": { "_prefab": {
"__id__": 456 "__id__": 463
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -7599,10 +7599,13 @@
}, },
{ {
"__id__": 421 "__id__": 421
},
{
"__id__": 423
} }
], ],
"_prefab": { "_prefab": {
"__id__": 423 "__id__": 425
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -9739,6 +9742,30 @@
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "25w438HtBIppjIzrSNlabh" "fileId": "25w438HtBIppjIzrSNlabh"
}, },
{
"__type__": "1c2749hWMJOWb+yk8nrIBNh",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 330
},
"_enabled": true,
"__prefab": {
"__id__": 424
},
"icon": null,
"title": null,
"selectedMode": 0,
"selectedFlag": null,
"selectedSpriteFrame": null,
"adaptiveSize": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d1428WXUhDzZjJKBtXUtGw"
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@@ -9762,14 +9789,11 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 425 "__id__": 427
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 441
},
{ {
"__id__": 443 "__id__": 443
}, },
@@ -9778,15 +9802,21 @@
}, },
{ {
"__id__": 447 "__id__": 447
},
{
"__id__": 449
},
{
"__id__": 451
} }
], ],
"_prefab": { "_prefab": {
"__id__": 449 "__id__": 456
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0, "y": 603.534,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -9818,18 +9848,15 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 424 "__id__": 426
}, },
"_children": [ "_children": [
{ {
"__id__": 426 "__id__": 428
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 432
},
{ {
"__id__": 434 "__id__": 434
}, },
@@ -9838,10 +9865,13 @@
}, },
{ {
"__id__": 438 "__id__": 438
},
{
"__id__": 440
} }
], ],
"_prefab": { "_prefab": {
"__id__": 440 "__id__": 442
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -9878,20 +9908,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 425 "__id__": 427
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 427 "__id__": 429
}, },
{ {
"__id__": 429 "__id__": 431
} }
], ],
"_prefab": { "_prefab": {
"__id__": 431 "__id__": 433
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -9928,11 +9958,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 426 "__id__": 428
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 428 "__id__": 430
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -9956,11 +9986,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 426 "__id__": 428
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 430 "__id__": 432
}, },
"_resizeMode": 1, "_resizeMode": 1,
"_layoutType": 2, "_layoutType": 2,
@@ -10007,11 +10037,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 425 "__id__": 427
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 433 "__id__": 435
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -10021,7 +10051,7 @@
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 1
}, },
"_id": "" "_id": ""
}, },
@@ -10035,11 +10065,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 425 "__id__": 427
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 435 "__id__": 437
}, },
"_type": 0, "_type": 0,
"_inverted": false, "_inverted": false,
@@ -10057,11 +10087,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 425 "__id__": 427
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 437 "__id__": 439
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -10103,11 +10133,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 425 "__id__": 427
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 439 "__id__": 441
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -10152,11 +10182,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 424 "__id__": 426
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 442 "__id__": 444
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -10166,7 +10196,7 @@
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 1
}, },
"_id": "" "_id": ""
}, },
@@ -10180,11 +10210,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 424 "__id__": 426
}, },
"_enabled": false, "_enabled": false,
"__prefab": { "__prefab": {
"__id__": 444 "__id__": 446
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -10225,11 +10255,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 424 "__id__": 426
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 446 "__id__": 448
}, },
"bounceDuration": 0.23, "bounceDuration": 0.23,
"brake": 0.75, "brake": 0.75,
@@ -10240,7 +10270,7 @@
"cancelInnerEvents": true, "cancelInnerEvents": true,
"scrollEvents": [], "scrollEvents": [],
"_content": { "_content": {
"__id__": 426 "__id__": 428
}, },
"_horizontalScrollBar": null, "_horizontalScrollBar": null,
"_verticalScrollBar": null, "_verticalScrollBar": null,
@@ -10256,11 +10286,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 424 "__id__": 426
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 448 "__id__": 450
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -10286,6 +10316,74 @@
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "bdX7EdKXFKipBjbAh2uN6h" "fileId": "bdX7EdKXFKipBjbAh2uN6h"
}, },
{
"__type__": "fd851tnoT1G06/c2igvxAq8",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 426
},
"_enabled": true,
"__prefab": {
"__id__": 452
},
"templateType": 1,
"tmpNode": {
"__id__": 330
},
"tmpPrefab": null,
"_slideMode": 1,
"pageDistance": 0.3,
"pageChangeEvent": {
"__id__": 453
},
"_virtual": true,
"cyclic": true,
"lackCenter": false,
"lackSlide": true,
"_updateRate": 0,
"frameByFrameRenderNum": 0,
"renderEvent": {
"__id__": 454
},
"selectedMode": 0,
"selectedEvent": {
"__id__": 455
},
"repeatEventSingle": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6aPjUurOpMQaoRPAaU9dQJ"
},
{
"__type__": "cc.ClickEvent",
"target": null,
"component": "",
"_componentId": "",
"handler": "",
"customEventData": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "f7d97PE7DFJvIUqvajvp2cQ",
"handler": "onRenderRecommendItem",
"customEventData": ""
},
{
"__type__": "cc.ClickEvent",
"target": null,
"component": "",
"_componentId": "",
"handler": "",
"customEventData": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@@ -10309,7 +10407,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 451 "__id__": 458
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -10337,7 +10435,7 @@
}, },
"_enabled": false, "_enabled": false,
"__prefab": { "__prefab": {
"__id__": 453 "__id__": 460
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -10382,7 +10480,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 455 "__id__": 462
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -10431,7 +10529,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 458 "__id__": 465
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -10459,7 +10557,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 460 "__id__": 467
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -10504,7 +10602,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 462 "__id__": 469
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -10553,7 +10651,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 465 "__id__": 472
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -10581,7 +10679,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 467 "__id__": 474
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -10617,7 +10715,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 469 "__id__": 476
}, },
"m_rootNode": null, "m_rootNode": null,
"_id": "" "_id": ""