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
45077f31
Commit
45077f31
authored
Jan 14, 2022
by
zhangkaixuan11
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一版
parent
c380b669
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
245 additions
and
82 deletions
+245
-82
android/app/src/main/AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-0
android/app/src/main/res/values/strings.xml
android/app/src/main/res/values/strings.xml
+1
-1
css/Login.css.ts
css/Login.css.ts
+4
-2
src/components/Login.tsx
src/components/Login.tsx
+16
-9
src/home202201/Index.tsx
src/home202201/Index.tsx
+111
-45
src/home202201/home.css
src/home202201/home.css
+0
-0
src/home202201/home.css.ts
src/home202201/home.css.ts
+1
-1
src/live/Index.tsx
src/live/Index.tsx
+38
-18
src/webview/Index.tsx
src/webview/Index.tsx
+59
-0
yarn.lock
yarn.lock
+14
-6
No files found.
android/app/src/main/AndroidManifest.xml
View file @
45077f31
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
'landscape'
android:windowSoftInputMode=
"adjustResize"
>
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
android/app/src/main/res/values/strings.xml
View file @
45077f31
<resources>
<resources>
<string
name=
"app_name"
>
fenghua_student_client
</string>
<string
name=
"app_name"
>
枫华学生端
</string>
</resources>
</resources>
css/Login.css.ts
View file @
45077f31
...
@@ -77,10 +77,12 @@ var LoginCSS = StyleSheet.create(
...
@@ -77,10 +77,12 @@ var LoginCSS = StyleSheet.create(
marginTop
:
Constants
.
unitWidth
*
20
,
marginTop
:
Constants
.
unitWidth
*
20
,
},
},
rememberLeft
:
{
rememberLeft
:
{
flex
:
1
,
flex
:
2
,
height
:
Constants
.
unitWidth
*
25
,
height
:
Constants
.
unitWidth
*
25
,
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
alignItems
:
'
center
'
,
justifyContent
:
'
flex-start
'
,
// width:Constants.unitWidth * 250
},
},
rememberTxt
:
{
rememberTxt
:
{
fontFamily
:
'
PingFangSC-Regular
'
,
fontFamily
:
'
PingFangSC-Regular
'
,
...
...
src/components/Login.tsx
View file @
45077f31
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
Text
,
View
,
Animated
,
Image
,
Modal
,
Keyboard
,
StatusBar
,
TextInput
,
TouchableHighlight
,
findNodeHandle
,
DeviceEventEmitter
}
from
'
react-native
'
;
import
{
Text
,
View
,
Animated
,
Image
,
Modal
,
Keyboard
,
StatusBar
,
TextInput
,
TouchableHighlight
,
TouchableOpacity
,
findNodeHandle
,
DeviceEventEmitter
}
from
'
react-native
'
;
import
Constants
from
'
../../Constants
'
;
import
Constants
from
'
../../Constants
'
;
// import LinearGradient from 'react-native-linear-gradient';
// import LinearGradient from 'react-native-linear-gradient';
import
Button
from
'
react-native-button
'
;
import
Button
from
'
react-native-button
'
;
...
@@ -142,6 +142,7 @@ export default class Login extends Component {
...
@@ -142,6 +142,7 @@ export default class Login extends Component {
}
}
login
=
()
=>
{
login
=
()
=>
{
// alert(1)
if
(
this
.
state
.
loginType
===
'
code
'
)
{
if
(
this
.
state
.
loginType
===
'
code
'
)
{
this
.
loginWithCode
();
this
.
loginWithCode
();
}
else
{
}
else
{
...
@@ -185,7 +186,8 @@ export default class Login extends Component {
...
@@ -185,7 +186,8 @@ export default class Login extends Component {
DeviceEventEmitter
.
emit
(
'
showLogin
'
,
{
DeviceEventEmitter
.
emit
(
'
showLogin
'
,
{
showLogin
:
false
showLogin
:
false
});
});
this
.
props
.
navigation
.
goBack
();
// this.props.navigation.goBack();
this
.
props
.
navigation
.
navigate
(
'
HomeIndex
'
)
},
1000
);
},
1000
);
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
...
@@ -297,7 +299,7 @@ export default class Login extends Component {
...
@@ -297,7 +299,7 @@ export default class Login extends Component {
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
areaNo
}
>
+86
</
Text
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
areaNo
}
>
+86
</
Text
>
</
View
>
</
View
>
<
Image
source=
{
require
(
'
../../images/common/jiantouba.png
'
)
}
style=
{
LoginCSS
.
jiantou
}
/>
<
Image
source=
{
require
(
'
../../images/common/jiantouba.png
'
)
}
style=
{
LoginCSS
.
jiantou
}
/>
<
TextInput
allowFontScaling=
{
false
}
keyboardType=
"phone-pad"
<
TextInput
maxLength=
{
11
}
allowFontScaling=
{
false
}
keyboardType=
"phone-pad"
placeholderTextColor=
"#919191"
placeholder=
"请输入手机号"
placeholderTextColor=
"#919191"
placeholder=
"请输入手机号"
style=
{
LoginCSS
.
mobile
}
onChangeText=
{
(
text
)
=>
{
style=
{
LoginCSS
.
mobile
}
onChangeText=
{
(
text
)
=>
{
this
.
setState
({
this
.
setState
({
...
@@ -381,22 +383,27 @@ export default class Login extends Component {
...
@@ -381,22 +383,27 @@ export default class Login extends Component {
/>
/>
</
View
>
</
View
>
<
View
style=
{
LoginCSS
.
rememberWrapper
}
>
<
View
style=
{
LoginCSS
.
rememberWrapper
}
>
<
Button
containerStyle=
{
{
<
Button
style=
{
LoginCSS
.
rememberLeft
}
containerStyle=
{
{
flex
:
1
flex
:
1
,
flexDirection
:
'
row
'
,
justifyContent
:
'
flex-start
'
,
}
}
onPress=
{
()
=>
{
}
}
onPress=
{
()
=>
{
Constants
.
storeData
(
'
rememberPwd
'
,
!
this
.
state
.
rememberPwd
?
'
1
'
:
'
0
'
);
Constants
.
storeData
(
'
rememberPwd
'
,
!
this
.
state
.
rememberPwd
?
'
1
'
:
'
0
'
);
this
.
setState
({
this
.
setState
({
rememberPwd
:
!
this
.
state
.
rememberPwd
rememberPwd
:
!
this
.
state
.
rememberPwd
});
});
}
}
>
}
}
>
<
View
style=
{
LoginCSS
.
rememberLeft
}
>
<
View
>
<
Image
style=
{
{
<
Image
style=
{
{
width
:
Constants
.
unitWidth
*
20
,
width
:
Constants
.
unitWidth
*
20
,
height
:
Constants
.
unitWidth
*
20
,
height
:
Constants
.
unitWidth
*
20
,
}
}
source=
{
this
.
state
.
rememberPwd
?
}
}
source=
{
this
.
state
.
rememberPwd
?
require
(
'
../../images/common/checkbox-checked.png
'
)
:
require
(
'
../../images/common/checkbox.png
'
)
}
/>
require
(
'
../../images/common/checkbox-checked.png
'
)
:
require
(
'
../../images/common/checkbox.png
'
)
}
/>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
rememberTxt
}
>
记住密码
</
Text
>
</
View
>
</
View
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
rememberTxt
}
>
记住密码
</
Text
>
</
Button
>
</
Button
>
<
Button
containerStyle=
{
{
<
Button
containerStyle=
{
{
flex
:
1
,
flex
:
1
,
...
@@ -410,11 +417,11 @@ export default class Login extends Component {
...
@@ -410,11 +417,11 @@ export default class Login extends Component {
</
View
>
</
View
>
</
View
>
</
View
>
}
}
<
Button
onPress=
{
this
.
login
}
>
<
TouchableOpacity
onPress=
{
this
.
login
}
>
<
View
style=
{
[
LoginCSS
.
loginWrapper
,
PublicCSS
.
centerAll
]
}
>
<
View
style=
{
[
LoginCSS
.
loginWrapper
,
PublicCSS
.
centerAll
]
}
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
loginTxt
}
>
登录
</
Text
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
loginTxt
}
>
登录
</
Text
>
</
View
>
</
View
>
</
Button
>
</
TouchableOpacity
>
</
View
>
</
View
>
</
TouchableHighlight
>
</
TouchableHighlight
>
</
KeyboardAwareScrollView
>
</
KeyboardAwareScrollView
>
...
...
src/home202201/Index.tsx
View file @
45077f31
import
React
,
{
Component
,
useRef
}
from
'
react
'
;
import
React
,
{
Component
,
useRef
}
from
'
react
'
;
import
{
import
{
Image
,
View
,
Text
,
StatusBar
,
TextInput
,
Keyboard
,
FlatList
,
Image
,
View
,
Text
,
StatusBar
,
TextInput
,
Keyboard
,
FlatList
,
DeviceEventEmitter
,
ScrollView
,
Animated
,
Platform
DeviceEventEmitter
,
ScrollView
,
Animated
,
Platform
,
TouchableHighlight
,
TouchableNativeFeedback
,
TouchableOpacity
,
TouchableWithoutFeedback
}
from
'
react-native
'
;
}
from
'
react-native
'
;
var
RNFS
=
require
(
'
react-native-fs
'
);
var
RNFS
=
require
(
'
react-native-fs
'
);
...
@@ -32,17 +33,22 @@ import PhotoEditor from 'react-native-photo-editor';
...
@@ -32,17 +33,22 @@ import PhotoEditor from 'react-native-photo-editor';
import
CameraRoll
from
"
@react-native-community/cameraroll
"
;
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
'
;
export
default
class
Index
extends
Component
{
export
default
class
Index
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
userICon
:
false
,
userICon
:
false
,
mainHeight
:
0
,
mainHeight
:
0
,
userInfo
:
false
,
showToast
:
false
,
msg
:
''
,
tipsIcon
:
''
,
classList
:
[],
classList
:
[],
reportList
:
[],
reportList
:
[],
calendar
:
null
,
calendar
:
null
,
startDate
:
this
.
getMonthFirstDay
(
new
Date
()),
startDate
:
this
.
getMonthFirstDay
(
new
Date
()),
...
@@ -61,6 +67,15 @@ export default class Index extends Component {
...
@@ -61,6 +67,15 @@ export default class Index extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
Constants
.
readData
(
'
userInfo
'
).
then
((
userInfo
)
=>
{
if
(
userInfo
)
{
console
.
log
(
userInfo
)
userInfo
=
JSON
.
parse
(
userInfo
);
this
.
setState
({
userInfo
:
userInfo
,
})
}
})
// this.componentWillShow();
// this.componentWillShow();
// DeviceEventEmitter.addListener('inited', () => {
// DeviceEventEmitter.addListener('inited', () => {
// this.componentWillShow();
// this.componentWillShow();
...
@@ -96,7 +111,7 @@ export default class Index extends Component {
...
@@ -96,7 +111,7 @@ export default class Index extends Component {
componentWillShow
=
()
=>
{
componentWillShow
=
()
=>
{
// StatusBar.setBarStyle('dark-content');
// StatusBar.setBarStyle('dark-content');
//
this.getCurrentLessons();
this
.
getCurrentLessons
();
// this.getLessonsByDate();
// this.getLessonsByDate();
// this.setMarkDates();
// this.setMarkDates();
// this.getLessonStat();
// this.getLessonStat();
...
@@ -390,7 +405,39 @@ export default class Index extends Component {
...
@@ -390,7 +405,39 @@ export default class Index extends Component {
});
});
}
}
golive
=
()
=>
{
if
(
this
.
state
.
classList
&&
this
.
state
.
classList
.
length
){
let
item
=
this
.
state
.
classList
[
0
]
if
(
item
.
status
===
'
20
'
)
{
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
,
});
}
else
{
this
.
setState
({
showToast
:
true
,
msg
:
'
当前课程非可上课状态
'
,
tipsIcon
:
require
(
'
../../images/common/info.png
'
)
});
}
}
else
{
this
.
setState
({
showToast
:
true
,
msg
:
'
此账户当前无课程
'
,
tipsIcon
:
require
(
'
../../images/common/info.png
'
)
});
}
}
getCurrentLessons
=
()
=>
{
getCurrentLessons
=
()
=>
{
Constants
.
get
(
Api
.
getCurrentLessons
)
Constants
.
get
(
Api
.
getCurrentLessons
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
...
@@ -659,29 +706,43 @@ export default class Index extends Component {
...
@@ -659,29 +706,43 @@ export default class Index extends Component {
render
()
{
render
()
{
return
(
return
(
<
View
style=
{
HomeStyle
.
warp
}
>
<
View
style=
{
HomeStyle
.
warp
}
>
<
Toast
onHide=
{
()
=>
{
this
.
setState
({
showToast
:
false
})
}
}
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
.
userI
Con
&&
this
.
state
.
userI
nfo
&&
<
Image
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
}
}
source=
{
this
.
state
.
userICon
}
/>
<
Image
resizeMode=
'cover'
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
borderRadius
:
50
}
}
source=
{
{
uri
:
this
.
state
.
userInfo
.
headImgUrl
}
}
/>
}
}
{
{
!
this
.
state
.
userI
Con
&&
!
this
.
state
.
userI
nfo
&&
<
View
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
backgroundColor
:
'
#999
'
,
borderRadius
:
50
}
}
></
View
>
<
View
style=
{
{
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
backgroundColor
:
'
#999
'
,
borderRadius
:
50
}
}
></
View
>
}
}
</
View
>
</
View
>
<
View
style=
{
HomeStyle
.
topLeftName
}
>
<
View
style=
{
{
marginBottom
:
Constants
.
unitWidth
*
12
}
}
><
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
20
}
}
>
某某某
</
Text
></
View
>
{
<
View
style=
{
{
display
:
'
flex
'
,
flexDirection
:
'
row
'
}
}
>
this
.
state
.
userInfo
&&
<
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
14
}
}
>
班级:
</
Text
>
<
View
style=
{
HomeStyle
.
topLeftName
}
>
<
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
14
}
}
>
枫华一班
</
Text
>
<
View
style=
{
{
marginBottom
:
Constants
.
unitWidth
*
8
}
}
><
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
18
}
}
>
{
this
.
state
.
userInfo
.
realName
}
</
Text
>
</
View
>
<
View
style=
{
{
display
:
'
flex
'
,
flexDirection
:
'
row
'
}
}
>
<
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
12
}
}
>
班级:
</
Text
>
<
Text
style=
{
{
color
:
'
#fff
'
,
fontSize
:
Constants
.
unitWidth
*
12
}
}
>
枫华一班
</
Text
>
</
View
>
</
View
>
</
View
>
</
View
>
}
<
View
style=
{
HomeStyle
.
topLeftSelClass
}
>
<
View
style=
{
HomeStyle
.
topLeftSelClass
}
>
<
Text
style=
{
{
color
:
'
#C44706
'
,
fontSize
:
Constants
.
unitWidth
*
1
8
}
}
>
枫华一班
</
Text
>
<
Text
style=
{
{
color
:
'
#C44706
'
,
fontSize
:
Constants
.
unitWidth
*
1
6
}
}
>
枫华一班
</
Text
>
<
Image
source=
{
require
(
'
../../images/common2201/d.png
'
)
}
style=
{
{
width
:
Constants
.
unitWidth
*
16
,
height
:
Constants
.
unitWidth
*
16
,
}
}
/>
<
Image
source=
{
require
(
'
../../images/common2201/d.png
'
)
}
style=
{
{
width
:
Constants
.
unitWidth
*
16
,
height
:
Constants
.
unitWidth
*
16
,
}
}
/>
</
View
>
</
View
>
</
View
>
</
View
>
...
@@ -691,46 +752,51 @@ export default class Index extends Component {
...
@@ -691,46 +752,51 @@ export default class Index extends Component {
</
View
>
</
View
>
<
View
style=
{
HomeStyle
.
mainView
}
>
<
View
style=
{
HomeStyle
.
mainView
}
>
<
View
onLayout=
{
(
event
)
=>
this
.
onLayoutfun
(
event
)
}
style=
{
HomeStyle
.
mainViewTop
}
>
<
View
onLayout=
{
(
event
)
=>
this
.
onLayoutfun
(
event
)
}
style=
{
HomeStyle
.
mainViewTop
}
>
{
{
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmView
,{
height
:
this
.
state
.
mainHeight
}]
}
>
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmView
,
{
height
:
this
.
state
.
mainHeight
}]
}
>
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmListView
,{
flex
:
0.655
,
"
flexDirection
"
:
'
row
'
,}]
}
>
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmListView
,
{
flex
:
0.655
,
"
flexDirection
"
:
'
row
'
,
}]
}
>
<
View
style=
{
{
height
:
'
100%
'
,
flex
:
45
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
paddingLeft
:
Constants
.
unitWidth
*
44
}
}
>
<
View
style=
{
{
height
:
'
100%
'
,
flex
:
45
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
paddingLeft
:
Constants
.
unitWidth
*
44
}
}
>
<
View
style=
{
{
flex
:
40
,
display
:
'
flex
'
,
justifyContent
:
'
flex-end
'
,}
}
>
<
View
style=
{
{
flex
:
40
,
display
:
'
flex
'
,
justifyContent
:
'
flex-end
'
,
}
}
>
<
Text
style=
{
{
fontSize
:
Constants
.
unitWidth
*
24
,
color
:
'
#C44706
'
,
fontWeight
:
'
bold
'
,}
}
>
智慧课堂
</
Text
>
<
Text
style=
{
{
fontSize
:
Constants
.
unitWidth
*
24
,
color
:
'
#C44706
'
,
fontWeight
:
'
bold
'
,
}
}
>
智慧课堂
</
Text
>
</
View
>
</
View
>
<
View
style=
{
{
flex
:
30
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,}
}
>
<
View
style=
{
{
flex
:
30
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
}
}
>
<
Text
style=
{
{
fontSize
:
Constants
.
unitWidth
*
16
,
color
:
'
#444444
'
}
}
>
数据实证 智能互动 即时反馈
</
Text
>
<
Text
style=
{
{
fontSize
:
Constants
.
unitWidth
*
16
,
color
:
'
#444444
'
}
}
>
数据实证 智能互动 即时反馈
</
Text
>
</
View
>
<
TouchableOpacity
onPress=
{
this
.
golive
}
style=
{
{
width
:
Constants
.
unitWidth
*
160
,
flex
:
48
,
}
}
>
<
Image
resizeMode=
'contain'
style=
{
{
maxWidth
:
'
100%
'
,
maxHeight
:
'
100%
'
}
}
source=
{
require
(
'
../../images/common2201/btn.png
'
)
}
/>
</
TouchableOpacity
>
</
View
>
</
View
>
<
View
style=
{
{
height
:
'
100%
'
,
flex
:
55
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}
}
>
<
View
style=
{
{
width
:
Constants
.
unitWidth
*
160
,
flex
:
48
,
}
}
>
<
Image
resizeMode=
'contain'
style=
{
{
width
:
'
75%
'
,
}
}
source=
{
require
(
'
../../images/common2201/ban.png
'
)
}
/>
<
Image
resizeMode=
'contain'
style=
{
{
maxWidth
:
'
100%
'
,
maxHeight
:
'
100%
'
}
}
source=
{
require
(
'
../../images/common2201/btn.png
'
)
}
/>
</
View
>
</
View
>
</
View
>
</
View
>
<
View
style=
{
{
height
:
'
100%
'
,
flex
:
55
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}
}
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
Image
resizeMode=
'contain'
style=
{
{
width
:
'
75%
'
,
}
}
source=
{
require
(
'
../../images/common2201/ban.png
'
)
}
/>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon1.png
'
)
}
/>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
课后作业
</
Text
>
</
View
>
</
View
>
</
View
>
</
View
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
}
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon1.png
'
)
}
/>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
课后作业
</
Text
>
</
View
>
</
View
>
}
</
View
>
</
View
>
<
View
style=
{
HomeStyle
.
mainViewBtm
}
>
<
View
style=
{
HomeStyle
.
mainViewBtm
}
>
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmView
,{
height
:
this
.
state
.
mainHeight
}]
}
>
<
View
style=
{
[
HomeStyle
.
mainViewTopBtmView
,
{
height
:
this
.
state
.
mainHeight
}]
}
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
TouchableOpacity
style=
{
HomeStyle
.
mainViewTopBtmListView
}
onPress=
{
()
=>
{
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon2.png
'
)
}
/>
this
.
props
.
navigation
.
navigate
(
'
webview
'
)
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
在线测试
</
Text
>
}
}
>
</
View
>
<
View
>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon2.png
'
)
}
/>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
在线测试
</
Text
>
</
View
>
</
TouchableOpacity
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon3.png
'
)
}
/>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon3.png
'
)
}
/>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
学情分析
</
Text
>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
学情分析
</
Text
>
</
View
>
</
View
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
View
style=
{
HomeStyle
.
mainViewTopBtmListView
}
>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon4.png
'
)
}
/>
<
Image
style=
{
HomeStyle
.
ListViewImg
}
source=
{
require
(
'
../../images/common2201/icon4.png
'
)
}
/>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
错题攻坚
</
Text
>
<
Text
style=
{
HomeStyle
.
ListViewText
}
>
错题攻坚
</
Text
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
...
...
src/home202201/home.css
deleted
100644 → 0
View file @
c380b669
src/home202201/home.css.ts
View file @
45077f31
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
}
from
'
react-native
'
;
}
from
'
react-native
'
;
import
Constants
from
'
../../Constants
'
;
import
Constants
from
'
../../Constants
'
;
let
HomeCSS
=
StyleSheet
.
create
({
let
HomeCSS
=
Constants
.
StyleSheet
.
create
({
warp
:
{
warp
:
{
"
width
"
:
'
100%
'
,
"
width
"
:
'
100%
'
,
"
height
"
:
'
100%
'
,
"
height
"
:
'
100%
'
,
...
...
src/live/Index.tsx
View file @
45077f31
...
@@ -216,6 +216,12 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -216,6 +216,12 @@ export default class Index extends Component<Props, State, HomeState, AppContext
showNetless
:
true
,
showNetless
:
true
,
showNetless2
:
true
showNetless2
:
true
});
});
// setTimeout(e=>{
// this.setState({
// showNetless:false,
// showNetless2: false
// });
// },3000)
}
}
let
teacherUid
=
0
;
let
teacherUid
=
0
;
let
teacherName
=
''
;
let
teacherName
=
''
;
...
@@ -368,16 +374,21 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -368,16 +374,21 @@ export default class Index extends Component<Props, State, HomeState, AppContext
);
);
}
}
componentWillUnmount
()
{
async
componentWillUnmount
()
{
await
this
.
context
.
client
.
leave
(
this
.
state
.
channelId
);
StatusBar
.
setHidden
(
true
)
// this.setState = (state,callback)=>{
// return;
// };
if
(
this
.
timer
)
{
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
clearTimeout
(
this
.
timer
);
}
}
WhiteBoardEngine
.
leaveRoom
().
then
((
e
)
=>
{
WhiteBoardEngine
.
leaveRoom
().
then
((
e
)
=>
{
// console.log('leave room ok', e);
// console.log('leave room ok', e);
WhiteBoardEngine
.
unInitEngine
().
then
(()
=>
{});
//
WhiteBoardEngine.unInitEngine().then(() => {});
});
});
this
.
logout
();
// await
this.logout();
this
.
endCall
();
// await
this.endCall();
}
}
getAgoraConfig
=
()
=>
{
getAgoraConfig
=
()
=>
{
...
@@ -385,7 +396,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -385,7 +396,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
// console.log(response);
// console.log(response);
return
response
.
json
();
return
response
.
json
();
})
})
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
'
getAgoraConfig
'
,
data
);
console
.
log
(
'
getAgoraConfig
'
,
data
);
if
(
data
.
memo
===
'
成功
'
)
{
if
(
data
.
memo
===
'
成功
'
)
{
...
@@ -403,6 +414,21 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -403,6 +414,21 @@ export default class Index extends Component<Props, State, HomeState, AppContext
* @description Function to initialize the Rtc Engine, attach event listeners and actions
* @description Function to initialize the Rtc Engine, attach event listeners and actions
*/
*/
init
=
async
()
=>
{
init
=
async
()
=>
{
console
.
log
(
'
initEngine
'
,
{
width
:
Constants
.
height
,
height
:
Constants
.
width
-
Constants
.
statusBarHeight
-
Constants
.
unitWidth
*
126
}
)
WhiteBoardEngine
.
initEngine
(
this
.
state
.
appIdentifier
,
{
width
:
Constants
.
height
,
height
:
Constants
.
width
-
Constants
.
statusBarHeight
-
Constants
.
unitWidth
*
126
}).
then
((
e
)
=>
{
console
.
log
(
'
init white engine ok 1
'
,
e
);
this
.
getNetlessToken
();
});
this
.
startCall
();
return
;
const
{
appId
}
=
this
.
state
;
const
{
appId
}
=
this
.
state
;
console
.
log
(
'
appid =
'
,
appId
);
console
.
log
(
'
appid =
'
,
appId
);
this
.
_engine
=
await
RtcEngine
.
create
(
appId
);
this
.
_engine
=
await
RtcEngine
.
create
(
appId
);
...
@@ -489,19 +515,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -489,19 +515,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
// this.checkConnection();
// this.checkConnection();
console
.
log
(
'
initEngine
'
,
{
width
:
Constants
.
height
,
height
:
Constants
.
width
-
Constants
.
statusBarHeight
-
Constants
.
unitWidth
*
126
}
)
WhiteBoardEngine
.
initEngine
(
this
.
state
.
appIdentifier
,
{
width
:
Constants
.
height
,
height
:
Constants
.
width
-
Constants
.
statusBarHeight
-
Constants
.
unitWidth
*
126
}).
then
((
e
)
=>
{
console
.
log
(
'
init white engine ok 1
'
,
e
);
this
.
getNetlessToken
();
});
this
.
startCall
();
//
//
// console.log('this._engine', this._engine);
// console.log('this._engine', this._engine);
// this.joinRTCChannel();
// this.joinRTCChannel();
...
@@ -1984,10 +1998,16 @@ export default class Index extends Component<Props, State, HomeState, AppContext
...
@@ -1984,10 +1998,16 @@ export default class Index extends Component<Props, State, HomeState, AppContext
paddingLeft
:
0
,
paddingLeft
:
0
,
paddingRight
:
0
,
paddingRight
:
0
,
}]
}
>
}]
}
>
<
StatusBar
hidden=
{
false
}
backgroundColor=
"#30323D"
barStyle=
"light-content"
/>
<
View
style=
{
{
<
View
style=
{
{
height
:
Constants
.
statusBarHeight
,
height
:
Constants
.
statusBarHeight
,
backgroundColor
:
'
#30323D
'
backgroundColor
:
'
#30323D
'
}
}
></
View
>
}
}
></
View
>
{
this
.
state
.
showLike
&&
<
Like
onAnimateEnded=
{
this
.
showLikeEnd
}
x=
{
this
.
state
.
likedX
}
y=
{
this
.
state
.
likedY
}
/>
}
{
this
.
state
.
showLike
&&
<
Like
onAnimateEnded=
{
this
.
showLikeEnd
}
x=
{
this
.
state
.
likedX
}
y=
{
this
.
state
.
likedY
}
/>
}
<
TouchableHighlight
style=
{
{
flex
:
1
}
}
onPress=
{
()
=>
{
<
TouchableHighlight
style=
{
{
flex
:
1
}
}
onPress=
{
()
=>
{
Keyboard
.
dismiss
();
Keyboard
.
dismiss
();
...
...
src/webview/Index.tsx
0 → 100644
View file @
45077f31
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
}
from
'
react-native
'
;
import
{
WebView
}
from
'
react-native-webview
'
;
import
Constants
from
'
../../Constants
'
;
export
default
class
MyWeb
extends
Component
{
static
navigationOptions
=
({
navigation
})
=>
({
title
:
`11111`
,
headerTitle
:
'
2222
'
});
static
navigationOptions
=
({
navigation
})
=>
{
return
{
header
:
null
,
headerBackTitle
:
'
'
}
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
uri
:
false
}
}
componentDidMount
()
{
Constants
.
readData
(
'
userInfo
'
).
then
((
userInfo
)
=>
{
if
(
userInfo
)
{
console
.
log
(
userInfo
)
userInfo
=
JSON
.
parse
(
userInfo
);
this
.
setState
({
uri
:
`http://121.36.221.250:8018/evaluation/teacher/#/?type=1&token=
${
'
PC_CREDIT_TOKEN:e89f941968e5474fae00d3148d061d1b
'
}
`
,
})
console
.
log
(
this
.
state
.
uri
)
}
})
}
render
()
{
return
(
<
View
style=
{
{
width
:
'
100%
'
,
height
:
'
100%
'
}
}
>
{
this
.
state
.
uri
&&
<
WebView
source=
{
{
uri
:
this
.
state
.
uri
}
}
style=
{
{
width
:
'
100%
'
,
height
:
'
100%
'
}
}
mixedContentMode=
'compatibility'
/>
}
</
View
>
);
}
}
\ No newline at end of file
yarn.lock
View file @
45077f31
...
@@ -2838,16 +2838,16 @@ escape-html@~1.0.3:
...
@@ -2838,16 +2838,16 @@ escape-html@~1.0.3:
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=
escape-string-regexp@^1.0.5:
escape-string-regexp@^1.0.5:
version "1.0.5"
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
escape-string-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=
escape-string-regexp@^4.0.0:
escape-string-regexp@^4.0.0:
version "4.0.0"
version "4.0.0"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
...
@@ -3766,7 +3766,7 @@ interpret@^1.0.0:
...
@@ -3766,7 +3766,7 @@ interpret@^1.0.0:
resolved "https://registry.nlark.com/interpret/download/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
resolved "https://registry.nlark.com/interpret/download/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
integrity sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=
integrity sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=
invariant@^2.2.4:
invariant@
2.2.4, invariant@
^2.2.4:
version "2.2.4"
version "2.2.4"
resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=
integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=
...
@@ -6176,6 +6176,14 @@ react-native-view-shot@^3.1.2:
...
@@ -6176,6 +6176,14 @@ react-native-view-shot@^3.1.2:
resolved "https://registry.npm.taobao.org/react-native-view-shot/download/react-native-view-shot-3.1.2.tgz#8c8e84c67a4bc8b603e697dbbd59dbc9b4f84825"
resolved "https://registry.npm.taobao.org/react-native-view-shot/download/react-native-view-shot-3.1.2.tgz#8c8e84c67a4bc8b603e697dbbd59dbc9b4f84825"
integrity sha1-jI6ExnpLyLYD5pfbvVnbybT4SCU=
integrity sha1-jI6ExnpLyLYD5pfbvVnbybT4SCU=
react-native-webview@^11.16.0:
version "11.16.0"
resolved "https://registry.npmmirror.com/react-native-webview/download/react-native-webview-11.16.0.tgz#51dce13480aa4f8f727307df05b8bfaf74ca3d14"
integrity sha512-yap3dO3adMQp4z5oDzlcgcv6XPsfHAtt1E3ort94GthrunswaZhL6AfMiDOsNnKQmlUA+o4LNJsnlAy1b10rUg==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
react-native-wheel-picker@^1.2.0:
react-native-wheel-picker@^1.2.0:
version "1.2.0"
version "1.2.0"
resolved "https://registry.nlark.com/react-native-wheel-picker/download/react-native-wheel-picker-1.2.0.tgz#0503e37b3326856724501679bdf5697e0dd247a6"
resolved "https://registry.nlark.com/react-native-wheel-picker/download/react-native-wheel-picker-1.2.0.tgz#0503e37b3326856724501679bdf5697e0dd247a6"
...
...
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