Commit fde2015a by huangzhicong

更新README

parent 4a5ef979
```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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment