Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aks_cocos_001
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
aks_cocos_001
Commits
0bcbd4be
Commit
0bcbd4be
authored
Mar 15, 2021
by
Li MingZhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 瓶子异常
parent
652562c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
scene.js
play/assets/aks_cocos_001/script/scene.js
+16
-7
.DS_Store
publish/.DS_Store
+0
-0
.DS_Store
publish/publish/.DS_Store
+0
-0
No files found.
play/assets/aks_cocos_001/script/scene.js
View file @
0bcbd4be
...
@@ -85,12 +85,14 @@ cc.Class({
...
@@ -85,12 +85,14 @@ cc.Class({
if
(
aspect
)
{
if
(
aspect
)
{
console
.
log
(
'
aspect :
'
,
aspect
);
console
.
log
(
'
aspect :
'
,
aspect
);
this
.
serverAllUser
=
aspect
.
all_user
;
this
.
serverAllUser
=
aspect
.
all_user
;
this
.
initHistoryData
(
aspect
.
user_aspect
);
}
}
this
.
initHistoryData
(
aspect
.
user_aspect
);
console
.
log
(
'
data:
'
,
data
);
console
.
log
(
'
data:
'
,
data
);
this
.
data
=
data
||
this
.
getDefaultData
();
this
.
data
=
data
||
this
.
getDefaultData
();
this
.
preloadItem
()
this
.
preloadItem
()
})
})
},
},
...
@@ -196,6 +198,7 @@ cc.Class({
...
@@ -196,6 +198,7 @@ cc.Class({
c
.
onEvent
(
'
show_cap
'
,
(
data
,
next
)
=>
{
c
.
onEvent
(
'
show_cap
'
,
(
data
,
next
)
=>
{
console
.
log
(
'
in show_cap event
'
,
data
);
console
.
log
(
'
in show_cap event
'
,
data
);
this
.
historyData
=
data
.
historyData
;
this
.
historyData
=
data
.
historyData
;
this
.
data
.
groupArr
=
this
.
historyData
.
arrData
;
this
.
showCapAnima
(
data
.
index
);
this
.
showCapAnima
(
data
.
index
);
next
();
next
();
});
});
...
@@ -247,10 +250,13 @@ cc.Class({
...
@@ -247,10 +250,13 @@ cc.Class({
if
(
user_aspect
)
{
if
(
user_aspect
)
{
let
data
=
JSON
.
parse
(
user_aspect
).
historyData
;
let
data
=
JSON
.
parse
(
user_aspect
).
historyData
;
for
(
let
i
=
0
;
i
<
this
.
serverAllUser
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
serverAllUser
.
length
;
i
++
)
{
const
userHistoryData
=
JSON
.
parse
(
this
.
serverAllUser
[
i
].
aspect
).
historyData
if
(
this
.
serverAllUser
[
i
].
aspect
)
{
if
(
userHistoryData
.
dateTime
>
data
.
dateTime
)
{
const
userHistoryData
=
JSON
.
parse
(
this
.
serverAllUser
[
i
].
aspect
).
historyData
data
=
userHistoryData
;
if
(
userHistoryData
&&
userHistoryData
.
dateTime
>
data
.
dateTime
)
{
data
=
userHistoryData
;
}
}
}
}
}
this
.
historyData
=
data
;
this
.
historyData
=
data
;
console
.
log
(
'
this.historyData:
'
,
this
.
historyData
);
console
.
log
(
'
this.historyData:
'
,
this
.
historyData
);
...
@@ -274,7 +280,7 @@ cc.Class({
...
@@ -274,7 +280,7 @@ cc.Class({
return
;
return
;
}
}
this
.
data
.
groupArr
=
this
.
historyData
.
arrData
;
this
.
data
.
groupArr
=
this
.
historyData
.
arrData
;
this
.
groupIndex
=
this
.
historyData
.
index
;
//
this.groupIndex = this.historyData.index;
this
.
curBottle
=
this
.
bottleArr
[
this
.
historyData
.
index
];
this
.
curBottle
=
this
.
bottleArr
[
this
.
historyData
.
index
];
this
.
reconnectBottleState
();
this
.
reconnectBottleState
();
...
@@ -288,6 +294,7 @@ cc.Class({
...
@@ -288,6 +294,7 @@ cc.Class({
if
(
arrData
[
i
]?.
isEnd
)
{
if
(
arrData
[
i
]?.
isEnd
)
{
this
.
bottleArr
[
i
].
scroll
.
active
=
false
;
this
.
bottleArr
[
i
].
scroll
.
active
=
false
;
this
.
bottleArr
[
i
].
cap
.
active
=
false
;
this
.
bottleArr
[
i
].
cap
.
active
=
false
;
this
.
bottleArr
[
i
].
data
.
isEnd
=
true
;
}
}
}
}
},
},
...
@@ -745,8 +752,10 @@ cc.Class({
...
@@ -745,8 +752,10 @@ cc.Class({
})
})
this
.
curBottle
=
bottle
;
this
.
curBottle
=
bottle
;
this
.
groupIndex
=
this
.
data
.
groupArr
.
indexOf
(
bottle
.
data
);
// this.groupIndex = this.data.groupArr.indexOf( bottle.data );
this
.
curBottle
.
data
.
isEnd
=
true
;
// this.curBottle.data.isEnd = true;
this
.
data
.
groupArr
[
index
].
isEnd
=
true
;
playAudio
(
this
.
capClip
);
playAudio
(
this
.
capClip
);
},
},
...
...
publish/.DS_Store
View file @
0bcbd4be
No preview for this file type
publish/publish/.DS_Store
View file @
0bcbd4be
No preview for this file type
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