Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
ios-ipad学生端
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄总
ios-ipad学生端
Commits
bc54895b
Commit
bc54895b
authored
Jan 19, 2022
by
庄总
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new v
parent
dd56bd52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
src/live/Index.tsx
src/live/Index.tsx
+47
-0
No files found.
src/live/Index.tsx
View file @
bc54895b
...
@@ -2685,6 +2685,53 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -2685,6 +2685,53 @@ export default class Index extends Component<Props, State, HomeState, AppContext
uid
:
this
.
state
.
liveRoomUid
uid
:
this
.
state
.
liveRoomUid
}).
then
((
data
)
=>
{
}).
then
((
data
)
=>
{
console
.
log
(
'
uploadImage
'
,
data
);
console
.
log
(
'
uploadImage
'
,
data
);
const
{
uid
,
channelId
,
text
}
=
data
;
let
list
=
this
.
state
.
list
;
let
chatMsg
=
{};
let
nickname
=
this
.
state
.
teacherName
;
if
(
this
.
state
.
teacherUid
!==
uid
)
{
// 学生发送图片
let
students
=
this
.
state
.
students
;
for
(
let
i
=
0
;
i
<
students
.
length
;
i
++
)
{
if
(
parseInt
(
students
[
i
].
liveRoomUid
)
===
parseInt
(
uid
))
{
nickname
=
students
[
i
].
studentName
;
break
;
}
}
}
let
width
=
Constants
.
unitWidth
*
parseInt
(
text
.
message
.
width
);
let
height
=
Constants
.
unitWidth
*
parseInt
(
text
.
message
.
height
);
if
(
width
>
Constants
.
unitWidth
*
190
)
{
height
=
Constants
.
unitWidth
*
190
/
width
*
height
;
width
=
Constants
.
unitWidth
*
190
;
}
chatMsg
=
{
dateTime
:
this
.
getFormattedDatetime
(
new
Date
()),
uid
:
uid
,
file
:
text
.
message
.
file
,
nickname
:
nickname
,
type
:
'
image
'
,
width
:
width
,
height
:
height
,
widthOrg
:
Constants
.
unitWidth
*
parseInt
(
text
.
message
.
width
),
heightOrg
:
Constants
.
unitWidth
*
parseInt
(
text
.
message
.
height
)
};
list
.
push
(
chatMsg
);
let
hasNewMsg
=
this
.
state
.
hasNewMsg
;
if
(
!
this
.
state
.
showChat
)
{
hasNewMsg
=
true
;
}
this
.
setState
({
list
:
list
,
hasNewMsg
:
hasNewMsg
});
Constants
.
storeData
(
'
chatData-
'
+
this
.
state
.
channelId
,
JSON
.
stringify
(
list
));
setTimeout
(()
=>
{
if
(
this
.
msgList
)
{
this
.
msgList
.
scrollToEnd
();
}
},
150
);
});
});
})
})
}
}
>
}
}
>
...
...
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