Commit 3b8ffabe authored by 李维's avatar 李维

dev commit

parent 97964bd9
File deleted
......@@ -21,8 +21,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
Type = Type;
withRmBtn = false;
uploadUrl = (<any>window).courseware.uploadUrl();
uploadData = (<any>window).courseware.uploadData();
uploadUrl;
uploadData;
@Input()
needRemove = false;
......@@ -52,9 +52,13 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
recorder: any;
audioBlob: any;
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() {
......
......@@ -29,10 +29,17 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
@Input()
disableUpload = false;
uploadUrl = (<any> window).courseware.uploadUrl();
uploadData = (<any> window).courseware.uploadData();
uploadUrl;
uploadData;
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() {
if (!this.picItem) {
......@@ -40,10 +47,6 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
}
}
handleChange(info: { type: string, file: UploadFile, event: any }): void {
switch (info.type) {
case 'start':
......
......@@ -27,9 +27,6 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
@ViewChild('videoNode')
videoNode: ElementRef;
// @Input()
// extractCoverFunc = null;
......@@ -47,17 +44,24 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
item: any;
// videoItem = null;
uploadUrl = (<any> window).courseware.uploadUrl();
uploadData = (<any> window).courseware.uploadData();
uploadUrl;
uploadData;
constructor(private nzMessageService: NzMessageService,
private sanitization: DomSanitizer
// private cwService: _coursewareService,
// private resService: ResourceService
) {
private sanitization: DomSanitizer
// private cwService: _coursewareService,
// private resService: ResourceService
) {
this.uploading = false;
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() {
// if (!this.videoFile || this.showUploadBtn) {
......
......@@ -633,20 +633,26 @@ export class PlayComponent implements OnInit, OnDestroy {
curtainContral(status, callback?){
let all = ["Curtain-A", "Curtain-B", "Curtain-C", "Curtain-D"]
let _this = this
this.g_cartoon.playAudio("tongshenghuanhu")
this.m_setTimeoutIDs.push(setTimeout(() => {
this.g_cartoon.playAudio("gusheng_kaitou")
}, 2000))
if(status){
all.forEach(item=>{
this.g_cartoon.getCartoonElement(item).open()
_this.g_cartoon.getCartoonElement(item).open()
})
this.m_setTimeoutIDs.push(setTimeout(()=>{
this.m_allDrums.forEach(function(item,index){
_this.g_cartoon.getCartoonElement(item).show(index)
})
}, 4000))
this.m_setTimeoutIDs.push(setTimeout(()=>{
callback && callback()
}, 7000))
}else{
all.forEach(item=>{
this.g_cartoon.getCartoonElement(item).close()
_this.g_cartoon.getCartoonElement(item).close()
})
this.m_setTimeoutIDs.push(setTimeout(()=>{
callback && callback()
......@@ -731,7 +737,6 @@ export class PlayComponent implements OnInit, OnDestroy {
}
initDrum(){
console.log("initDrum")
if(this.g_formData.dataArray.length == 0){
return
}
......@@ -872,12 +877,20 @@ export class PlayComponent implements OnInit, OnDestroy {
element.isOpen = false;
this.subscribeMapDownEvent(element.id, ()=>{
if(!this.m_startGame || element.isOpen){
if(element.isOpen){
if(data.audio_url){
this.g_cartoon.playAudio(data.audio_url)
}
}
this.g_enableMapDown = true;
return
}
this.g_cartoon.playAudio(`gusheng_${index+1}`)
this.setRenderZIndex(element.ref, zIndexMap.drum + 1)
tweenChange(element.ref, {scaleX: element.initScaleX * 1.1, scaleY: element.initScaleY * 1.1}, 0.2, ()=>{
if(data.audio_url){
this.g_cartoon.playAudio(data.audio_url)
}
if(element.content){
element.content.visible = true;
tweenChange(element.content, {scaleX: element.content.initScaleX, scaleY: element.content.initScaleY}, 0.2)
......@@ -888,7 +901,21 @@ export class PlayComponent implements OnInit, OnDestroy {
element.highlight()
})
})
})
})
element.show = (index)=>{
this.m_setTimeoutIDs.push(setTimeout(() => {
this.setRenderZIndex(element.ref, zIndexMap.drum + 1)
tweenChange(element.ref, {scaleX: element.initScaleX * 1.05, scaleY: element.initScaleY * 1.05}, 0.1, ()=>{
this.m_setTimeoutIDs.push(setTimeout(() => {
tweenChange(element.ref, {scaleX: element.initScaleX, scaleY: element.initScaleY}, 0.1, ()=>{
this.setRenderZIndex(element.ref, zIndexMap.drum)
})
}, 200))
})
}, 500 * index))
}
return element
}
......@@ -900,7 +927,6 @@ export class PlayComponent implements OnInit, OnDestroy {
drum = _this.g_cartoon.getCartoonElement(item)
drum.resetContent(_this.m_dataArrayNew[index])
})
console.log(this.g_cartoon.getAllCartoonElement())
}
checkAllOpen(){
......@@ -968,6 +994,36 @@ export class PlayComponent implements OnInit, OnDestroy {
......
......@@ -32,10 +32,8 @@ const localImages = {
'boy_1': 'assets/play/boy_1.png',
'btn_start': 'assets/play/btn_start.png',
'card_bg': 'assets/play/card_bg.png',
'creatJsonProfile': 'assets/play/creatJsonProfile.py',
'dengqiu1': 'assets/play/dengqiu1.png',
'drum_highlight': 'assets/play/drum_highlight.png',
'filename': 'assets/play/filename.txt',
'green': 'assets/play/green.png',
'hand': 'assets/play/hand.png',
'hand2': 'assets/play/hand2.png',
......@@ -52,13 +50,10 @@ const localImages = {
'light4': 'assets/play/light4.png',
'qiaoji1': 'assets/play/qiaoji1.png',
'red': 'assets/play/red.png',
'resizeImg': 'assets/play/resizeImg.py',
'restart': 'assets/play/restart.png',
'reversalImg': 'assets/play/reversalImg.py',
'star': 'assets/play/star.png',
'yellow': 'assets/play/yellow.png',
'light1 (1)': 'assets/play/frame/light1 (1).png',
'light1 (10)': 'assets/play/frame/light1 (10).png',
'light1 (11)': 'assets/play/frame/light1 (11).png',
......
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