Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douyin_xiaoxiaole
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
douyin_xiaoxiaole
Commits
b7a8f93a
Commit
b7a8f93a
authored
Jul 12, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 测试
parent
47d743c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
douyin_xiaoxiaole.js
assets/douyin_xiaoxiaole/scene/douyin_xiaoxiaole.js
+5
-4
supportToolsDy.js
assets/douyin_xiaoxiaole/script/supportToolsDy.js
+11
-1
wordgame_syllabus.ts
assets/wordgame_syllabus/scene/wordgame_syllabus.ts
+8
-1
No files found.
assets/douyin_xiaoxiaole/scene/douyin_xiaoxiaole.js
View file @
b7a8f93a
...
...
@@ -87,13 +87,14 @@ cc.Class({
async
start
()
{
// anchor - 主播,audience - 观众
//
this.roomId = await getRoomId();
//
const res = await getLiveUserInfo();
//
this.role = res.role;
//
this.uid = res.uid;
this
.
roomId
=
await
getRoomId
();
const
res
=
await
getLiveUserInfo
();
this
.
role
=
res
.
role
;
this
.
uid
=
res
.
uid
;
// 测试数据
this
.
role
=
'
anchor
'
;
this
.
uid
=
'
teacher
'
;
const
nickObj
=
await
drawOpenNickName
(
res
.
nickName
);
...
...
assets/douyin_xiaoxiaole/script/supportToolsDy.js
View file @
b7a8f93a
...
...
@@ -138,7 +138,7 @@ function getWebRecordInstanse() {
}
export
function
getRoomId
()
{
if
(
!
tt
)
{
if
(
cc
.
sys
.
platform
!==
cc
.
sys
.
BYTEDANCE_GAME
)
{
return
'
test-room-0001
'
;
}
return
new
Promise
((
resolve
)
=>
{
...
...
@@ -155,6 +155,9 @@ export function getRoomId() {
}
export
function
drawOpenNickName
(
str
)
{
if
(
cc
.
sys
.
platform
!==
cc
.
sys
.
BYTEDANCE_GAME
)
{
return
{};
}
return
new
Promise
((
resolve
)
=>
{
tt
.
drawOpenNickName
({
src
:
str
,
...
...
@@ -168,6 +171,13 @@ export function drawOpenNickName(str) {
}
export
function
getLiveUserInfo
()
{
if
(
cc
.
sys
.
platform
!==
cc
.
sys
.
BYTEDANCE_GAME
)
{
return
{
role
:
'
audience
'
,
uid
:
'
example
'
,
nickName
:
''
,
}
}
return
new
Promise
((
resolve
)
=>
{
tt
.
getLiveUserInfo
({
complete
(
res
){
...
...
assets/wordgame_syllabus/scene/wordgame_syllabus.ts
View file @
b7a8f93a
...
...
@@ -106,7 +106,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
pid
)
{
queryObj
[
'
pid
'
]
=
this
.
pid
;
}
const
res
=
await
asyncCallNetworkApiGet
(
"
/api/douyin/v1/list
"
,
queryObj
);
let
res
=
await
asyncCallNetworkApiGet
(
"
/api/douyin/v1/list
"
,
queryObj
);
res
=
JSON
.
parse
(
res
);
if
(
res
[
"
code
"
]
!==
200
)
{
this
.
showTips
(
res
[
"
msg
"
]);
return
;
...
...
@@ -250,5 +251,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
roomid
:
this
.
roomId
,
data
:
keys
.
join
(
"
,
"
),
});
// 显示排行榜
cc
.
find
(
`Canvas/rankpage`
).
active
=
true
;
this
.
runRankList
();
this
.
canTouch
=
true
;
}
}
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