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
7ca74f13
Commit
7ca74f13
authored
Jan 19, 2022
by
zhangkaixuan11
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交下代码
parent
11238cf1
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
464 additions
and
76 deletions
+464
-76
App.tsx
App.tsx
+1
-1
android/app/src/main/java/com/fenghua_student_client/netless/WhiteboardAPI.java
...ava/com/fenghua_student_client/netless/WhiteboardAPI.java
+1
-1
css/Live.css.ts
css/Live.css.ts
+2
-0
index.js
index.js
+1
-0
package.json
package.json
+5
-2
src/components/rtm-adapter.ts
src/components/rtm-adapter.ts
+20
-5
src/home202201/Index.tsx
src/home202201/Index.tsx
+33
-26
src/home202201/home.css.ts
src/home202201/home.css.ts
+3
-3
src/live/Index.tsx
src/live/Index.tsx
+98
-25
src/netless/engine.js
src/netless/engine.js
+1
-1
src/webview/Index.tsx
src/webview/Index.tsx
+3
-1
yarn.lock
yarn.lock
+296
-11
No files found.
App.tsx
View file @
7ca74f13
...
@@ -300,7 +300,7 @@ export default class App extends Component {
...
@@ -300,7 +300,7 @@ export default class App extends Component {
/>
/>
<
Root
.
Screen
<
Root
.
Screen
name=
"LiveIndex"
name=
"LiveIndex"
component=
{
Hom
eIndex
}
component=
{
Liv
eIndex
}
options=
{
{
headerShown
:
false
}
}
options=
{
{
headerShown
:
false
}
}
/>
/>
<
Root
.
Screen
<
Root
.
Screen
...
...
android/app/src/main/java/com/fenghua_student_client/netless/WhiteboardAPI.java
View file @
7ca74f13
...
@@ -143,7 +143,7 @@ public class WhiteboardAPI {
...
@@ -143,7 +143,7 @@ public class WhiteboardAPI {
}
}
private
void
disableOperations
(
ReadableMap
obj
,
com
.
facebook
.
react
.
bridge
.
Promise
promise
)
{
private
void
disableOperations
(
ReadableMap
obj
,
com
.
facebook
.
react
.
bridge
.
Promise
promise
)
{
Map
map1
=
obj
.
toHashMap
();
Map
map1
=
obj
.
toHashMap
();
room
.
disable
Operations
((
Boolean
)
map1
.
get
(
"readonly"
));
room
.
disable
CameraTransform
((
Boolean
)
map1
.
get
(
"readonly"
));
promise
.
resolve
(
map1
.
get
(
"readonly"
));
promise
.
resolve
(
map1
.
get
(
"readonly"
));
}
}
private
void
setToolType
(
ReadableMap
obj
,
com
.
facebook
.
react
.
bridge
.
Promise
promise
)
{
private
void
setToolType
(
ReadableMap
obj
,
com
.
facebook
.
react
.
bridge
.
Promise
promise
)
{
...
...
css/Live.css.ts
View file @
7ca74f13
...
@@ -356,6 +356,8 @@ let LiveCSS = StyleSheet.create({
...
@@ -356,6 +356,8 @@ let LiveCSS = StyleSheet.create({
chatBtnWrapper
:
{
chatBtnWrapper
:
{
backgroundColor
:
'
#272727
'
,
backgroundColor
:
'
#272727
'
,
padding
:
Constants
.
unitWidth
*
10
,
padding
:
Constants
.
unitWidth
*
10
,
paddingTop
:
0
,
paddingBottom
:
0
,
height
:
Constants
.
unitWidth
*
40
,
height
:
Constants
.
unitWidth
*
40
,
position
:
'
relative
'
position
:
'
relative
'
},
},
...
...
index.js
View file @
7ca74f13
...
@@ -7,4 +7,5 @@ import App from './App';
...
@@ -7,4 +7,5 @@ import App from './App';
import
{
name
as
appName
}
from
'
./app.json
'
;
import
{
name
as
appName
}
from
'
./app.json
'
;
console
.
ignoredYellowBox
=
[
'
Warning: Each child
'
,
'
renamed
'
];
console
.
ignoredYellowBox
=
[
'
Warning: Each child
'
,
'
renamed
'
];
console
.
disableYellowBox
=
true
;
console
.
disableYellowBox
=
true
;
// global.FormData = global.originalFormData ? global.originalFormData : global.FormData;
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
package.json
View file @
7ca74f13
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"start"
:
"react-native start"
,
"start"
:
"react-native start"
,
"test"
:
"jest"
,
"test"
:
"jest"
,
"lint"
:
"eslint ."
,
"lint"
:
"eslint ."
,
"a-build"
:
"react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/"
"a-build"
:
"react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
@react-native-async-storage/async-storage
"
:
"
^1.13.4
"
,
"
@react-native-async-storage/async-storage
"
:
"
^1.13.4
"
,
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
"
@react-navigation/native
"
:
"
^5.9.2
"
,
"
@react-navigation/native
"
:
"
^5.9.2
"
,
"
@react-navigation/stack
"
:
"
^5.14.2
"
,
"
@react-navigation/stack
"
:
"
^5.14.2
"
,
"
@types/react-native
"
:
"
^0.66.11
"
,
"
@types/react-native
"
:
"
^0.66.11
"
,
"
agora-react-native-rtm
"
:
"
1.
2.2-alpha.3
"
,
"
agora-react-native-rtm
"
:
"
1.
4.8
"
,
"
events
"
:
"
^3.2.0
"
,
"
events
"
:
"
^3.2.0
"
,
"
react
"
:
"
16.13.1
"
,
"
react
"
:
"
16.13.1
"
,
"
react-native
"
:
"
0.64.0
"
,
"
react-native
"
:
"
0.64.0
"
,
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
"
react-native-keyboard-aware-scroll-view
"
:
"
^0.9.3
"
,
"
react-native-keyboard-aware-scroll-view
"
:
"
^0.9.3
"
,
"
react-native-keyboard-tracking-view
"
:
"
^5.7.0
"
,
"
react-native-keyboard-tracking-view
"
:
"
^5.7.0
"
,
"
react-native-linear-gradient
"
:
"
^2.5.6
"
,
"
react-native-linear-gradient
"
:
"
^2.5.6
"
,
"
react-native-lock-screen
"
:
"
^1.0.2
"
,
"
react-native-modal
"
:
"
^11.7.0
"
,
"
react-native-modal
"
:
"
^11.7.0
"
,
"
react-native-orientation
"
:
"
^3.1.3
"
,
"
react-native-orientation
"
:
"
^3.1.3
"
,
"
react-native-photo-editor
"
:
"
^1.0.12
"
,
"
react-native-photo-editor
"
:
"
^1.0.12
"
,
...
@@ -52,7 +53,9 @@
...
@@ -52,7 +53,9 @@
"
react-native-slider
"
:
"
^0.11.0
"
,
"
react-native-slider
"
:
"
^0.11.0
"
,
"
react-native-sound
"
:
"
^0.11.0
"
,
"
react-native-sound
"
:
"
^0.11.0
"
,
"
react-native-splash-screen
"
:
"
^3.2.0
"
,
"
react-native-splash-screen
"
:
"
^3.2.0
"
,
"
react-native-svg
"
:
"
^12.1.1
"
,
"
react-native-switch-pro
"
:
"
^1.0.5
"
,
"
react-native-switch-pro
"
:
"
^1.0.5
"
,
"
react-native-vector-icons
"
:
"
^9.0.0
"
,
"
react-native-video
"
:
"
^5.1.1
"
,
"
react-native-video
"
:
"
^5.1.1
"
,
"
react-native-video-controls
"
:
"
^2.8.1
"
,
"
react-native-video-controls
"
:
"
^2.8.1
"
,
"
react-native-view-shot
"
:
"
^3.1.2
"
,
"
react-native-view-shot
"
:
"
^3.1.2
"
,
...
...
src/components/rtm-adapter.ts
View file @
7ca74f13
...
@@ -14,6 +14,8 @@ export default class RtmAdapter extends EventEmitter {
...
@@ -14,6 +14,8 @@ export default class RtmAdapter extends EventEmitter {
super
();
super
();
this
.
uid
=
null
;
this
.
uid
=
null
;
this
.
client
=
new
RtmEngine
();
this
.
client
=
new
RtmEngine
();
}
listenersAll
(){
const
events
=
[
const
events
=
[
'
tokenExpired
'
,
'
tokenExpired
'
,
'
remoteInvitationRefused
'
,
'
remoteInvitationRefused
'
,
...
@@ -32,7 +34,7 @@ export default class RtmAdapter extends EventEmitter {
...
@@ -32,7 +34,7 @@ export default class RtmAdapter extends EventEmitter {
'
channelMemberLeft
'
,
'
channelMemberLeft
'
,
'
channelMemberJoined
'
,
'
channelMemberJoined
'
,
'
remoteInvitationReceived
'
,
'
remoteInvitationReceived
'
,
'
attributesUpdated
'
//
'attributesUpdated'
];
];
events
.
forEach
((
event
:
string
)
=>
{
events
.
forEach
((
event
:
string
)
=>
{
// @ts-ignore
// @ts-ignore
...
@@ -41,8 +43,11 @@ export default class RtmAdapter extends EventEmitter {
...
@@ -41,8 +43,11 @@ export default class RtmAdapter extends EventEmitter {
this
.
emit
(
event
,
evt
);
this
.
emit
(
event
,
evt
);
});
});
});
});
this
.
client
.
addListener
(
'
ChannelAttributesUpdated
'
,
(
evt
:
any
)
=>
{
console
.
log
(
'
ChannelAttributesUpdated
'
,
evt
);
this
.
emit
(
'
attributesUpdated
'
,
evt
);
});
}
}
async
login
(
uid
:
string
):
Promise
<
any
>
{
async
login
(
uid
:
string
):
Promise
<
any
>
{
await
this
.
client
.
createClient
(
config
.
appId
);
await
this
.
client
.
createClient
(
config
.
appId
);
this
.
uid
=
uid
;
this
.
uid
=
uid
;
...
@@ -57,10 +62,12 @@ export default class RtmAdapter extends EventEmitter {
...
@@ -57,10 +62,12 @@ export default class RtmAdapter extends EventEmitter {
}
}
async
loginWidthToken
(
uid
:
string
,
appId
,
token
):
Promise
<
any
>
{
async
loginWidthToken
(
uid
:
string
,
appId
,
token
):
Promise
<
any
>
{
if
(
!
this
.
uid
)
{
this
.
listenersAll
()
// if (!this.uid) {
await
this
.
client
.
createClient
(
appId
);
await
this
.
client
.
createClient
(
appId
);
this
.
uid
=
uid
;
this
.
uid
=
uid
;
}
//
}
console
.
log
(
'
rtm login nidaye
'
,
appId
,
token
,
uid
,
this
.
uid
);
console
.
log
(
'
rtm login nidaye
'
,
appId
,
token
,
uid
,
this
.
uid
);
...
@@ -69,9 +76,17 @@ export default class RtmAdapter extends EventEmitter {
...
@@ -69,9 +76,17 @@ export default class RtmAdapter extends EventEmitter {
token
:
token
,
token
:
token
,
});
});
}
}
async
getChannelAttributes
(
cid
:
string
){
let
arr
=
await
this
.
client
.
getChannelAttributes
(
cid
)
if
(
arr
&&
arr
.
length
){
this
.
emit
(
'
attributesUpdated
'
,
arr
);
}
console
.
log
(
arr
,
'
arr
'
)
}
async
logout
():
Promise
<
any
>
{
async
logout
():
Promise
<
any
>
{
// await this.client.removeAllListeners();
await
this
.
client
.
logout
();
await
this
.
client
.
logout
();
await
this
.
client
.
destroyClient
();
console
.
log
(
'
logout success 22
'
);
console
.
log
(
'
logout success 22
'
);
}
}
...
...
src/home202201/Index.tsx
View file @
7ca74f13
...
@@ -34,6 +34,7 @@ import CameraRoll from "@react-native-community/cameraroll";
...
@@ -34,6 +34,7 @@ import CameraRoll from "@react-native-community/cameraroll";
import
AddNote
from
'
../../src/components/AddNote
'
;
import
AddNote
from
'
../../src/components/AddNote
'
;
import
Confirm
from
"
../components/Confirm
"
;
import
Confirm
from
"
../components/Confirm
"
;
import
Toast
from
'
../components/Toast
'
;
import
Toast
from
'
../components/Toast
'
;
export
default
class
Index
extends
Component
{
export
default
class
Index
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -405,32 +406,34 @@ export default class Index extends Component {
...
@@ -405,32 +406,34 @@ export default class Index extends Component {
});
});
}
}
golive
=
()
=>
{
golive
=
()
=>
{
if
(
this
.
state
.
classList
&&
this
.
state
.
classList
.
length
)
{
if
(
this
.
state
.
classList
&&
this
.
state
.
classList
.
length
)
{
let
item
=
this
.
state
.
classList
[
0
]
let
item
=
this
.
state
.
classList
[
0
]
this
.
props
.
navigation
.
navigate
(
'
LiveIndex
'
,
{
liveRoomUid
:
item
.
liveRoomUid
,
channelId
:
item
.
channelId
,
netlessUuid
:
item
.
netlessUuid
,
students
:
item
.
clazzStudentList
,
teachers
:
item
.
clazzTeacherList
,
courseName
:
item
.
courseScheduleName
,
studentName
:
item
.
studentName
,
classId
:
item
.
classId
,
classScheduleId
:
item
.
classScheduleId
,
startTime
:
item
.
startTime
,
endTime
:
item
.
endTime
,
lessonDate
:
item
.
lessonDate
,
});
return
if
(
item
.
status
===
'
20
'
)
{
if
(
item
.
status
===
'
20
'
)
{
this
.
props
.
navigation
.
navigate
(
'
LiveIndex
'
,
{
liveRoomUid
:
item
.
liveRoomUid
,
}
else
{
channelId
:
item
.
channelId
,
netlessUuid
:
item
.
netlessUuid
,
students
:
item
.
clazzStudentList
,
teachers
:
item
.
clazzTeacherList
,
courseName
:
item
.
courseScheduleName
,
studentName
:
item
.
studentName
,
classId
:
item
.
classId
,
classScheduleId
:
item
.
classScheduleId
,
startTime
:
item
.
startTime
,
endTime
:
item
.
endTime
,
lessonDate
:
item
.
lessonDate
,
});
}
else
{
this
.
setState
({
this
.
setState
({
showToast
:
true
,
showToast
:
true
,
msg
:
'
当前课程非可上课状态
'
,
msg
:
'
当前课程非可上课状态
'
,
tipsIcon
:
require
(
'
../../images/common/info.png
'
)
tipsIcon
:
require
(
'
../../images/common/info.png
'
)
});
});
}
}
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
showToast
:
true
,
showToast
:
true
,
msg
:
'
此账户当前无课程
'
,
msg
:
'
此账户当前无课程
'
,
...
@@ -706,23 +709,26 @@ export default class Index extends Component {
...
@@ -706,23 +709,26 @@ export default class Index extends Component {
render
()
{
render
()
{
return
(
return
(
<
View
style=
{
HomeStyle
.
warp
}
>
<
View
style=
{
HomeStyle
.
warp
}
>
<
Toast
onHide=
{
()
=>
{
<
Toast
onHide=
{
()
=>
{
this
.
setState
({
this
.
setState
({
showToast
:
false
showToast
:
false
})
})
}
}
show=
{
this
.
state
.
showToast
}
msg=
{
this
.
state
.
msg
}
icon=
{
this
.
state
.
tipsIcon
}
/>
}
}
show=
{
this
.
state
.
showToast
}
msg=
{
this
.
state
.
msg
}
icon=
{
this
.
state
.
tipsIcon
}
/>
<
Image
resizeMode=
'cover'
source=
{
require
(
'
../../images/common2201/homBag.png
'
)
}
style=
{
HomeStyle
.
containerImg
}
/>
<
Image
resizeMode=
'cover'
source=
{
require
(
'
../../images/common2201/homBag.png
'
)
}
style=
{
HomeStyle
.
containerImg
}
/>
<
View
style=
{
HomeStyle
.
container
}
>
<
View
style=
{
HomeStyle
.
container
}
>
<
View
style=
{
HomeStyle
.
top
}
>
<
View
style=
{
HomeStyle
.
top
}
>
<
View
style=
{
HomeStyle
.
topLeft
}
>
<
View
style=
{
HomeStyle
.
topLeft
}
>
<
View
style=
{
HomeStyle
.
topLeftIcon
}
>
<
View
style=
{
HomeStyle
.
topLeftIcon
}
>
{
{
this
.
state
.
userInfo
&&
this
.
state
.
userInfo
&&
this
.
state
.
userInfo
.
headImgUrl
?
<
Image
resizeMode=
'cover'
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
borderRadius
:
50
}
}
source=
{
{
uri
:
this
.
state
.
userInfo
.
headImgUrl
}
}
/>
(
}
<
Image
resizeMode=
'cover'
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
borderRadius
:
50
}
}
source=
{
{
uri
:
this
.
state
.
userInfo
.
headImgUrl
}
}
/>
{
)
:
!
this
.
state
.
userInfo
&&
(
<
View
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
backgroundColor
:
'
#999
'
,
borderRadius
:
50
}
}
></
View
>
<
View
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
backgroundColor
:
'
#999
'
,
borderRadius
:
50
}
}
></
View
>
)
}
}
</
View
>
</
View
>
...
@@ -803,6 +809,7 @@ export default class Index extends Component {
...
@@ -803,6 +809,7 @@ export default class Index extends Component {
<
View
></
View
>
<
View
></
View
>
</
View
>
</
View
>
</
View
>
</
View
>
)
)
}
}
...
...
src/home202201/home.css.ts
View file @
7ca74f13
...
@@ -12,13 +12,13 @@ let HomeCSS = Constants.StyleSheet.create({
...
@@ -12,13 +12,13 @@ let HomeCSS = Constants.StyleSheet.create({
},
},
containerImg
:
{
containerImg
:
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
left
:
0
,
left
:
-
1
,
right
:
0
,
right
:
0
,
top
:
0
,
top
:
0
,
bottom
:
0
,
bottom
:
0
,
height
:
null
,
height
:
null
,
width
:
null
,
width
:
null
,
zIndex
:
-
1
zIndex
:
-
1
00
},
},
container
:
{
container
:
{
"
width
"
:
'
100%
'
,
"
width
"
:
'
100%
'
,
...
@@ -49,7 +49,7 @@ let HomeCSS = Constants.StyleSheet.create({
...
@@ -49,7 +49,7 @@ let HomeCSS = Constants.StyleSheet.create({
'
height
'
:
Constants
.
unitWidth
*
48
,
'
height
'
:
Constants
.
unitWidth
*
48
,
},
},
topLeftName
:{
topLeftName
:{
'
w
idth
'
:
Constants
.
unitWidth
*
140
,
'
minW
idth
'
:
Constants
.
unitWidth
*
140
,
'
height
'
:
Constants
.
unitWidth
*
52
,
'
height
'
:
Constants
.
unitWidth
*
52
,
"
paddingLeft
"
:
Constants
.
unitWidth
*
18
,
"
paddingLeft
"
:
Constants
.
unitWidth
*
18
,
"
paddingRight
"
:
Constants
.
unitWidth
*
18
,
"
paddingRight
"
:
Constants
.
unitWidth
*
18
,
...
...
src/live/Index.tsx
View file @
7ca74f13
This diff is collapsed.
Click to expand it.
src/netless/engine.js
View file @
7ca74f13
...
@@ -208,7 +208,7 @@ class WhiteBoardEngine {
...
@@ -208,7 +208,7 @@ class WhiteBoardEngine {
* 禁用启用所有手势
* 禁用启用所有手势
* @param {bool} readonly
* @param {bool} readonly
*/
*/
async
disable
Operations
(
readonly
)
{
async
disable
CameraTransform
(
readonly
)
{
return
await
TICBridgeManager
.
callMethod
(
'
disableOperations
'
,
{
readonly
});
return
await
TICBridgeManager
.
callMethod
(
'
disableOperations
'
,
{
readonly
});
}
}
}
}
...
...
src/webview/Index.tsx
View file @
7ca74f13
...
@@ -29,8 +29,10 @@ export default class MyWeb extends Component {
...
@@ -29,8 +29,10 @@ export default class MyWeb extends Component {
if
(
userInfo
)
{
if
(
userInfo
)
{
console
.
log
(
userInfo
)
console
.
log
(
userInfo
)
userInfo
=
JSON
.
parse
(
userInfo
);
userInfo
=
JSON
.
parse
(
userInfo
);
// content: "{"id":null,"userName":"19000000005","nickName":null,"headImgUrl":null,"realName":"19000000005","mobile":"19000000005","email":null,"isAdmin":0,"memberType":"01","province":null,"city":null,"district":null,"lastLoginTime":"2022-01-17T09:16:52.000+0000","createTime":"2022-01-17T05:17:32.000+0000","updateTime":"2022-01-17T05:17:32.000+0000","token":"IPAD_CREDIT_TOKEN:639a964a3b4f4af2b8526f7e51deffb0","validTime":43200}"
this
.
setState
({
this
.
setState
({
uri
:
`http://121.36.221.250:8018/evaluation/teacher/#/?type=1&token=
${
'
PC_CREDIT_TOKEN:e89f941968e5474fae00d3148d061d1b
'
}
`
,
uri
:
`http://121.36.221.250:8018/evaluation/teacher/#/?type=1&token=
${
userInfo
.
token
}
`
,
})
})
console
.
log
(
this
.
state
.
uri
)
console
.
log
(
this
.
state
.
uri
)
}
}
...
...
yarn.lock
View file @
7ca74f13
This diff is collapsed.
Click to expand it.
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