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
e2b7b1e1
Commit
e2b7b1e1
authored
Nov 30, 2022
by
zhangkaixuan11
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 url
parent
75892cf9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
521 additions
and
525 deletions
+521
-525
Api.tsx
Api.tsx
+9
-9
Constants.js
Constants.js
+2
-14
android/app/release/output-metadata.json
android/app/release/output-metadata.json
+1
-1
android/app/src/main/assets/index.android.bundle
android/app/src/main/assets/index.android.bundle
+496
-497
css/Login.css.ts
css/Login.css.ts
+5
-0
src/components/Login.tsx
src/components/Login.tsx
+8
-4
No files found.
Api.tsx
View file @
e2b7b1e1
...
...
@@ -36,23 +36,23 @@ export default {
}
},
getAgoraConfig
:
{
host
:
Constants
.
apiPath
+
'
/clazz/agora/config
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/agora/config
'
,
params
:
{}
},
getCurrentLessons
:
{
host
:
Constants
.
apiPath
+
'
/clazz/student/schedule/current
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/student/schedule/current
'
,
params
:
{
}
},
getRTCToken
:
(
params
)
=>
{
return
{
host
:
Constants
.
apiPath
+
'
/clazz/agora/rtctoken
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/agora/rtctoken
'
,
params
:
params
}
},
getRTMToken
:
(
params
)
=>
{
return
{
host
:
Constants
.
apiPath
+
'
/clazz/agora/rtmtoken
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/agora/rtmtoken
'
,
params
:
params
}
},
...
...
@@ -70,7 +70,7 @@ export default {
},
getNetlessToken
:
(
params
)
=>
{
return
{
host
:
Constants
.
apiPath
+
'
/clazz/agora/roomtoken
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/agora/roomtoken
'
,
params
:
params
}
},
...
...
@@ -163,25 +163,25 @@ export default {
},
sendLessonActivityInOut
:(
params
)
=>
{
// 进出教室
return
{
host
:
Constants
.
apiPath
+
'
/clazz/record/sendLessonActivityInOut
'
,
host
:
Constants
.
apiPath
+
'
/clazz
app
/record/sendLessonActivityInOut
'
,
params
:
params
}
},
studentListHomework
:(
params
)
=>
{
// 作业列表
return
{
host
:
Constants
.
apiPath
+
'
/eval/student/listHomework
'
,
host
:
Constants
.
apiPath
+
'
/eval
app
/student/listHomework
'
,
params
:
params
}
},
submitMediaHomework
:(
params
)
=>
{
// 提交图文作业
return
{
host
:
Constants
.
apiPath
+
'
/eval/student/submitMediaHomework
'
,
host
:
Constants
.
apiPath
+
'
/eval
app
/student/submitMediaHomework
'
,
params
:
params
}
},
stuGetMediaHomeworkDetail
:(
id
)
=>
{
// 图文作业详情
return
{
host
:
Constants
.
apiPath
+
'
/eval/student/stuGetMediaHomeworkDetail/
'
+
id
,
host
:
Constants
.
apiPath
+
'
/eval
app
/student/stuGetMediaHomeworkDetail/
'
+
id
,
params
:
{}
}
},
...
...
Constants.js
View file @
e2b7b1e1
...
...
@@ -50,8 +50,8 @@ console.log(screenWidth, screenHeight, unitWidth, 'unitWidth');
let
constantsd
=
{
// apiPath: 'http://121.36.221.250:3001/mock/11',
apiPath
:
'
https://gateway.chamning.com
'
,
// apiPath: 'http://121.36.221.250:80
60',
//
apiPath: 'https://gateway.chamning.com',
apiPath
:
'
http://121.36.221.250:81
60
'
,
imgPath
:
''
,
StyleSheet
,
token
:
''
,
...
...
@@ -143,7 +143,6 @@ let constantsd = {
method
:
'
GET
'
,
headers
:
{
token
:
this
.
token
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
});
},
...
...
@@ -156,7 +155,6 @@ let constantsd = {
credentials
:
'
include
'
,
headers
:
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
this
.
getParam
(
data
),
});
...
...
@@ -172,7 +170,6 @@ let constantsd = {
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
apptype
:
'
ipad
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -187,7 +184,6 @@ let constantsd = {
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
apptype
:
'
ipad
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -202,7 +198,6 @@ let constantsd = {
credentials
:
'
include
'
,
headers
:
{
token
:
this
.
token
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
this
.
getParam
(
data
),
});
...
...
@@ -217,7 +212,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
'
Content-Type
'
:
'
application/json
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -233,7 +227,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
'
Content-Type
'
:
'
application/json
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -249,7 +242,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
'
Content-Type
'
:
'
application/json
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -264,7 +256,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
'
Content-Type
'
:
'
application/json
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
JSON
.
stringify
(
data
),
});
...
...
@@ -302,7 +293,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
// 'Content-Type': 'multipart/form-data',
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
formData
,
});
...
...
@@ -327,7 +317,6 @@ let constantsd = {
headers
:
{
token
:
this
.
token
,
'
Content-Type
'
:
'
multipart/form-data
'
,
tenant
:
'
szVdW4usayB486MYV8U
'
},
body
:
formData
,
});
...
...
@@ -348,7 +337,6 @@ let fetchCom = async (url,obj)=>{
obj
.
headers
=
{
...
obj
.
headers
,
token
:
constantsd
.
token
,
tenant
:
'
szVdW4usayB486MYV8U
'
}
console
.
log
(
'
obj.headers obj.headers
'
,
obj
.
headers
)
let
res
=
await
fetch
(
url
,
obj
)
...
...
android/app/release/output-metadata.json
View file @
e2b7b1e1
...
...
@@ -11,7 +11,7 @@
"type"
:
"SINGLE"
,
"filters"
:
[],
"versionCode"
:
1
,
"versionName"
:
"
1.0
"
,
"versionName"
:
"
0.3.2
"
,
"outputFile"
:
"app-release.apk"
}
]
...
...
android/app/src/main/assets/index.android.bundle
View file @
e2b7b1e1
This diff is collapsed.
Click to expand it.
css/Login.css.ts
View file @
e2b7b1e1
...
...
@@ -19,6 +19,11 @@ var LoginCSS = StyleSheet.create(
width
:
Constants
.
unitWidth
*
226
,
height
:
Constants
.
unitWidth
*
46
,
},
logoText
:{
color
:
'
#f9ae2b
'
,
fontSize
:
Constants
.
baseFontSize
*
2
,
height
:
Constants
.
unitWidth
*
46
,
},
tabWrapper
:
{
flexDirection
:
'
row
'
,
marginTop
:
Constants
.
unitWidth
*
60
...
...
src/components/Login.tsx
View file @
e2b7b1e1
...
...
@@ -16,7 +16,7 @@ import md5 from 'js-md5';
import
RNFetchBlob
from
'
rn-fetch-blob
'
;
import
DeviceInfo
from
'
react-native-device-info
'
;
import
semver
from
'
semver
'
cons
t
appVersion
=
DeviceInfo
.
getVersion
();
le
t
appVersion
=
DeviceInfo
.
getVersion
();
// console.log(semver,'RNFetchBlobRNFetchBlobRNFetchBlob')
console
.
log
(
NativeModules
.
upgrade
,
'
NativeModulesNativeModules
'
)
export
default
class
Login
extends
Component
{
...
...
@@ -181,6 +181,7 @@ export default class Login extends Component {
return
response
.
json
()
}).
then
(
res
=>
{
console
.
log
(
res
)
appVersion
=
'
0.3.0
'
let
shouldUpdate
=
semver
.
gt
(
res
.
data
.
version
,
appVersion
)
if
(
shouldUpdate
)
{
Alert
.
alert
(
'
发现新版本
'
,
'
是否下载
'
,
...
...
@@ -202,7 +203,7 @@ export default class Login extends Component {
}
})
}
else
{
this
.
loginWithPassword
();
}
return
;
...
...
@@ -383,7 +384,8 @@ export default class Login extends Component {
Keyboard
.
dismiss
();
}
}
underlayColor=
"rgba(255, 255, 255, 0)"
activeOpacity=
{
1
}
>
<
View
style=
{
LoginCSS
.
wrapper
}
>
<
Image
style=
{
LoginCSS
.
logo
}
source=
{
require
(
'
../../images/common/logo.png
'
)
}
/>
{
/* <Image style={LoginCSS.logo} source={require('../../images/common/logo.png')} /> */
}
<
Text
style=
{
LoginCSS
.
logoText
}
>
畅凝智慧课堂
</
Text
>
<
View
style=
{
LoginCSS
.
tabWrapper
}
>
{
/* <Button onPress={() => {
this.setState({
...
...
@@ -425,7 +427,9 @@ export default class Login extends Component {
</
View
>
{
/* <Image source={require('../../images/common/jiantouba.png')} style={LoginCSS.jiantou}/> */
}
<
TextInput
maxLength=
{
11
}
allowFontScaling=
{
false
}
placeholderTextColor=
"#919191"
placeholder=
"请输入学号v0.3.1"
autoComplete=
"tel"
keyboardType=
"number-pad"
placeholderTextColor=
"#919191"
placeholder=
"请输入手机号v0.3.1"
style=
{
LoginCSS
.
mobile
}
onChangeText=
{
(
text
)
=>
{
this
.
setState
({
mobile
:
text
...
...
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