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
9ecb1ed1
Commit
9ecb1ed1
authored
Nov 10, 2022
by
zhangkaixuan11
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传修改下
parent
ef987fbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
src/homework/doHomeworkWithImg/index.tsx
src/homework/doHomeworkWithImg/index.tsx
+17
-3
No files found.
src/homework/doHomeworkWithImg/index.tsx
View file @
9ecb1ed1
...
...
@@ -9,6 +9,7 @@ import Sound from 'react-native-sound';
import
RNFS
from
'
react-native-fs
'
;
import
Api
from
'
../../../Api
'
;
import
ImagePicker
from
'
react-native-image-crop-picker
'
;
import
DocumentPicker
from
'
react-native-document-picker
'
;
import
Icon
from
'
react-native-vector-icons/AntDesign
'
;
import
SoundScreen
from
'
./vudioCom
'
...
...
@@ -504,9 +505,22 @@ export default class Index extends Component {
try
{
let
res
;
if
(
type
==
'
image
'
)
{
res
=
await
DocumentPicker
.
pick
({
type
:
[
DocumentPicker
.
types
.
images
,],
});
// res = await DocumentPicker.pick({
// type: [DocumentPicker.types.images,],
// });
res
=
await
ImagePicker
.
openPicker
({
cropping
:
false
,
multiple
:
true
,
maxFiles
:
1
,
loadingLabelText
:
"
正在获取图片
"
,
compressImageQuality
:
0.6
,
forceJpg
:
true
,
mediaType
:
'
photo
'
,
cropperToolbarTitle
:
"
裁剪
"
,
// cropperChooseText: "hello"
})
console
.
log
(
res
,
'
2323232
'
)
return
;
}
else
{
res
=
await
DocumentPicker
.
pick
({
type
:
[
DocumentPicker
.
types
.
doc
,
DocumentPicker
.
types
.
docx
,
DocumentPicker
.
types
.
pdf
,
DocumentPicker
.
types
.
ppt
,
...
...
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