Commit 1a8c51a0 by Sweet Zhang

通过目录播放时修改url

parent 0085e0cd
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<p>{{i + 1}}.</p> <p>{{i + 1}}.</p>
<p> <p>
<span>{{fileUploadItem?.itemName}}</span> <span>{{fileUploadItem?.itemName}}</span>
<span>{{fileUploadItem?.maxViewTime | secondsTransfer}}/{{fileUploadItem?.totalTime | secondsTransfer}}</span> <span>{{fileUploadItem?.viewTime | secondsTransfer}}/{{fileUploadItem?.totalTime | secondsTransfer}}</span>
</p> </p>
</div> </div>
<div style="display: flex;flex-direction:column;align-items:center;width:58px;"> <div style="display: flex;flex-direction:column;align-items:center;width:58px;">
......
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { LifeCommonService } from 'src/app/common/life-common.service'; import { LifeCommonService } from 'src/app/common/life-common.service';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
...@@ -32,7 +32,7 @@ export class CourseDetailComponent implements OnInit,OnDestroy { ...@@ -32,7 +32,7 @@ export class CourseDetailComponent implements OnInit,OnDestroy {
this.state[key] = false; this.state[key] = false;
} }
constructor(private activatedRoute: ActivatedRoute, private myService: MyService, private lifeCommonService: LifeCommonService) { } constructor(private router:Router,private activatedRoute: ActivatedRoute, private myService: MyService, private lifeCommonService: LifeCommonService) { }
ngOnInit() { ngOnInit() {
this.fileId = this.activatedRoute.snapshot.params.fileId; this.fileId = this.activatedRoute.snapshot.params.fileId;
...@@ -176,6 +176,7 @@ export class CourseDetailComponent implements OnInit,OnDestroy { ...@@ -176,6 +176,7 @@ export class CourseDetailComponent implements OnInit,OnDestroy {
this.state.modal1 = true; this.state.modal1 = true;
} else { } else {
this.filePathQuery(val.learningStatus, val.fileId); this.filePathQuery(val.learningStatus, val.fileId);
this.router.navigate(['/courseDetail','undefined',val.fileId],{replaceUrl:true});
document.body.scroll({top:0, document.body.scroll({top:0,
left: 0, left: 0,
behavior: 'smooth'}) behavior: 'smooth'})
......
...@@ -11,10 +11,10 @@ export class YdCollegeComponent implements OnInit { ...@@ -11,10 +11,10 @@ export class YdCollegeComponent implements OnInit {
{no:23,name:'保险ABC',icon:'insuranceABC',link:'',path:`https://${window.location.host}/issue`,isOpen:true}, {no:23,name:'保险ABC',icon:'insuranceABC',link:'',path:`https://${window.location.host}/issue`,isOpen:true},
{no:24,name:'岗前训',icon:'preJobTraining',link:'/prejobTraining',path:'',isOpen:true}, {no:24,name:'岗前训',icon:'preJobTraining',link:'/prejobTraining',path:'',isOpen:true},
{no:25,name:'新人训',icon:'newTraining',link:'/newTraining',path:'',isOpen:true}, {no:25,name:'新人训',icon:'newTraining',link:'/newTraining',path:'',isOpen:true},
{no:26,name:'CFFP初级训',icon:'cffpTraining',link:'/cffpElementaryTraining',path:'',isOpen:true}, {no:26,name:'CFFP初级训',icon:'cffpElementaryTraining',link:'/cffpElementaryTraining',path:'',isOpen:true},
{no:27,name:'提升训',icon:'promotionTraining',link:'/advanceTraining',path:'',isOpen:true}, {no:27,name:'提升训',icon:'promotionTraining',link:'/advanceTraining',path:'',isOpen:true},
{no:28,name:'CFFP衔接训',icon:'cffpTraining',link:'/cffpBridgingTraining',path:'',isOpen:true}, {no:28,name:'CFFP衔接训',icon:'cffpBridgingTraining',link:'/cffpBridgingTraining',path:'',isOpen:true},
{no:29,name:'CFFP高阶训',icon:'cffpTraining',link:'/cffpAdvancedTraining',path:'',isOpen:true}, {no:29,name:'CFFP高阶训',icon:'cffpAdvancedTraining',link:'/cffpAdvancedTraining',path:'',isOpen:true},
{no:30,name:'产品培训',icon:'productTraining',link:'/productTraining',path:'',isOpen:true}, {no:30,name:'产品培训',icon:'productTraining',link:'/productTraining',path:'',isOpen:true},
{no:31,name:'我的培训',icon:'training',link:'/myTraining',path:'',isOpen:true} {no:31,name:'我的培训',icon:'training',link:'/myTraining',path:'',isOpen:true}
] ]
......
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