Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP05
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
OP05
Commits
1ed900a9
Commit
1ed900a9
authored
Sep 22, 2021
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏后台配置完成
parent
4973c0b8
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
200 deletions
+77
-200
form.component.html
form/src/app/form/form.component.html
+47
-144
form.component.ts
form/src/app/form/form.component.ts
+7
-15
data.js
play/assets/scene/scene/data.js
+23
-41
No files found.
form/src/app/form/form.component.html
View file @
1ed900a9
...
...
@@ -25,160 +25,63 @@
<div
style=
"width: 100%; align-items:center;"
>
<!-- <span style="font-weight: 500; font-size: 27px; color: red; ">选项</span> -->
<div
class=
"item-box"
style=
"width: 50%;height:200px; margin-left: 25%; margin-top: 10%;"
>
<span>
文字
</span>
<input
style=
"width: 80%; margin-bottom: 0.5vw"
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
item
.
title
"
(
blur
)="
saveItem
()"
>
<div>
<app-upload-dragon-bone
style=
"width: 100%"
(
save
)="
onDragonBoneSave
($
event
,
item
)"
>
<app-upload-dragon-bone
style=
"width: 100%"
(
save
)="
onDragonBoneSave
($
event
,
item
)"
[
skeJsonData
]="
item
.
imgAni
.
ske
"
[
texJsonData
]="
item
.
imgAni
.
tex
"
[
texPngData
]="
item
.
imgAni
.
png
"
>
</app-upload-dragon-bone>
</div>
<span>
文字
</span>
<input
style=
"width: 80%; margin-bottom: 0.5vw"
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
item
.
title
"
(
blur
)="
saveItem
()"
>
<span>
图片
</span>
<app-upload-image-with-preview
style=
"width: 100%"
[
picUrl
]="
item
.
bgImg
"
(
imageUploaded
)="
onImageUploadSuccessByItem
($
event
,
item
)"
>
</app-upload-image-with-preview>
</div>
<div
class=
"item-box"
style=
"width: 50%; margin-left: 25%;"
>
<button
style=
"margin-bottom: 10px;"
nz-button
nzType=
"danger"
(
click
)="
deleteItem
(
i
)"
>
<span>
删除
</span>
</button>
</div>
</div>
</div>
</div>
<!--
<div class="box-dbt-0">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">标题:</span>
<input (blur)="saveItem()" [(ngModel)]="biaoti.title" type="text"
style="width: 750px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
<div
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<app-audio-recorder [audioUrl]="biaoti.audio_url
"
(audioUploaded)="onAudioUploadSuccessByItem($event, biaoti
)">
<app-audio-recorder
[
audioUrl
]="
item
.
wordAudio
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
item
)"
>
</app-audio-recorder>
</div>
</div>
</div>
<div class="box-dbt-1">
<div *ngFor="let zhulei of biaoti.child; let b = index">
<div class="box-lbt-0">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">主类:</span>
<input (blur)="saveItem()" [(ngModel)]="zhulei.title" type="text"
style="width: 750px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="zhulei.audio_url"
(audioUploaded)="onAudioUploadSuccessByItem($event, zhulei)">
</app-audio-recorder>
</div>
</div>
</div>
<div class="box-lbt-1">
<div *ngFor="let fenlei of zhulei.child; let c = index">
<div class="box-lbt-0">
<div style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span style="font-weight: 700; font-size: 30px; vertical-align:middle;">分类{{c+1}}:</span>
<input (blur)="saveItem()" [(ngModel)]="fenlei.title" type="text"
style="width: 750px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="fenlei.audio_url"
(audioUploaded)="onAudioUploadSuccessByItem($event, fenlei)">
</app-audio-recorder>
</div>
</div>
</div>
<div class="box-lbt-1">
<div *ngFor="let sonlei of fenlei.child; let d = index">
<div class="box-son-0">
<div>
<div
style="width:100%;vertical-align:middle; padding-top: 10px; padding-bottom: 10px; text-align: left;">
<span
style="font-weight: 700; font-size: 30px; vertical-align:middle;">分类{{c+1}}-子类{{d+1}}:</span>
<button style="margin-left: 30px;" nz-button nzType="danger" (click)="deleteSon(a, b, c,d)">
<div
class=
"item-box"
style=
"width: 50%; margin-left: 25%;
margin-top: 30px;"
>
<button
style=
"margin-bottom: 10px;"
nz-button
nzType=
"danger"
(
click
)="
deleteItem
(
i
)"
>
<span>
删除
</span>
</button>
<input (blur)="saveItem()" [(ngModel)]="sonlei.title" type="text"
style="width: 750px;height:35px;margin-left: 30px; vertical-align:middle;font-size: 30px; border: 1px solid #ccc; border-radius: 10px;" />
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="sonlei.audio_url"
(audioUploaded)="onAudioUploadSuccessByItem($event, sonlei)">
</app-audio-recorder>
</div>
</div>
</div>
</div>
<div class="box-son-1">
<div class="group-item">
<div *ngFor="let it of sonlei.child; let e = index">
<div class="border">
<div style="width: 100%; align-items:center;">
<span style="font-weight: 500; font-size: 27px; color: red; ">选项{{e+1}}</span>
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<span>文字</span>
<input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder=""
[(ngModel)]="it.title" (blur)="saveItem()">
<span>图片</span>
<app-upload-image-with-preview style="width: 100%" [picUrl]="it.pic_url"
(imageUploaded)="onImageUploadSuccessByItem($event, it)">
</app-upload-image-with-preview>
</div>
<div class="item-box" style="width: 50%; margin-left: 25%;">
<button style="margin-bottom: 10px;" nz-button nzType="danger"
(click)="deleteItem(a,b,c,d,e)">
<span>删除</span>
</button>
</div>
</div>
<div>
<!-- http://localhost:4200/?type=form
一组游戏
一个图片动画
一个文字动画
一个文字声音
一个图片背景
不限制组的数量 -->
</div>
</div>
<div
class=
"border"
>
<h3 style="margin-top: 40%; width: 100%; line-height: 40px; text-align: center; color: red;">
每个子类卡片2~4个
</h3>
<button *ngIf="picArr[a].child[b].child[c].child[d].child.length >= 4" disabled nz-button
nzType="primary" (click)="addItem(a,b,c,d)">
<span>增加卡片</span>
</button>
<button *ngIf="picArr[a].child[b].child[c].child[d].child.length < 4" nz-button nzType="primary"
(click)="addItem(a,b,c,d)">
<span>增加卡片</span>
</button>
</div>
</div>
</div>
</div>
<div class="box-lbt-2">
<button
*ngIf="picArr[a].child[b].child[c].child.length >= 4 || picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length >=6"
style="width: 100%; height: 100%; border-radius: 25px; " disabled nz-button nzType="solid"
(click)="addSon(a, b, c)">
<i nz-icon nzType="plus-circle"></i>
<span style="font-size: 20px;">增加子类</span>
</button>
<button
*ngIf="picArr[a].child[b].child[c].child.length < 4 && picArr[a].child[b].child[0].child.length + picArr[a].child[b].child[1].child.length <6"
style="width: 100%; height: 100%; border-radius: 25px; " nz-button nzType="solid"
(click)="addSon(a, b, c)">
<i nz-icon nzType="plus-circle"></i>
<span style="font-size: 20px;">增加子类</span>
<div
style=
"width: 100%; align-items:center;"
>
<div
class=
"item-box"
style=
"width: 50%; margin-left: 25%;
margin-top: 30px;"
>
<button
style=
"margin-bottom: 10px;"
nz-button
nzType=
"default"
(
click
)="
addItem
(
i
)"
>
<span>
增加
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
1ed900a9
...
...
@@ -68,9 +68,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
classItem
()
{
function
AniAssets
()
{
this
.
ske
=
""
;
this
.
tex
=
""
;
this
.
png
=
""
;
this
.
ske
=
{}
;
this
.
tex
=
{}
;
this
.
png
=
{}
;
this
.
setData
=
function
(
obj
)
{
this
.
ske
=
obj
.
ske
;
this
.
tex
=
obj
.
tex
;
...
...
@@ -83,7 +83,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
bgImg
=
""
;
this
.
wordAudio
=
""
;
this
.
imgAni
=
new
AniAssets
();
this
.
wordAni
=
new
AniAssets
();
}
return
new
Item
();
...
...
@@ -103,21 +102,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
cardItemData
()
{
return
{
// cardId: "",
// title: "",
// pic_url: "",
// audio_url: "",
};
return
this
.
classItem
()
}
getDefaultPicArr
()
{
let
arr
=
[
this
.
classItem
()
,
this
.
classItem
(),
this
.
classItem
(),
this
.
classItem
()
]
let
arr
=
[
this
.
classItem
()]
return
arr
;
}
initData
()
{
...
...
@@ -129,12 +121,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
onImageUploadSuccessByItem
(
e
,
item
)
{
item
.
pic_url
=
e
.
url
;
item
.
bgImg
=
e
.
url
;
this
.
save
();
}
onAudioUploadSuccessByItem
(
e
,
item
)
{
item
.
audio_url
=
e
.
url
;
item
.
wordAudio
=
e
.
url
;
this
.
save
();
}
...
...
play/assets/scene/scene/data.js
View file @
1ed900a9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment