Commit 9395fd1c authored by 李维's avatar 李维

bug fix

parent 9f48facf
...@@ -21,8 +21,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -21,8 +21,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
Type = Type; Type = Type;
withRmBtn = false; withRmBtn = false;
uploadUrl = (<any>window).courseware.uploadUrl(); uploadUrl;
uploadData = (<any>window).courseware.uploadData(); uploadData;
@Input() @Input()
needRemove = false; needRemove = false;
...@@ -52,9 +52,13 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -52,9 +52,13 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
recorder: any; recorder: any;
audioBlob: any; audioBlob: any;
constructor( private nzMessageService: NzMessageService ) { constructor( private nzMessageService: NzMessageService ) {
this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData();
window['air'].getUploadCallback = (url, data) => {
this.uploadUrl = url;
this.uploadData = data;
};
} }
init() { init() {
......
...@@ -29,10 +29,17 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges { ...@@ -29,10 +29,17 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
@Input() @Input()
disableUpload = false; disableUpload = false;
uploadUrl = (<any> window).courseware.uploadUrl(); uploadUrl;
uploadData = (<any> window).courseware.uploadData(); uploadData;
constructor(private nzMessageService: NzMessageService) { constructor(private nzMessageService: NzMessageService) {
this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData();
window['air'].getUploadCallback = (url, data) => {
this.uploadUrl = url;
this.uploadData = data;
};
} }
ngOnChanges() { ngOnChanges() {
if (!this.picItem) { if (!this.picItem) {
...@@ -40,10 +47,6 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges { ...@@ -40,10 +47,6 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
} }
} }
handleChange(info: { type: string, file: UploadFile, event: any }): void { handleChange(info: { type: string, file: UploadFile, event: any }): void {
switch (info.type) { switch (info.type) {
case 'start': case 'start':
......
...@@ -27,9 +27,6 @@ export class UploadVideoComponent implements OnChanges, OnDestroy { ...@@ -27,9 +27,6 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
@ViewChild('videoNode') @ViewChild('videoNode')
videoNode: ElementRef; videoNode: ElementRef;
// @Input() // @Input()
// extractCoverFunc = null; // extractCoverFunc = null;
...@@ -47,17 +44,24 @@ export class UploadVideoComponent implements OnChanges, OnDestroy { ...@@ -47,17 +44,24 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
item: any; item: any;
// videoItem = null; // videoItem = null;
uploadUrl = (<any> window).courseware.uploadUrl(); uploadUrl;
uploadData = (<any> window).courseware.uploadData(); uploadData;
constructor(private nzMessageService: NzMessageService, constructor(private nzMessageService: NzMessageService,
private sanitization: DomSanitizer private sanitization: DomSanitizer
// private cwService: _coursewareService, // private cwService: _coursewareService,
// private resService: ResourceService // private resService: ResourceService
) { ) {
this.uploading = false; this.uploading = false;
this.videoFile = null; this.videoFile = null;
this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData();
window['air'].getUploadCallback = (url, data) => {
this.uploadUrl = url;
this.uploadData = data;
};
} }
ngOnChanges() { ngOnChanges() {
// if (!this.videoFile || this.showUploadBtn) { // if (!this.videoFile || this.showUploadBtn) {
......
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