Commit cd08e47d authored by developers's avatar developers

上传代码

parent a970169f
@import '../style/common_mixin.css';
.model-content {
width: 100%;
height: 100%;
}
This diff is collapsed.
@import '../style/common_mixin';
.model-content {
width: 100%;
height: 100%;
}
.show-pic-box {display: flex;flex-wrap: wrap; justify-items: flex-start;align-content:start; margin-left: 5%; margin-top: 5vh; width: 90%;}
.show-pic {margin-left: 20px;margin-top: 30px; width: 300px}
.show-pic-del {float:right;width: 80px;height: 34px;}
.add-btn-box { margin-left: 20px;margin-top: 30px; width: 300px}
.add-btn-box button {margin: auto; width: 100%; height: 170px;}
......@@ -5,15 +5,15 @@ import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, Ap
@Component({
selector: 'app-form',
templateUrl: './form.component.html',
styleUrls: ['./form.component.css']
styleUrls: ['./form.component.scss']
})
export class FormComponent implements OnInit, OnChanges, OnDestroy {
// 储存数据用
saveKey = "test_0011";
saveKey = "csm_test";
// 储存对象
item;
item = [];
temp_pic = "";
constructor(private appRef: ApplicationRef) {
......@@ -22,7 +22,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit() {
this.item = {};
this.item = [];
// 获取存储的数据
(<any> window).courseware.getData((data) => {
......@@ -30,7 +30,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (data) {
this.item = data;
}
console.log(data);
this.init();
this.refresh();
......@@ -56,19 +56,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存图片数据
* @param e
*/
onImageUploadSuccess(e, key) {
this.item[key] = e.url;
onImageUploadSuccess(e, index, key) {
console.log(index + " -" + key + "-" + e.url);
this.item[index][key] = e.url;
this.save();
}
/**
* 储存音频数据
* @param e
*/
onAudioUploadSuccess(e, key) {
onAudioUploadSuccess(e,index, key) {
this.item[key] = e.url;
this.item[index][key] = e.url;
this.save();
}
......@@ -90,6 +91,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.appRef.tick();
}, 1);
}
deleteItem(index) {
this.item.splice(index, 1);
this.save();
}
addPic() {
this.item.push( {"pic_url": ""} );
this.save();
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -3,16 +3,64 @@ const res = [
// ['bg', "assets/play/bg.jpg"],
['btn_left', "assets/play/btn_left.png"],
['btn_right', "assets/play/btn_right.png"],
['mz', "assets/play/mz.png"],
['ss', "assets/play/ss.png"],
['mb_1', "assets/play/mb/mb_1.png"],
['mb_2', "assets/play/mb/mb_2.png"],
['mb_3', "assets/play/mb/mb_3.png"],
['mb_4', "assets/play/mb/mb_4.png"],
['mb_5', "assets/play/mb/mb_5.png"],
['mb_6', "assets/play/mb/mb_6.png"],
['mb_7', "assets/play/mb/mb_7.png"],
['mb_8', "assets/play/mb/mb_8.png"],
['hpg', "assets/play/mb/hpg.jpg"],
['invalid-name_9', "assets/play/mb/invalid-name_9.png"],
['invalid-name_picm_s', "assets/play/mb/invalid-name_picm_s.png"],
['invalid-name_3', "assets/play/mb/invalid-name_3.png"],
['invalid-name_4', "assets/play/mb/invalid-name_4.png"],
['invalid-name_5', "assets/play/mb/invalid-name_5.png"],
['invalid-name_6', "assets/play/mb/invalid-name_6.png"],
['invalid-name_7', "assets/play/mb/invalid-name_7.png"],
['invalid-name_8', "assets/play/mb/invalid-name_8@2x.png"],
['mz_3', "assets/play/mb/mz_3.png"],
['mz_d', "assets/play/mb/mz_d.png"],
['left', "assets/play/mb/left.png"],
['mb_show', "assets/play/mb/mb_show.png"],
['star', "assets/play/star.png"],
['def_k', "assets/play/3@2x.png"],
// ['text_bg', "assets/play/text_bg.png"],
];
for (let i = 0;i < 55 ; i++){
if (i < 10) {
res.push(['幕布序列_0000'+i,"assets/play/mb/curtain/幕布序列_0000" + i + ".png"]);
} else {
res.push(['幕布序列_000'+i,"assets/play/mb/curtain/幕布序列_000" + i + ".png"]);
}
}
/*for (let i = 2 ; i <= 6 ;i++) {
res.push(['star_'+i,"assets/play/star/" + i + "@2x.png"]);
}*/
for (let i = 2 ; i <= 6 ;i++) {
res.push(['星星'+i,"assets/play/star/星星" + i + ".png"]);
}
for (let i = 1 ; i <= 8 ;i++) {
res.push(['mb_'+i,"assets/play/mb/mb_" + i + ".png"]);
}
const resAudio = [
['click', "assets/play/music/click.mp3"],
['show_a', "assets/play/music/show_a.mp3"],
['alp', "assets/play/music/alp.mp3"],
['ck', "assets/play/music/ck.mp3"],
['mz_1', "assets/play/music/mz_1.mp3"],
['mb_1', "assets/play/music/mb_1.mp3"],
];
export {res, resAudio};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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