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
Expand all
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 @@
android:label=
"@string/app_name"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode=
"singleTask"
android:screenOrientation=
'landscape'
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
android/app/src/main/res/values/strings.xml
View file @
45077f31
<resources>
<string
name=
"app_name"
>
fenghua_student_client
</string>
<string
name=
"app_name"
>
枫华学生端
</string>
</resources>
css/Login.css.ts
View file @
45077f31
...
...
@@ -77,10 +77,12 @@ var LoginCSS = StyleSheet.create(
marginTop
:
Constants
.
unitWidth
*
20
,
},
rememberLeft
:
{
flex
:
1
,
flex
:
2
,
height
:
Constants
.
unitWidth
*
25
,
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
alignItems
:
'
center
'
,
justifyContent
:
'
flex-start
'
,
// width:Constants.unitWidth * 250
},
rememberTxt
:
{
fontFamily
:
'
PingFangSC-Regular
'
,
...
...
src/components/Login.tsx
View file @
45077f31
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 LinearGradient from 'react-native-linear-gradient';
import
Button
from
'
react-native-button
'
;
...
...
@@ -142,6 +142,7 @@ export default class Login extends Component {
}
login
=
()
=>
{
// alert(1)
if
(
this
.
state
.
loginType
===
'
code
'
)
{
this
.
loginWithCode
();
}
else
{
...
...
@@ -185,7 +186,8 @@ export default class Login extends Component {
DeviceEventEmitter
.
emit
(
'
showLogin
'
,
{
showLogin
:
false
});
this
.
props
.
navigation
.
goBack
();
// this.props.navigation.goBack();
this
.
props
.
navigation
.
navigate
(
'
HomeIndex
'
)
},
1000
);
}
else
{
this
.
setState
({
...
...
@@ -297,7 +299,7 @@ export default class Login extends Component {
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
areaNo
}
>
+86
</
Text
>
</
View
>
<
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=
"请输入手机号"
style=
{
LoginCSS
.
mobile
}
onChangeText=
{
(
text
)
=>
{
this
.
setState
({
...
...
@@ -381,22 +383,27 @@ export default class Login extends Component {
/>
</
View
>
<
View
style=
{
LoginCSS
.
rememberWrapper
}
>
<
Button
containerStyle=
{
{
flex
:
1
<
Button
style=
{
LoginCSS
.
rememberLeft
}
containerStyle=
{
{
flex
:
1
,
flexDirection
:
'
row
'
,
justifyContent
:
'
flex-start
'
,
}
}
onPress=
{
()
=>
{
Constants
.
storeData
(
'
rememberPwd
'
,
!
this
.
state
.
rememberPwd
?
'
1
'
:
'
0
'
);
this
.
setState
({
rememberPwd
:
!
this
.
state
.
rememberPwd
});
}
}
>
<
View
style=
{
LoginCSS
.
rememberLeft
}
>
<
View
>
<
Image
style=
{
{
width
:
Constants
.
unitWidth
*
20
,
height
:
Constants
.
unitWidth
*
20
,
}
}
source=
{
this
.
state
.
rememberPwd
?
require
(
'
../../images/common/checkbox-checked.png
'
)
:
require
(
'
../../images/common/checkbox.png
'
)
}
/>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
rememberTxt
}
>
记住密码
</
Text
>
</
View
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
rememberTxt
}
>
记住密码
</
Text
>
</
Button
>
<
Button
containerStyle=
{
{
flex
:
1
,
...
...
@@ -410,11 +417,11 @@ export default class Login extends Component {
</
View
>
</
View
>
}
<
Button
onPress=
{
this
.
login
}
>
<
TouchableOpacity
onPress=
{
this
.
login
}
>
<
View
style=
{
[
LoginCSS
.
loginWrapper
,
PublicCSS
.
centerAll
]
}
>
<
Text
allowFontScaling=
{
false
}
style=
{
LoginCSS
.
loginTxt
}
>
登录
</
Text
>
</
View
>
</
Button
>
</
TouchableOpacity
>
</
View
>
</
TouchableHighlight
>
</
KeyboardAwareScrollView
>
...
...
src/home202201/Index.tsx
View file @
45077f31
This diff is collapsed.
Click to expand it.
src/home202201/home.css
deleted
100644 → 0
View file @
c380b669
src/home202201/home.css.ts
View file @
45077f31
...
...
@@ -5,7 +5,7 @@ import {
}
from
'
react-native
'
;
import
Constants
from
'
../../Constants
'
;
let
HomeCSS
=
StyleSheet
.
create
({
let
HomeCSS
=
Constants
.
StyleSheet
.
create
({
warp
:
{
"
width
"
:
'
100%
'
,
"
height
"
:
'
100%
'
,
...
...
src/live/Index.tsx
View file @
45077f31
...
...
@@ -216,6 +216,12 @@ export default class Index extends Component<Props, State, HomeState, AppContext
showNetless
:
true
,
showNetless2
:
true
});
// setTimeout(e=>{
// this.setState({
// showNetless:false,
// showNetless2: false
// });
// },3000)
}
let
teacherUid
=
0
;
let
teacherName
=
''
;
...
...
@@ -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
)
{
clearTimeout
(
this
.
timer
);
}
WhiteBoardEngine
.
leaveRoom
().
then
((
e
)
=>
{
// console.log('leave room ok', e);
WhiteBoardEngine
.
unInitEngine
().
then
(()
=>
{});
//
WhiteBoardEngine.unInitEngine().then(() => {});
});
this
.
logout
();
this
.
endCall
();
// await
this.logout();
// await
this.endCall();
}
getAgoraConfig
=
()
=>
{
...
...
@@ -385,7 +396,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
.
then
((
response
)
=>
{
// console.log(response);
return
response
.
json
();
})
})
.
then
(
data
=>
{
console
.
log
(
'
getAgoraConfig
'
,
data
);
if
(
data
.
memo
===
'
成功
'
)
{
...
...
@@ -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
*/
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
;
console
.
log
(
'
appid =
'
,
appId
);
this
.
_engine
=
await
RtcEngine
.
create
(
appId
);
...
...
@@ -489,19 +515,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
// 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);
// this.joinRTCChannel();
...
...
@@ -1984,10 +1998,16 @@ export default class Index extends Component<Props, State, HomeState, AppContext
paddingLeft
:
0
,
paddingRight
:
0
,
}]
}
>
<
StatusBar
hidden=
{
false
}
backgroundColor=
"#30323D"
barStyle=
"light-content"
/>
<
View
style=
{
{
height
:
Constants
.
statusBarHeight
,
backgroundColor
:
'
#30323D
'
}
}
></
View
>
{
this
.
state
.
showLike
&&
<
Like
onAnimateEnded=
{
this
.
showLikeEnd
}
x=
{
this
.
state
.
likedX
}
y=
{
this
.
state
.
likedY
}
/>
}
<
TouchableHighlight
style=
{
{
flex
:
1
}
}
onPress=
{
()
=>
{
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:
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
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:
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
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:
version "4.0.0"
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:
resolved "https://registry.nlark.com/interpret/download/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
integrity sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=
invariant@^2.2.4:
invariant@
2.2.4, invariant@
^2.2.4:
version "2.2.4"
resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=
...
...
@@ -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"
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:
version "1.2.0"
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