Commit b9237bac authored by Tt's avatar Tt

后台页面修改完成待处理游戏内容

parent 69f816ed
...@@ -62,3 +62,6 @@ Thumbs.db ...@@ -62,3 +62,6 @@ Thumbs.db
#////////////////////////// #//////////////////////////
.vscode/ .vscode/
play/library
play/local
play/temp
\ No newline at end of file
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}} {
\ No newline at end of file "ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
export const defaultData = { export const defaultData = {
"contentObj": "contentObj":
{ {
"picArr": "picArr": {
[ "cat": {
{ "start": "http://staging-teach.cdn.ireadabc.com/c3db5ac421ef039cf540edfa5116c831.mp3", "record": "http://staging-teach.cdn.ireadabc.com/2db9fa7c28a11fdbcecfa6a5b5e62319.mp3", "wait": "http://staging-teach.cdn.ireadabc.com/aaeb274c49f400c26b05583d481aca09.mp3", "finish": "http://staging-teach.cdn.ireadabc.com/f1ce89b2162d82214369265e47d3dda3.mp3"
"title": "apple",
"bgImg": "http://staging-teach.cdn.ireadabc.com/38a22cb51e444e2ef4fad6dede56bc6e.png",
"wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3",
"imgAni": {
"ske": {
"url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json",
"name": "apple_ske.json"
}, },
"tex": { "tryagain": {
"url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json", "one": "http://staging-teach.cdn.ireadabc.com/bdc09d9eb89b73e67357b502ae2158dd.mp3", "two": "http://staging-teach.cdn.ireadabc.com/aaeb274c49f400c26b05583d481aca09.mp3", "three": "http://staging-teach.cdn.ireadabc.com/301ec5c708d22928ccf2162215f429fe.mp3"
"name": "apple_tex.json"
}, },
"png": { "list": [
"url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png", {
"name": "apple_tex.png" "title": "apple", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json", "name": "apple_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json", "name": "apple_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png", "name": "apple_tex.png" } }
} }, {
"title": "ant", "bgImg": "http://staging-teach.cdn.ireadabc.com/0600790c4336c3839d90756aca5da45e.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json", "name": "ant_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json", "name": "ant_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png", "name": "ant_tex.png" } }
}, {
"title": "allaign", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/cf0fd816076652f64cc992c084248a80.json", "name": "alligator_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/5ece588b347d8fbe05eba19a40c985f0.json", "name": "alligator_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a84eff5545eca41f3e997ea8a53ac66f.png", "name": "alligator_tex.png" } }
}]
} }
}, { "title": "ant", "bgImg": "http://staging-teach.cdn.ireadabc.com/38a22cb51e444e2ef4fad6dede56bc6e.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json", "name": "ant_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json", "name": "ant_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png", "name": "ant_tex.png" } } }]
} }
}; }
This diff is collapsed.
...@@ -11,6 +11,68 @@ ...@@ -11,6 +11,68 @@
<div> <div>
<div> <div>
<div>
<div class="border">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<span>猫咪开始引导音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.start"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'start')">
</app-audio-recorder>
</div>
<span>猫咪录音引导音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.record"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'record')">
</app-audio-recorder>
</div>
<span>猫咪待机音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.wait"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'wait')">
</app-audio-recorder>
</div>
<span>猫咪结束音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.finish"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'finish')">
</app-audio-recorder>
</div>
</div>
</div>
</div>
</div>
<div>
<div class="border">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<span>try again 音效一</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.tryagain.one"
(audioUploaded)="onAudioUploadSuccess($event, picArr.tryagain,'one')">
</app-audio-recorder>
</div>
<span>try again 音效二</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.tryagain.two"
(audioUploaded)="onAudioUploadSuccess($event, picArr.tryagain,'two')">
</app-audio-recorder>
</div>
<span>try again 音效三</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.tryagain.three"
(audioUploaded)="onAudioUploadSuccess($event, picArr.tryagain,'three')">
</app-audio-recorder>
</div>
</div>
</div>
</div>
</div>
<!-- http://localhost:4200/?type=form <!-- http://localhost:4200/?type=form
一组游戏 一组游戏
一个图片动画 一个图片动画
...@@ -19,7 +81,7 @@ ...@@ -19,7 +81,7 @@
一个图片背景 一个图片背景
不限制组的数量 --> 不限制组的数量 -->
</div> </div>
<div *ngFor="let item of picArr; let i = index"> <div *ngFor="let item of picArr.list; let i = index">
<div> <div>
<div class="border"> <div class="border">
<div style="width: 100%; align-items:center;"> <div style="width: 100%; align-items:center;">
......
...@@ -7,7 +7,20 @@ import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, A ...@@ -7,7 +7,20 @@ import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, A
}) })
export class FormComponent implements OnInit, OnChanges, OnDestroy { export class FormComponent implements OnInit, OnChanges, OnDestroy {
picArr = []; picArr = {
cat: {
start: "",
record: "",
wait: "",
finish: "",
},
tryagain: {
one: "",
two: "",
three: "",
},
list: [],
};
_item: any; _item: any;
KEY = 'hw_006'; KEY = 'hw_006';
errs = []; errs = [];
...@@ -16,7 +29,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -16,7 +29,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
set item(item) { set item(item) {
this._item = item; this._item = item;
// this.init(); // this.init();
} }
get item() { get item() {
return this._item; return this._item;
...@@ -106,8 +118,19 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -106,8 +118,19 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
getDefaultPicArr() { getDefaultPicArr() {
let arr = [this.classItem()] let cat = {
return arr; start: "",
record: "",
wait: "",
finish: "",
}
let tryagain = {
one: "",
two: "",
three: "",
}
let list = [this.classItem()]
return { cat: cat, tryagain: tryagain, list: list };
} }
initData() { initData() {
...@@ -129,16 +152,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -129,16 +152,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item.wordAudio = e.url; item.wordAudio = e.url;
this.save(); this.save();
} }
onAudioUploadSuccess(e, item, key) {
item[key] = e.url;
this.save();
}
//添加一对 //添加一对
addItem() { addItem() {
//最多4个 //最多4个
let item = this.cardItemData(); let item = this.cardItemData();
this.picArr.push(item) this.picArr.list.push(item)
this.saveItem(); this.saveItem();
} }
deleteItem(i) { deleteItem(i) {
this.picArr.splice(i, 1); this.picArr.list.splice(i, 1);
this.save(); this.save();
} }
...@@ -163,37 +190,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -163,37 +190,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
check() { check() {
if (!this.picArr) return; if (!this.picArr) return;
this.errs.length = 0; this.errs.length = 0;
// let picArr = this.picArr;
// function tia(info) {
// let str = "";
// if (info.radioValue == "A") {
// if (!info.title) str += ",图片";
// } else if (info.radioValue == "B") {
// if (!info.pic_url) str += ",图片";
// } else if (info.radioValue == "C") {
// if (!info.audio_url) str += ",音频";
// } else {
// str += "卡片"
// }
// if (str) str += "未上传"
// return str;
// }
// for (let m = 0; m < picArr.length; m++) {
// for (let n = 0; n < picArr[m].length; n++) {
// if (picArr[m][n].length < 2) {
// this.errs.push(`星-${m + 1} 页-${n + 1} 卡片少于2个`);
// }
// for (let i = 0; i < picArr[m][n].length; i++) {
// let item = picArr[m][n][i];
// let left = item.left;
// let right = item.right;
// let code0 = tia(left);
// let code1 = tia(right);
// if (code0) this.errs.push(`星-${m + 1} 页-${n + 1} 第${i + 1}个卡片 左侧${code0}`);
// if (code1) this.errs.push(`星-${m + 1} 页-${n + 1} 第${i + 1}个卡片 右侧${code1}`);
// }
// }
// }
console.log("this.errs"); console.log("this.errs");
console.log(this.errs); console.log(this.errs);
console.log("-------------------------"); console.log("-------------------------");
......
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