Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns16_mole
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
ns16_mole
Commits
eaeb36f1
Commit
eaeb36f1
authored
Oct 12, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单完成
parent
ac5fa9c1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
315 deletions
+60
-315
defaultData.ts
assets/gofishing/script/defaultData.ts
+5
-304
form.component.html
form/src/app/form/form.component.html
+38
-7
form.component.ts
form/src/app/form/form.component.ts
+17
-4
No files found.
assets/gofishing/script/defaultData.ts
View file @
eaeb36f1
This diff is collapsed.
Click to expand it.
form/src/app/form/form.component.html
View file @
eaeb36f1
...
@@ -93,6 +93,34 @@
...
@@ -93,6 +93,34 @@
</div>
</div>
</div>
</div>
<div
style=
"padding: 10px;background-color: #fff;"
>
<!-- 标题区 -->
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1000px;"
>
<div
class=
"word-input-title"
>
<div>
<span>
游戏背景音乐:
</span>
</div>
<div>
<span
style=
"color:rgb(201, 200, 200);margin-left:5px;font-size: 10px;"
>
*可不传,不传既无背景音乐
</span>
</div>
</div>
<div
style=
"display:flex ;margin-top: 10px;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
bgAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
bgAudio
',
item
,'
audioBgName
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.audioBgName}}
</span>
</div>
<div
style=
"margin: 5px"
>
<span
style=
"color: #169BD5;text-decoration: underline;"
type=
"button"
nzDanger
(
click
)="
deleteBgAudio
()"
>
删除背景音
</span>
</div>
</div>
</div>
</div>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1000px;"
>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1000px;"
>
<div
style=
"font-size: 20px;"
>
游戏模式:
</div>
<div
style=
"font-size: 20px;"
>
游戏模式:
</div>
<nz-radio-group
[(
ngModel
)]="
item
.
onlineFlg
"
(
ngModelChange
)="
save
()"
>
<nz-radio-group
[(
ngModel
)]="
item
.
onlineFlg
"
(
ngModelChange
)="
save
()"
>
...
@@ -115,6 +143,14 @@
...
@@ -115,6 +143,14 @@
题目{{i+1}}
题目{{i+1}}
</div>
</div>
<div>
<div
class=
"word-type-option-title"
style=
"margin-top:10px;"
>
线索图片:
</div>
<div
style=
"width: 200px;"
>
<app-upload-image-with-preview
[
picUrl
]="
question
.
questionImg
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
questionImg
',
question
)"
>
</app-upload-image-with-preview>
</div>
</div>
<div>
<div>
<div
class=
"word-type-option-title"
style=
"margin-top:10px;"
>
题目音频:
</div>
<div
class=
"word-type-option-title"
style=
"margin-top:10px;"
>
题目音频:
</div>
...
@@ -130,13 +166,6 @@
...
@@ -130,13 +166,6 @@
</div>
</div>
</div>
</div>
<div
style=
"margin-top:20px"
>
<div
class=
"word-type-option-title"
>
倒计时:
</div>
<input
type=
"number"
nz-input
[(
ngModel
)]="
question
.
duration
"
(
blur
)="
save
()"
>
</div>
<div
class=
"word-type-option-title"
style=
"margin-top:20px;"
>
<div
class=
"word-type-option-title"
style=
"margin-top:20px;"
>
选项内容:
选项内容:
</div>
</div>
...
@@ -220,6 +249,8 @@
...
@@ -220,6 +249,8 @@
</div>
</div>
<div
style=
"margin:0 20px"
>
<div
style=
"margin:0 20px"
>
<button
class=
"btn-red"
nz-button
nzType=
"default"
nzDanger
(
click
)="
removequestion
(
i
)"
>
删除题目
</button>
<button
class=
"btn-red"
nz-button
nzType=
"default"
nzDanger
(
click
)="
removequestion
(
i
)"
>
删除题目
</button>
<button
class=
"btn-blue"
style=
"margin-top: 10px;"
nz-button
nzType=
"default"
nzDanger
(
click
)="
copyquestion
(
i
)"
>
复制题目
</button>
</div>
</div>
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
eaeb36f1
...
@@ -9,17 +9,24 @@ import { MetaFormCreator } from './mataFormCreator';
...
@@ -9,17 +9,24 @@ import { MetaFormCreator } from './mataFormCreator';
})
})
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
// 储存数据用
saveKey
=
"
fishing
"
;
saveKey
=
"
beatmole
"
;
item
=
{
item
=
{
onlineFlg
:
false
,
onlineFlg
:
false
,
title
:
"
钓鱼大作战
"
,
title
:
"
疯狂打地鼠
"
,
questionText
:
"
海洋里有很多鱼,每条鱼身上都藏着魔法信息!亲爱的小玩家,请仔细听游戏指令,找到含有正确魔法信息的鱼,快速完成钓鱼。 在本次的游戏中,你将和其他玩家进行PK,游戏结束,钓鱼数量最多的玩家,将获得胜利。最后根据钓鱼的
数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
questionText
:
"
调皮的地鼠偷走了魔法卡牌,亲爱的小玩家,请仔细听游戏指令,快速找到藏着正确魔法卡牌的地鼠,用锤子敲打它,就能夺回魔法卡牌。在本次的游戏中,你将和其他玩家进行PK,游戏结束,获得魔法卡牌数量最多的玩家,将获得胜利。最后根据获得的魔法卡牌
数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
questionTextAudio
:
"
http://staging-teach.cdn.ireadabc.com/
e422c682ff3304a532937db64573caa4
.mp3
"
,
questionTextAudio
:
"
http://staging-teach.cdn.ireadabc.com/
d08192ced3bd81941d38941bb36e5042_l
.mp3
"
,
questions
:
[],
questions
:
[],
bgAudio
:
""
,
audioBgName
:
""
,
audioName
:
""
audioName
:
""
};
};
deleteBgAudio
()
{
this
.
item
.
bgAudio
=
""
;
this
.
item
.
audioBgName
=
""
;
this
.
save
();
}
isVisible
=
false
;
isVisible
=
false
;
deleteTitle
=
"
是否删除题目
"
;
deleteTitle
=
"
是否删除题目
"
;
deleteCallback
=
function
()
{
};
deleteCallback
=
function
()
{
};
...
@@ -73,6 +80,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -73,6 +80,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addquestion
()
{
addquestion
()
{
this
.
item
.
questions
.
push
({
this
.
item
.
questions
.
push
({
questionImg
:
""
,
questionAudio
:
""
,
questionAudio
:
""
,
duration
:
120
,
duration
:
120
,
options
:
[]
options
:
[]
...
@@ -80,6 +88,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -80,6 +88,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
this
.
save
();
this
.
save
();
}
}
copyquestion
(
i
)
{
let
data
=
this
.
item
.
questions
[
i
];
this
.
item
.
questions
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
data
)));
this
.
save
();
}
ngChange
(
i
,
j
)
{
ngChange
(
i
,
j
)
{
this
.
save
();
this
.
save
();
}
}
...
...
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