Commit 446eb146 authored by liujiangnan's avatar liujiangnan

feat: 封面

parent daa0fc17
......@@ -231,7 +231,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存数据
*/
save() {
this.createCover();
(window as any).courseware.setData(this.item, null, this.saveKey);
this.refresh();
}
......@@ -295,8 +294,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.http.post(this.uploadUrl, formData).subscribe(
(res: any) => {
(window as any).courseware.sendEvent("screenshot", {"url": res.url}, this.saveKey);
this.item.contentObj.pic_id = res.url;
this.save();
},
(err) => {
console.log(err);
......@@ -400,6 +397,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
onBtnSave() {
this.createCover();
this.save();
this.extraData.changeDirtyCount = 0;
}
......
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