Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
IBMS
/
nativeview
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fde2015a
authored
Feb 23, 2022
by
huangzhicong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新README
parent
4a5ef979
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
README.md
+4
-2
No files found.
README.md
View file @
fde2015a
```javascript
/// 选择图片
/// 返回格式为
///
{ uri: '', base64: '' }
///
[{ uri: '', base64: '' }, { uri: '', base64: '' }, ...]
async function pickerPhoto() {
try {
const res = await jssdk.pickerPhoto();
// 参数为允许选择图片数量(最多允许选择9张图片)
const res = await jssdk.pickerPhoto(1);
document.getElementById('img').src = res.base64;
} catch (error) {
console.error(error);
...
...
@@ -28,6 +29,7 @@ async function takePhotos() {
/// { uri: '', base64: '' }
async function startRecordAudio() {
try {
// 参数为最长录音限制时间(单位: 秒,最大2分钟)
const res = await jssdk.startRecordAudio(30);
alert(res);
document.getElementById('audio').src = res.base64;
...
...
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