Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn04_classify
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
sn04_classify
Commits
29feead2
Commit
29feead2
authored
Sep 14, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
be749228
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
574 additions
and
138 deletions
+574
-138
sn04_classify.fire
assets/sn04_classify/scene/sn04_classify.fire
+420
-64
sn04_classify.ts
assets/sn04_classify/scene/sn04_classify.ts
+15
-5
Game_sn04_classify.ts
assets/sn04_classify/scene/tool/Game_sn04_classify.ts
+5
-1
defaultData_sn04_classify.ts
assets/sn04_classify/script/defaultData_sn04_classify.ts
+65
-61
bg_bar_img.png
assets/sn04_classify/textures/bg_bar_img.png
+0
-0
bg_bar_img.png.meta
assets/sn04_classify/textures/bg_bar_img.png.meta
+36
-0
bg_ice_font_sn04_classify.png
assets/sn04_classify/textures/bg_ice_font_sn04_classify.png
+0
-0
bg_ice_img_sn04_classify.png
assets/sn04_classify/textures/bg_ice_img_sn04_classify.png
+0
-0
form.component.html
form/src/app/form/form.component.html
+29
-3
form.component.ts
form/src/app/form/form.component.ts
+4
-4
No files found.
assets/sn04_classify/scene/sn04_classify.fire
View file @
29feead2
This diff is collapsed.
Click to expand it.
assets/sn04_classify/scene/sn04_classify.ts
View file @
29feead2
...
...
@@ -83,6 +83,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
card_box
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
card_boximg
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
card_img
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
card_txt
:
cc
.
Node
=
null
;
...
...
@@ -163,11 +165,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
ques
=
Game
.
getIns
().
getList
();
ques
.
forEach
((
q
)
=>
{
if
(
q
.
type
==
"
img
"
){
let
itemBox
=
cc
.
instantiate
(
this
.
card_boximg
);
itemBox
.
parent
=
this
.
layout_box
;
pg
.
view
.
setNetImg
(
cc
.
find
(
"
img
"
,
itemBox
),
q
.
image
,
{
w
:
190
,
h
:
140
});
itemBox
.
data
=
q
;
this
.
wordItams
.
push
(
itemBox
);
}
else
{
let
itemBox
=
cc
.
instantiate
(
this
.
card_box
);
itemBox
.
parent
=
this
.
layout_box
;
cc
.
find
(
"
desc
"
,
itemBox
).
getComponent
(
cc
.
Label
).
string
=
q
.
text
;
itemBox
.
data
=
q
;
this
.
wordItams
.
push
(
itemBox
);
}
});
let
qe
=
Game
.
getIns
().
getCardInfo
();
qe
.
forEach
((
op
)
=>
{
...
...
assets/sn04_classify/scene/tool/Game_sn04_classify.ts
View file @
29feead2
...
...
@@ -50,12 +50,16 @@ export class Item {
public
pointsArr
;
public
text
:
string
;
public
isClick
:
boolean
;
public
type
;
public
image
;
constructor
(
data
,
page
)
{
this
.
audio
=
data
.
audio
;
this
.
text
=
data
.
text
;
this
.
bgItem
=
data
.
bgItem
;
this
.
hotZoneItemArr
=
data
.
hotZoneItemArr
;
this
.
page
=
page
;
this
.
type
=
data
.
type
;
this
.
image
=
data
.
image
||
""
;
this
.
optionList
=
data
.
options
.
map
((
o
,
idx
)
=>
{
return
new
Option
(
o
,
this
.
page
);
...
...
@@ -147,7 +151,7 @@ export default class Game {
public
dispelCount
;
public
aniEnter
;
public
startAudio
:
string
;
public
time
:
number
;
public
time
:
number
;
// public questionText: string;
public
init
(
data
)
{
// this.question = { text: data.questionText, audio: data.questionTextAudio };
...
...
assets/sn04_classify/script/defaultData_sn04_classify.ts
View file @
29feead2
...
...
@@ -22,11 +22,12 @@ export const defaultData = {
"
right
"
:
false
}
],
"
type
"
:
"
"
,
"
type
"
:
"
img
"
,
"
text
"
:
"
fruit
"
,
"
questionAudio
"
:
""
,
"
contentMain
"
:
""
,
"
contentArr
"
:
[]
"
contentArr
"
:
[],
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/a190861baa166812cc6c35faef0cfdcf.png
"
},
{
"
options
"
:
[{
"
type
"
:
"
txt
"
,
...
...
@@ -44,7 +45,7 @@ export const defaultData = {
"
right
"
:
false
}
],
"
type
"
:
"
"
,
"
type
"
:
"
txt
"
,
"
text
"
:
"
animal
"
,
"
questionAudio
"
:
""
,
"
contentMain
"
:
""
,
...
...
@@ -66,7 +67,7 @@ export const defaultData = {
"
right
"
:
false
}
],
"
type
"
:
"
"
,
"
type
"
:
"
txt
"
,
"
text
"
:
"
vegetable
"
,
"
questionAudio
"
:
""
,
"
contentMain
"
:
""
,
...
...
@@ -78,5 +79,8 @@ export const defaultData = {
"
audioName
"
:
""
,
"
time
"
:
60
,
"
title
"
:
"
sn04-分类
"
,
"
opleng
"
:
6
"
opleng
"
:
6
,
"
word_count
"
:
"
0
"
,
"
sentence_count
"
:
"
0
"
,
"
zi_count
"
:
"
0
"
}
assets/sn04_classify/textures/bg_bar_img.png
0 → 100644
View file @
29feead2
38 KB
assets/sn04_classify/textures/bg_bar_img.png.meta
0 → 100644
View file @
29feead2
{
"ver": "2.3.5",
"uuid": "5221020d-32e1-4d9e-a581-c1ce24770c86",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 408,
"height": 290,
"platformSettings": {},
"subMetas": {
"bg_bar_img": {
"ver": "1.0.4",
"uuid": "ef68c786-f2d4-4766-9ca2-2aa31d1968fa",
"rawTextureUuid": "5221020d-32e1-4d9e-a581-c1ce24770c86",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 408,
"height": 290,
"rawWidth": 408,
"rawHeight": 290,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/sn04_classify/textures/bg_ice_font_sn04_classify.png
View replaced file @
be749228
View file @
29feead2
52.9 KB
|
W:
|
H:
36.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/sn04_classify/textures/bg_ice_img_sn04_classify.png
View replaced file @
be749228
View file @
29feead2
61.6 KB
|
W:
|
H:
38.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
form/src/app/form/form.component.html
View file @
29feead2
...
...
@@ -95,7 +95,22 @@
<div
class=
"border-solid"
style=
"min-width: 1000px;"
>
<div
class=
"word-type-title"
>
分类{{i+1}}
<div
class=
" option-text"
>
<div
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
选项类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
type
"
(
ngModelChange
)="
ngChange
()"
>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:question
.
type=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
<label
nz-radio
nzValue=
"txt"
>
<span
[
style
]="{
color:question
.
type=
='txt'
?
'#
169BD5
'
:
'#
000
'}"
>
文字
</span>
</label>
</nz-radio-group>
</div>
</div>
<div
*
ngIf=
"question.type=='txt'"
class=
" option-text"
>
<div
class=
"word-input-title"
>
<span
style=
"color:red;margin-left:-15px"
>
*
</span>
<span>
分类文本:
</span>
...
...
@@ -103,7 +118,18 @@
<input
type=
"text"
class=
"input-place-red"
nz-input
[(
ngModel
)]="
question
.
text
"
placeholder=
""
(
blur
)="
save
()"
>
</div>
<div
class=
"option-img"
>
<div
*
ngIf=
"question.type=='img'"
>
<div
class=
"word-input-title"
>
图片:
</div>
<div
style=
"width: 300px;"
>
<app-upload-image-with-preview
[
picUrl
]="
question
.
image
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
image
',
question
)"
>
</app-upload-image-with-preview>
</div>
</div>
</div>
<div
class=
"word-type-option-title"
style=
"margin-top:20px;"
>
选项内容:
</div>
...
...
@@ -129,7 +155,7 @@
选项类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
option
.
type
"
(
ngModelChange
)="
ngChange
(
i
,
j
)"
>
<nz-radio-group
[(
ngModel
)]="
option
.
type
"
(
ngModelChange
)="
ngChange
()"
>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:option
.
type=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
...
...
form/src/app/form/form.component.ts
View file @
29feead2
...
...
@@ -27,7 +27,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
// tipSwitch: 1,//提示功能开关
// startAudio: "",
// audioName: "",
title
:
"
sn04-
分类
"
,
title
:
"
分类
"
,
time
:
60
,
opleng
:
0
,
word_count
:
'
0
'
,
...
...
@@ -102,20 +102,20 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addquestion
()
{
this
.
item
.
questions
.
push
({
options
:
[],
type
:
""
,
type
:
"
txt
"
,
text
:
""
,
questionAudio
:
""
,
// wordAudio: "",
// wordAudioName: "",
// audioName: "",
// questImg
: "",
image
:
""
,
contentMain
:
""
,
contentArr
:
[],
});
this
.
updateOpleng
();
this
.
save
();
}
ngChange
(
i
,
j
)
{
ngChange
()
{
this
.
updateOpleng
();
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