Commit 5b022765 authored by liujiangnan's avatar liujiangnan

fix: 模板上传问题

parent b666901b
...@@ -37,11 +37,19 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges { ...@@ -37,11 +37,19 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
this.uploadUrl = (<any> window).courseware.uploadUrl(); this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData(); this.uploadData = (<any> window).courseware.uploadData();
window['air'].getUploadCallback = (url, data) => { const fun = () => {
this.uploadUrl = url; setTimeout(() => {
this.uploadData = data; this.uploadUrl = (<any> window).courseware.uploadUrl();
}; this.uploadData = (<any> window).courseware.uploadData();
if(!this.uploadUrl){
fun();
}
}, 1000);
}
if(!this.uploadUrl){
fun();
}
} }
ngOnChanges() { ngOnChanges() {
if (!this.picItem) { if (!this.picItem) {
...@@ -51,8 +59,6 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges { ...@@ -51,8 +59,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 {
console.log('info:' , info); console.log('info:' , info);
......
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