Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-10
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
east-10
Commits
8f00e4e1
Commit
8f00e4e1
authored
Jun 24, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ 修改表结构
parent
06b7d607
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1158 additions
and
583 deletions
+1158
-583
east10.ts
form/src/app/form/east10.ts
+5
-0
form.component.css
form/src/app/form/form.component.css
+0
-8
form.component.html
form/src/app/form/form.component.html
+235
-167
form.component.scss
form/src/app/form/form.component.scss
+52
-0
form.component.ts
form/src/app/form/form.component.ts
+84
-47
blink.anim
play/assets/east-10/dragonBones/blink.anim
+49
-0
blink.anim.meta
play/assets/east-10/dragonBones/blink.anim.meta
+5
-0
east-10.fire
play/assets/east-10/scene/east-10.fire
+651
-333
east-10.js
play/assets/east-10/scene/east-10.js
+26
-21
defaultData.js
play/assets/east-10/script/defaultData.js
+2
-3
group.js
play/assets/east-10/script/group.js
+1
-0
kind.js
play/assets/east-10/script/kind.js
+24
-3
util.js
play/assets/east-10/script/util.js
+24
-1
No files found.
form/src/app/form/east10.ts
View file @
8f00e4e1
...
@@ -24,7 +24,11 @@ export class Kind{
...
@@ -24,7 +24,11 @@ export class Kind{
pic_url
:
string
;
pic_url
:
string
;
page_id
:
string
;
page_id
:
string
;
is_disturb
:
boolean
;
is_text
:
boolean
;
//star_id : string;
//star_id : string;
options
:
Array
<
Option
>
=
[];
}
}
export
class
Option
{
export
class
Option
{
...
@@ -33,4 +37,5 @@ export class Option{
...
@@ -33,4 +37,5 @@ export class Option{
pic_url
:
string
;
pic_url
:
string
;
kind_id
:
string
;
kind_id
:
string
;
is_text
:
boolean
;
}
}
form/src/app/form/form.component.css
deleted
100644 → 0
View file @
06b7d607
@import
'../style/common_mixin.css'
;
.model-content
{
width
:
100%
;
height
:
100%
;
}
form/src/app/form/form.component.html
View file @
8f00e4e1
This diff is collapsed.
Click to expand it.
form/src/app/form/form.component.scss
0 → 100644
View file @
8f00e4e1
@import
"../style/common_mixin"
;
.model-content
{
.card-config
{
width
:
100%
;
height
:
100%
;
margin-left
:
10px
;
display
:
flex
;
flex-wrap
:
wrap
;
.card-item
{
flex
:
1
;
.border
{
border-radius
:
20px
;
border-style
:
dashed
;
padding
:
20px
;
width
:
800px
;
}
.card-item-content
{
.title
{
font-size
:
24px
;
width
:
100%
;
text-align
:
center
;
}
.section
{
border-top
:
1px
solid
;
padding
:
10px
0
;
.section-title
{
font-size
:
24px
;
width
:
100%
;
}
.section-content
{
display
:
flex
;
margin
:
5px
0
10px
0
;
}
}
.pic-sound-box
{
width
:
50%
;
display
:
flex
;
flex-direction
:
column
;
}
.add-btn-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
20vw
;
padding
:
10px
;
padding-top
:
5vw
;
}
}
}
}
}
form/src/app/form/form.component.ts
View file @
8f00e4e1
import
{
Component
,
EventEmitter
,
Input
,
OnDestroy
,
OnChanges
,
OnInit
,
Output
,
ApplicationRef
,
ChangeDetectorRef
}
from
'
@angular/core
'
;
import
{
Component
,
EventEmitter
,
Input
,
OnDestroy
,
OnChanges
,
OnInit
,
Output
,
ApplicationRef
,
ChangeDetectorRef
}
from
'
@angular/core
'
;
import
{
Star
,
Page
,
Kind
,
Option
,
East10
}
from
'
./east10
'
;
import
{
Star
,
Page
,
Kind
,
Option
,
East10
}
from
'
./east10
'
;
import
{
ThrowStmt
}
from
'
@angular/compiler
'
;
import
{
JsonPipe
}
from
'
@angular/common
'
;
import
{
JsonPipe
}
from
'
@angular/common
'
;
@
Component
({
@
Component
({
selector
:
'
app-form
'
,
selector
:
'
app-form
'
,
templateUrl
:
'
./form.component.html
'
,
templateUrl
:
'
./form.component.html
'
,
styleUrls
:
[
'
./form.component.css
'
]
styleUrls
:
[
'
./form.component.
s
css
'
]
})
})
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
// 储存数据用
saveKey
=
"
EAST-10
"
;
saveKey
=
"
EAST-10
"
;
// 储存对象
// 储存对象
item
;
item
;
@
Output
()
update
=
new
EventEmitter
();
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
//this.item = new Course();
//this.item = new Course();
...
@@ -32,26 +34,26 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -32,26 +34,26 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if
(
data
)
{
if
(
data
)
{
this
.
item
=
data
;
this
.
item
=
data
;
this
.
preData
();
}
}
console
.
log
(
data
);
//
console.log(data);
this
.
init
();
this
.
init
();
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
this
.
refresh
();
},
this
.
saveKey
);
},
this
.
saveKey
);
console
.
log
(
this
.
item
);
//
console.log(this.item);
}
}
ngOnChanges
()
{
ngOnChanges
()
{
}
}
ngOnDestroy
()
{
ngOnDestroy
()
{
}
}
init
()
{
init
()
{
if
(
!
this
.
item
){
if
(
!
this
.
item
){
this
.
item
=
new
East10
();
this
.
item
=
new
East10
();
...
@@ -59,44 +61,79 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -59,44 +61,79 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
/**
* 储存图片数据
initData
()
{
* @param e
}
*/
onImageUploadSuccess
(
e
,
item
,
key
)
{
onImageUploadSuccess
(
e
,
item
,
key
)
{
item
[
key
]
=
e
.
url
;
item
[
key
]
=
e
.
url
;
this
.
save
();
this
.
save
();
}
}
onAudioUploadSuccess
(
e
,
item
,
key
)
{
item
[
key
]
=
e
.
url
;
this
.
save
();
}
/**
* 储存音频数据
* @param e
*/
onAudioUploadSuccess
(
e
,
item
,
key
)
{
item
[
key
]
=
e
.
url
;
this
.
save
();
}
radioClick
(
it
,
radioValue
)
{
it
.
radioValue
=
radioValue
;
this
.
saveItem
();
}
clickCheckBox
()
{
this
.
saveItem
();
}
saveItem
()
{
this
.
save
();
}
/**
* 储存数据
*/
save
()
{
save
()
{
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
this
.
refresh
();
this
.
refresh
();
console
.
log
(
'
this.item =
'
+
JSON
.
stringify
(
this
.
item
));
console
.
log
(
'
this.item =
'
+
JSON
.
stringify
(
this
.
item
));
}
}
/**
* 刷新 渲染页面
*/
refresh
()
{
refresh
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
this
.
appRef
.
tick
();
},
1
);
},
1
);
}
}
preData
(){
let
options
=
this
.
item
.
options
;
if
(
!
options
||
options
.
length
<=
0
)
return
;
for
(
let
i
=
0
;
i
<
options
.
length
;
i
++
){
if
(
!
options
[
i
].
is_text
!=
true
&&
!
options
[
i
].
is_text
!=
false
){
options
[
i
].
is_text
=
true
;
}
for
(
let
j
=
0
;
j
<
this
.
item
.
kinds
;
j
++
){
if
(
!
this
.
item
.
kinds
[
j
].
is_text
!=
true
&&
!
this
.
item
.
kinds
[
j
].
is_text
!=
false
){
this
.
item
.
kinds
[
j
].
is_text
=
true
;
}
if
(
options
[
i
].
kind_id
==
this
.
item
.
kinds
[
j
].
id
){
if
(
!
this
.
item
.
kinds
[
j
].
options
){
this
.
item
.
kinds
[
j
].
options
=
new
Array
<
Option
>
();
}
this
.
item
.
kinds
[
j
].
options
.
push
(
options
[
i
]);
break
;
}
}
}
this
.
item
.
options
=
null
;
}
randomChar
()
{
randomChar
()
{
var
x
=
"
0123456789qwertyuioplkjhgfdsazxcvbnm
"
;
var
x
=
"
0123456789qwertyuioplkjhgfdsazxcvbnm
"
;
var
tmp
=
""
;
var
tmp
=
""
;
...
@@ -138,6 +175,9 @@ onAudioUploadSuccess(e, item, key) {
...
@@ -138,6 +175,9 @@ onAudioUploadSuccess(e, item, key) {
addKind
(){
addKind
(){
let
kind
=
new
Kind
();
let
kind
=
new
Kind
();
kind
.
options
=
new
Array
<
Option
>
();
kind
.
is_disturb
=
false
;
kind
.
is_text
=
true
;
kind
.
id
=
this
.
randomChar
();
kind
.
id
=
this
.
randomChar
();
this
.
item
.
kinds
.
push
(
kind
);
this
.
item
.
kinds
.
push
(
kind
);
this
.
save
();
this
.
save
();
...
@@ -150,15 +190,26 @@ onAudioUploadSuccess(e, item, key) {
...
@@ -150,15 +190,26 @@ onAudioUploadSuccess(e, item, key) {
}
}
}
}
addOption
(){
addOption
(
kind_id
){
if
(
kind_id
<
0
||
kind_id
>=
this
.
item
.
kinds
.
length
){
return
;
}
let
option
=
new
Option
();
let
option
=
new
Option
();
this
.
item
.
options
.
push
(
option
);
option
.
is_text
=
true
;
if
(
!
this
.
item
.
kinds
[
kind_id
].
options
)
this
.
item
.
kinds
[
kind_id
].
options
=
new
Array
<
Option
>
();
this
.
item
.
kinds
[
kind_id
].
options
.
push
(
option
);
this
.
save
();
this
.
save
();
}
}
delOption
(
idx
){
delOption
(
kind_id
,
idx
){
if
(
idx
!==
-
1
){
if
(
kind_id
<
0
||
kind_id
>=
this
.
item
.
kinds
.
length
)
this
.
item
.
options
.
splice
(
idx
,
1
);
return
;
if
(
idx
!==
-
1
){
this
.
item
.
kinds
[
kind_id
].
options
.
splice
(
idx
,
1
);
this
.
save
();
this
.
save
();
}
}
}
}
...
@@ -178,19 +229,5 @@ onAudioUploadSuccess(e, item, key) {
...
@@ -178,19 +229,5 @@ onAudioUploadSuccess(e, item, key) {
this
.
save
();
this
.
save
();
}
}
// getIndexInArray(ar, id){
// for(let i = 0; i < ar.length; i++){
// if (ar[i].id == id){
// return i;
// }
// }
// return -1;
// }
// getStarPage(kind){
// let star_id = -1, page_id = this.getIndexInArray(this.item.pages, kind.page_id);
// if (page_id >= 0)
// star_id = this.getIndexInArray(this.item.stars, this.item.pages[page_id].star_id);
// }
}
}
play/assets/east-10/dragonBones/blink.anim
0 → 100644
View file @
8f00e4e1
{
"__type__": "cc.AnimationClip",
"_name": "blink",
"_objFlags": 0,
"_native": "",
"_duration": 0.35,
"sample": 60,
"speed": 1,
"wrapMode": 1,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "30bb9bba-6500-4164-a63c-0ca87c923727"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "6602e0ef-5cd0-4ad3-ba55-c8da54251a0b"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "04b220cf-1b02-4dcc-877a-ce7da5ac4bc0"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "f5fce9c2-6845-4c54-b49b-41a64abea47f"
}
},
{
"frame": 0.3333333333333333,
"value": {
"__uuid__": "30bb9bba-6500-4164-a63c-0ca87c923727"
}
}
]
}
}
},
"events": []
}
\ No newline at end of file
play/assets/east-10/dragonBones/blink.anim.meta
0 → 100644
View file @
8f00e4e1
{
"ver": "2.1.0",
"uuid": "539e8c8e-333b-41fd-b662-796c0bdc8fd0",
"subMetas": {}
}
\ No newline at end of file
play/assets/east-10/scene/east-10.fire
View file @
8f00e4e1
This diff is collapsed.
Click to expand it.
play/assets/east-10/scene/east-10.js
View file @
8f00e4e1
...
@@ -81,16 +81,21 @@ cc.Class({
...
@@ -81,16 +81,21 @@ cc.Class({
for
(
let
k
=
0
;
k
<
kinds
.
length
;
k
++
){
for
(
let
k
=
0
;
k
<
kinds
.
length
;
k
++
){
let
_kind
=
{};
let
_kind
=
{};
data
[
i
][
j
][
k
]
=
_kind
;
data
[
i
][
j
][
k
]
=
_kind
;
_kind
.
text
=
kinds
[
k
].
word
||
""
;
_kind
.
text
=
kinds
[
i
].
is_text
==
false
?
""
:
kinds
[
k
].
word
||
""
;
_kind
.
pic
=
kinds
[
k
].
pic_url
||
""
;
_kind
.
pic
=
kinds
[
i
].
is_text
==
false
?
kinds
[
k
].
pic_url
||
""
:
""
;
_kind
.
audio
=
kinds
[
k
].
audio_url
||
""
;
_kind
.
audio
=
kinds
[
k
].
audio_url
||
""
;
if
(
kinds
[
i
].
is_disturb
){
_kind
.
text
=
""
;
_kind
.
pic
=
""
;
_kind
.
audio
=
""
;
}
_kind
.
options
=
[];
_kind
.
options
=
[];
let
options
=
this
.
getArrayByID
(
res
.
options
,
kinds
[
k
].
id
,
'
kind_id
'
);
let
options
=
kinds
[
k
].
options
//
this.getArrayByID(res.options, kinds[k].id, 'kind_id');
for
(
let
m
=
0
;
m
<
options
.
length
;
m
++
){
for
(
let
m
=
0
;
m
<
options
.
length
;
m
++
){
let
_option
=
{};
let
_option
=
{};
_kind
.
options
[
m
]
=
_option
;
_kind
.
options
[
m
]
=
_option
;
_option
.
text
=
options
[
m
].
word
||
""
;
_option
.
text
=
options
[
m
].
is_text
==
false
?
""
:
options
[
m
].
word
||
""
;
_option
.
pic
=
options
[
m
].
pic_url
||
""
;
_option
.
pic
=
options
[
m
].
is_text
==
false
?
options
[
m
].
pic_url
||
""
:
""
;
_option
.
audio
=
options
[
m
].
audio_url
||
""
;
_option
.
audio
=
options
[
m
].
audio_url
||
""
;
}
}
}
}
...
@@ -241,12 +246,12 @@ cc.Class({
...
@@ -241,12 +246,12 @@ cc.Class({
let
option
=
option_node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
let
option
=
option_node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
if
(
this
.
_touched
!=
true
&&
cc
.
rect
(
option_node
.
getBoundingBoxToWorld
()).
contains
(
event
.
touch
.
_point
)){
if
(
this
.
_touched
!=
true
&&
cc
.
rect
(
option_node
.
getBoundingBoxToWorld
()).
contains
(
event
.
touch
.
_point
)){
this
.
playAudioByName
(
'
tap
'
);
this
.
playAudioByName
(
'
tap
'
);
cc
.
tween
(
this
)
//
cc.tween(this)
.
delay
(
0.2
)
//
.delay(0.2)
.
call
(()
=>
{
//
.call(()=>{
option
.
playAudio
();
option
.
playAudio
();
})
//
})
.
start
();
//
.start();
//this._moved = false;
//this._moved = false;
this
.
_touched
=
true
;
this
.
_touched
=
true
;
selected
.
copyValues
(
option
);
selected
.
copyValues
(
option
);
...
@@ -302,18 +307,16 @@ cc.Class({
...
@@ -302,18 +307,16 @@ cc.Class({
let
ot
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
let
ot
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
ot
.
copyValues
(
selected
);
ot
.
copyValues
(
selected
);
ot
.
selected
(
true
);
ot
.
selected
(
true
);
//node.width *= 0.4;
//node.height *= 0.4;
kind
.
showCorrect
(
node
,
()
=>
{
kind
.
showCorrect
(
node
,
()
=>
{
if
(
this
.
tryFinish
())
if
(
this
.
tryFinish
())
this
.
pageFinish
();
this
.
pageFinish
();
});
});
cc
.
tween
(
this
)
//
cc.tween(this)
.
delay
(
0.2
)
//
.delay(0.2)
.
call
(()
=>
{
//
.call(()=>{
ot
.
playAudio
();
ot
.
playAudio
();
})
//
})
.
start
();
//
.start();
selected
.
target
.
removeFromParent
();
selected
.
target
.
removeFromParent
();
selected
.
target
=
null
;
selected
.
target
=
null
;
...
@@ -364,8 +367,10 @@ cc.Class({
...
@@ -364,8 +367,10 @@ cc.Class({
upForeground
(
cb
){
upForeground
(
cb
){
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg_top
=
cc
.
find
(
'
Canvas/fg_top
'
).
y
;
let
fg_top
=
-
this
.
_frameSize
.
height
/
2
-
150
;
let
fg_bottom
=
fg_top
-
260
;
let
fg_bottom
=
fg_top
-
160
*
this
.
_frameSize
.
width
/
1280
;
console
.
log
(
'
bottom =
'
+
fg_bottom
);
fg
.
y
=
fg_bottom
;
fg
.
y
=
fg_bottom
;
this
.
playAudioByName
(
'
up
'
);
this
.
playAudioByName
(
'
up
'
);
cc
.
tween
(
fg
)
cc
.
tween
(
fg
)
...
@@ -379,8 +384,8 @@ cc.Class({
...
@@ -379,8 +384,8 @@ cc.Class({
downForeground
(
cb
){
downForeground
(
cb
){
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg_top
=
cc
.
find
(
'
Canvas/fg_top
'
).
y
;
let
fg_top
=
-
this
.
_frameSize
.
height
/
2
-
150
;
let
fg_bottom
=
fg_top
-
26
0
;
let
fg_bottom
=
fg_top
-
160
*
this
.
_frameSize
.
width
/
128
0
;
fg
.
y
=
fg_top
;
fg
.
y
=
fg_top
;
cc
.
tween
(
fg
)
cc
.
tween
(
fg
)
.
to
(
0.3
,
{
y
:
fg_bottom
})
.
to
(
0.3
,
{
y
:
fg_bottom
})
...
...
play/assets/east-10/script/defaultData.js
View file @
8f00e4e1
export
const
defaultData
=
{
export
const
defaultData
=
"
stars
"
:[{
"
id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
1623992233278l9trhw
"
}],
"
pages
"
:[{
"
id
"
:
"
1623992235665ryt80q
"
,
"
star_id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
1623992246832rwwxwc
"
,
"
star_id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
162399224768148xblq
"
,
"
star_id
"
:
"
1623992233278l9trhw
"
},{
"
id
"
:
"
1624169541137z3l0l8
"
,
"
star_id
"
:
"
1623992233278l9trhw
"
}],
"
kinds
"
:[{
"
id
"
:
"
1623981972242lokdmj
"
,
"
word
"
:
"
aaa
"
,
"
page_id
"
:
"
1623992235665ryt80q
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9fe5243645c4d48f5ccddcac67e1808e.jpeg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3
"
},{
"
id
"
:
"
1623988481981dyiqg7
"
,
"
word
"
:
"
bbb
"
,
"
page_id
"
:
"
1623992235665ryt80q
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/7c1537fcf875cc782235ddebfa0d5d72.jpg
"
},{
"
id
"
:
"
162417027477500qwmy
"
,
"
word
"
:
""
,
"
page_id
"
:
"
1623992235665ryt80q
"
},{
"
id
"
:
"
1624170275274l1s0xq
"
,
"
word
"
:
"
ddd
"
,
"
page_id
"
:
"
1623992246832rwwxwc
"
},{
"
id
"
:
"
16241702766879192s4
"
,
"
word
"
:
"
eee
"
,
"
page_id
"
:
"
1623992246832rwwxwc
"
},{
"
id
"
:
"
1624170277020xpdwcp
"
,
"
word
"
:
""
,
"
page_id
"
:
"
1623992246832rwwxwc
"
},{
"
id
"
:
"
1624227738503to7kx2
"
,
"
page_id
"
:
"
162399224768148xblq
"
,
"
word
"
:
"
fff
"
},{
"
id
"
:
"
1624227738776v99r1v
"
,
"
page_id
"
:
"
162399224768148xblq
"
,
"
word
"
:
"
ggg
"
},{
"
id
"
:
"
1624227740414bof8zt
"
,
"
page_id
"
:
"
162399224768148xblq
"
,
"
word
"
:
""
},{
"
id
"
:
"
1624227741225xhhzbp
"
,
"
page_id
"
:
"
1624169541137z3l0l8
"
,
"
word
"
:
"
kkk
"
},{
"
id
"
:
"
162422774153338vuvx
"
,
"
page_id
"
:
"
1624169541137z3l0l8
"
,
"
word
"
:
"
lll
"
},{
"
id
"
:
"
1624227741787cdi54f
"
,
"
page_id
"
:
"
1624169541137z3l0l8
"
,
"
word
"
:
""
}],
"
options
"
:[{
"
kind_id
"
:
"
1623981972242lokdmj
"
,
"
word
"
:
"
a1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9475b713f231acb63a2f1defa1c358d8.jpeg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3
"
},{
"
kind_id
"
:
"
1623981972242lokdmj
"
,
"
word
"
:
"
a2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/7e6859583e7cce173d500021d164be4a.jpg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3
"
},{
"
kind_id
"
:
"
1623981972242lokdmj
"
,
"
word
"
:
"
a3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e0e3c605b5c4136569c7468352fcd10d.jpg
"
},{
"
kind_id
"
:
"
1623988481981dyiqg7
"
,
"
word
"
:
"
b1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6c04a4211a3664f64dcda68f027f1f40.jpeg
"
},{
"
kind_id
"
:
"
1623988481981dyiqg7
"
,
"
word
"
:
"
b2
"
},{
"
kind_id
"
:
"
1623988481981dyiqg7
"
,
"
word
"
:
"
b3
"
},{
"
kind_id
"
:
"
162417027477500qwmy
"
,
"
word
"
:
"
fff
"
},{
"
kind_id
"
:
"
162417027477500qwmy
"
,
"
word
"
:
"
rrr
"
},{
"
kind_id
"
:
"
1624170275274l1s0xq
"
,
"
word
"
:
"
d1
"
},{
"
kind_id
"
:
"
1624170275274l1s0xq
"
,
"
word
"
:
"
d2
"
},{
"
kind_id
"
:
"
1624170275274l1s0xq
"
,
"
word
"
:
"
d3
"
},{
"
kind_id
"
:
"
16241702766879192s4
"
,
"
word
"
:
"
e1
"
},{
"
kind_id
"
:
"
16241702766879192s4
"
,
"
word
"
:
"
e2
"
},{
"
kind_id
"
:
"
16241702766879192s4
"
,
"
word
"
:
"
e3
"
},{
"
kind_id
"
:
"
1624170277020xpdwcp
"
,
"
word
"
:
"
we
"
},{
"
kind_id
"
:
"
1624170277020xpdwcp
"
,
"
word
"
:
"
eewr
"
},{
"
kind_id
"
:
"
1624227738503to7kx2
"
,
"
word
"
:
"
f1
"
},{
"
kind_id
"
:
"
1624227738503to7kx2
"
,
"
word
"
:
"
f2
"
},{
"
kind_id
"
:
"
1624227738503to7kx2
"
,
"
word
"
:
"
f3
"
},{
"
kind_id
"
:
"
1624227738776v99r1v
"
,
"
word
"
:
"
g1
"
},{
"
kind_id
"
:
"
1624227738776v99r1v
"
,
"
word
"
:
"
g2
"
},{
"
kind_id
"
:
"
1624227738776v99r1v
"
,
"
word
"
:
"
g3
"
},{
"
kind_id
"
:
"
1624227740414bof8zt
"
,
"
word
"
:
"
3434
"
},{
"
kind_id
"
:
"
1624227740414bof8zt
"
,
"
word
"
:
"
444
"
},{
"
kind_id
"
:
"
1624227741225xhhzbp
"
,
"
word
"
:
"
k1
"
},{
"
kind_id
"
:
"
1624227741225xhhzbp
"
,
"
word
"
:
"
k2
"
},{
"
kind_id
"
:
"
162422774153338vuvx
"
,
"
word
"
:
"
l1
"
},{
"
kind_id
"
:
"
162422774153338vuvx
"
,
"
word
"
:
"
l2
"
},{
"
kind_id
"
:
"
1624227741787cdi54f
"
,
"
word
"
:
"
erg3
"
},{
"
kind_id
"
:
"
1624227741787cdi54f
"
,
"
word
"
:
"
g34t
"
}]
{
"
stars
"
:[{
"
id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
1623992233278l9trhw
"
}],
"
pages
"
:[{
"
id
"
:
"
1623992235665ryt80q
"
,
"
star_id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
1623992246832rwwxwc
"
,
"
star_id
"
:
"
16239922308635wok5p
"
},{
"
id
"
:
"
1624506193914ksvus9
"
,
"
star_id
"
:
"
1623992233278l9trhw
"
}],
"
kinds
"
:[{
"
id
"
:
"
1623981972242lokdmj
"
,
"
word
"
:
"
aaa
"
,
"
page_id
"
:
"
1623992235665ryt80q
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9fe5243645c4d48f5ccddcac67e1808e.jpeg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3
"
,
"
is_text
"
:
false
,
"
options
"
:[{
"
is_text
"
:
false
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9475b713f231acb63a2f1defa1c358d8.jpeg
"
},{
"
is_text
"
:
false
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6c04a4211a3664f64dcda68f027f1f40.jpeg
"
}]},{
"
id
"
:
"
1623988481981dyiqg7
"
,
"
word
"
:
"
bbb
"
,
"
page_id
"
:
"
1623992235665ryt80q
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/7c1537fcf875cc782235ddebfa0d5d72.jpg
"
,
"
is_text
"
:
false
,
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
b1
"
},{
"
is_text
"
:
false
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/bc67a6550d9b566aa61eafc3634f752e.jpg
"
}]},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
rrr
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
tewre
"
}],
"
is_disturb
"
:
true
,
"
is_text
"
:
true
,
"
id
"
:
"
16245126704047qu7b3
"
,
"
page_id
"
:
"
1623992235665ryt80q
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
d1dddddddddddddd
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
d2
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
d3
"
}],
"
is_disturb
"
:
false
,
"
is_text
"
:
true
,
"
id
"
:
"
1624512683708wxep60
"
,
"
page_id
"
:
"
1623992246832rwwxwc
"
,
"
word
"
:
""
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
e1
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
e2
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
e3
"
}],
"
is_disturb
"
:
false
,
"
is_text
"
:
true
,
"
id
"
:
"
1624512725657lqqj3r
"
,
"
page_id
"
:
"
1623992246832rwwxwc
"
,
"
word
"
:
"
eeeeeeeeeeeeeeeeeeeeeeeeeeee
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
4rt3
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
435634
"
}],
"
is_disturb
"
:
true
,
"
is_text
"
:
true
,
"
id
"
:
"
1624512754647ip8vce
"
,
"
page_id
"
:
"
1623992246832rwwxwc
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
r1
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
r2
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
r3
"
}],
"
is_disturb
"
:
false
,
"
is_text
"
:
true
,
"
id
"
:
"
16245127738549dpkjr
"
,
"
page_id
"
:
"
1624506193914ksvus9
"
,
"
word
"
:
"
rrrrrrrrrrrrrrrr
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
y1
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
y2
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
y3
"
}],
"
is_disturb
"
:
false
,
"
is_text
"
:
true
,
"
id
"
:
"
1624512800217fvnv04
"
,
"
page_id
"
:
"
1624506193914ksvus9
"
,
"
word
"
:
"
yyyyyyyyyy
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
434
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
43534
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
43543
"
}],
"
is_disturb
"
:
false
,
"
is_text
"
:
true
,
"
id
"
:
"
1624512822668sab0sk
"
,
"
page_id
"
:
"
1624506193914ksvus9
"
,
"
word
"
:
"
weewrwe
"
},{
"
options
"
:[{
"
is_text
"
:
true
,
"
word
"
:
"
eeee
"
},{
"
is_text
"
:
true
,
"
word
"
:
"
ert34t
"
}],
"
is_disturb
"
:
true
,
"
is_text
"
:
true
,
"
id
"
:
"
162451695910372kqqy
"
,
"
page_id
"
:
"
1624506193914ksvus9
"
,
"
word
"
:
"
werwrwe
"
}],
"
options
"
:
null
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3
"
}
}
export
const
defaultData1
=
{
export
const
defaultData1
=
{
...
...
play/assets/east-10/script/group.js
View file @
8f00e4e1
...
@@ -55,6 +55,7 @@ cc.Class({
...
@@ -55,6 +55,7 @@ cc.Class({
this
.
layout
.
spacingX
=
10
;
this
.
layout
.
spacingX
=
10
;
width
=
(
1280
-
num
*
10
-
10
)
/
num
;
width
=
(
1280
-
num
*
10
-
10
)
/
num
;
w_scale
=
width
/
273
;
w_scale
=
width
/
273
;
w_scale
*=
0.8
;
}
}
this
.
layout
.
paddingLeft
*=
wr
;
this
.
layout
.
paddingLeft
*=
wr
;
...
...
play/assets/east-10/script/kind.js
View file @
8f00e4e1
import
{
playDragonBoneAnimation
,
getSpriteFrimeByUrl
,
playAudioByUrl
,
setSpriteWH
}
from
"
../script/util
"
;
import
{
playDragonBoneAnimation
,
getSpriteFrimeByUrl
,
playAudioByUrl
,
setSpriteWH
,
playAudioByUrlSync
}
from
"
../script/util
"
;
cc
.
Class
({
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
...
@@ -32,12 +32,22 @@ cc.Class({
...
@@ -32,12 +32,22 @@ cc.Class({
},
},
onLoad
(){
onLoad
(){
this
.
btn_sound
.
node
.
on
(
'
click
'
,
this
.
playAudio
.
bind
(
this
));
this
.
btn_sound
.
node
.
on
(
'
click
'
,
async
()
=>
{
await
this
.
playAudioSync
();
});
this
.
tips_text_bg
.
on
(
'
click
'
,
this
.
playAudio
.
bind
(
this
));
this
.
tips_text_bg
.
on
(
'
click
'
,
this
.
playAudio
.
bind
(
this
));
this
.
tips_pic_bg
.
on
(
'
click
'
,
this
.
playAudio
.
bind
(
this
));
this
.
tips_pic_bg
.
on
(
'
click
'
,
this
.
playAudio
.
bind
(
this
));
this
.
initData
();
this
.
initData
();
},
},
async
playAudioSync
(){
if
(
this
.
_audio
&&
this
.
_audio
!=
""
){
this
.
speakerBlink
();
await
playAudioByUrlSync
(
this
.
_audio
);
this
.
speakerStopBlink
();
}
},
playAudio
(){
playAudio
(){
if
(
this
.
_audio
&&
this
.
_audio
!=
""
){
if
(
this
.
_audio
&&
this
.
_audio
!=
""
){
playAudioByUrl
(
this
.
_audio
);
playAudioByUrl
(
this
.
_audio
);
...
@@ -148,7 +158,18 @@ cc.Class({
...
@@ -148,7 +158,18 @@ cc.Class({
item
.
scale
*=
scale
;
item
.
scale
*=
scale
;
}
}
}
}
,
speakerBlink
()
{
const
btnSpeaker
=
this
.
btn_sound
.
node
;
btnSpeaker
.
getComponent
(
cc
.
Animation
).
play
();
},
speakerStopBlink
()
{
const
btnSpeaker
=
this
.
btn_sound
.
node
;
const
btnSpeaker3
=
btnSpeaker
.
getChildByName
(
'
btn_laba
'
);
btnSpeaker
.
getComponent
(
cc
.
Animation
).
stop
();
btnSpeaker
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
btnSpeaker3
.
getComponent
(
cc
.
Sprite
).
spriteFrame
;
},
});
});
\ No newline at end of file
play/assets/east-10/script/util.js
View file @
8f00e4e1
...
@@ -397,4 +397,27 @@ export function onHomeworkFinish() {
...
@@ -397,4 +397,27 @@ export function onHomeworkFinish() {
}
else
{
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
console
.
log
(
'
onHomeworkFinish
'
);
}
}
}
}
\ No newline at end of file
export
function
playAudioByUrlSync
(
audio_url
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
if
(
!
audio_url
)
{
resolve
();
return
;
}
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
if
(
err
)
{
reject
(
err
);
return
;
}
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
resolve
();
});
});
}
catch
(
e
)
{
reject
(
e
);
}
});
}
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