|
@@ -171,6 +171,7 @@ class CLScene extends scene {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //当前无意义
|
|
|
loadPeripheryList(tagId, index) {
|
|
|
APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
|
|
|
if (!isTrue) { return; }
|
|
@@ -201,7 +202,6 @@ class CLScene extends scene {
|
|
|
resource: 'RESOURCE',
|
|
|
training: 'TRAINING',
|
|
|
}[this.sceneType] || 'RESOURCE';
|
|
|
-
|
|
|
APIClient.getTagListByGroupCode(type, (isTrue, res) => {
|
|
|
if (!isTrue) { return; }
|
|
|
if (!res.success) {
|
|
@@ -211,7 +211,11 @@ class CLScene extends scene {
|
|
|
}
|
|
|
|
|
|
// 设置顶部名称
|
|
|
- document.getElementById('name-text').textContent = res.data.name || '未知';
|
|
|
+ let sceneName = res.data.name || '';
|
|
|
+ if (this.sceneType === 'collection') {
|
|
|
+ sceneName = '课程收藏';
|
|
|
+ }
|
|
|
+ document.getElementById('name-text').textContent = sceneName;
|
|
|
|
|
|
// 渲染标签列表
|
|
|
if (!res.data || !res.data.list || res.data.list.length < 1) {
|
|
@@ -232,7 +236,7 @@ class CLScene extends scene {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ //收藏
|
|
|
collectionObserver() {
|
|
|
if (this.sceneType == 'collection') {
|
|
|
this.loadCourseList(this.selectedTagId, 1);
|
|
@@ -241,15 +245,13 @@ class CLScene extends scene {
|
|
|
|
|
|
onCreate(data) {
|
|
|
this.setContentView(require('../../../res/tpl/CLScene.tpl'), {}, 'CLScene', {}, () => {
|
|
|
- // 页面渲染完成异步回调
|
|
|
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));
|
|
|
});
|
|
|
}
|
|
|
|