|
|
@@ -977,8 +977,14 @@ export class LearningPageComponent implements OnInit, OnDestroy {
|
|
|
: this.query('nid') || this.query('pid');
|
|
|
const params: Record<string, unknown> = { pid, cpage: 1, psize: 100 };
|
|
|
if (this.isUnitListPage) {
|
|
|
+ const learner = this.canStartPointReading ? this.session.student() : this.session.user();
|
|
|
+ if (!learner?.userId) {
|
|
|
+ this.loading.set(false);
|
|
|
+ this.error.set('未找到当前学员,请返回学习记录重新选择学员');
|
|
|
+ return;
|
|
|
+ }
|
|
|
params['ifunit'] = 1;
|
|
|
- params['userId'] = this.session.user()?.userId;
|
|
|
+ params['userId'] = learner.userId;
|
|
|
params['bindingId'] = this.query('bindingId');
|
|
|
}
|
|
|
this.api.get<unknown>('node_list', params).pipe(finalize(() => this.loading.set(false))).subscribe({
|