|
@@ -145,6 +145,7 @@ class CLScene extends scene {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //当前无意义
|
|
loadPeripheryList(tagId, index) {
|
|
loadPeripheryList(tagId, index) {
|
|
APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
|
|
APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
|
|
if (!isTrue) { return; }
|
|
if (!isTrue) { return; }
|
|
@@ -156,14 +157,12 @@ class CLScene extends scene {
|
|
this.rightScrollEvent.releaseEventLock();
|
|
this.rightScrollEvent.releaseEventLock();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
loadTagList() {
|
|
loadTagList() {
|
|
let type = {
|
|
let type = {
|
|
periphery: 'PERIPHERY',
|
|
periphery: 'PERIPHERY',
|
|
resource: 'RESOURCE',
|
|
resource: 'RESOURCE',
|
|
training: 'TRAINING',
|
|
training: 'TRAINING',
|
|
}[this.sceneType] || 'RESOURCE';
|
|
}[this.sceneType] || 'RESOURCE';
|
|
-
|
|
|
|
APIClient.getTagListByGroupCode(type, (isTrue, res) => {
|
|
APIClient.getTagListByGroupCode(type, (isTrue, res) => {
|
|
if (!isTrue) { return; }
|
|
if (!isTrue) { return; }
|
|
if (!res.success) {
|
|
if (!res.success) {
|
|
@@ -192,7 +191,7 @@ class CLScene extends scene {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //收藏
|
|
collectionObserver() {
|
|
collectionObserver() {
|
|
if (this.sceneType == 'collection') {
|
|
if (this.sceneType == 'collection') {
|
|
this.loadCourseList(this.selectedTagId, 1);
|
|
this.loadCourseList(this.selectedTagId, 1);
|
|
@@ -201,15 +200,13 @@ class CLScene extends scene {
|
|
|
|
|
|
onCreate(data) {
|
|
onCreate(data) {
|
|
this.setContentView(require('../../../res/tpl/CLScene.tpl'), {}, 'CLScene', {}, () => {
|
|
this.setContentView(require('../../../res/tpl/CLScene.tpl'), {}, 'CLScene', {}, () => {
|
|
- // 页面渲染完成异步回调
|
|
|
|
this.sceneType = data.type;
|
|
this.sceneType = data.type;
|
|
- this.loadTagList();
|
|
|
|
- this.initLeftTabOnFocus();
|
|
|
|
-
|
|
|
|
- this.rightScrollEvent.bind(this.moye.root.getWidgetById('cl-right-content-scroll'));
|
|
|
|
- ShopCartState.getCount();
|
|
|
|
-
|
|
|
|
- NotificationCenter.add('collection_refresh', this.collectionObserver.bind(this));
|
|
|
|
|
|
+ console.log( 'currentTime sceneType',data)
|
|
|
|
+ this.loadTagList();
|
|
|
|
+ this.initLeftTabOnFocus();
|
|
|
|
+ this.rightScrollEvent.bind(this.moye.root.getWidgetById('cl-right-content-scroll'));
|
|
|
|
+ ShopCartState.getCount();
|
|
|
|
+ NotificationCenter.add('collection_refresh', this.collectionObserver.bind(this));
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|