Commit 2c687665 authored by liujiangnan's avatar liujiangnan

feat: 解锁提示

parent b5b65f5c
......@@ -111,13 +111,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
const lock = cc.find('icon_key', b);
const syllabusId = b.data_id;
const folderId = b.data_pid;
const folderName = b.data_pname;
if (!syllabusId) {
this.showTips("未解锁 [101]");
return;
}
if (lock.active) {
this.showTips("请拼读达人按顺序观看小剧场哦!");
this.showTips(`完成拼读天地里${folderName} Story才能解锁哦!`);
return;
}
......@@ -319,6 +320,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (childrenList.length > 3) {
childrenList.length = 3
}
childrenList = childrenList.map(item => {
return {...item, p_name: result.name};
});
result = [...result, ...childrenList]
return result
}, []);
......@@ -342,6 +346,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
b.attr({ 'data_id': lesson.id });
b.attr({ 'data_pid': lesson.pid });
b.attr({ 'data_pname': lesson.p_name });
if (index == 0 || ( this.kidInfo && this.kidInfo.unlock_syllabuses?.includes(lesson.id+"") && (index-0) % 3 === 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment