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
03c39260
authored
Feb 21, 2022
by
huangzhicong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加README文件
parent
608ebbf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
166 additions
and
0 deletions
+166
-0
README.md
+166
-0
No files found.
README.md
0 → 100644
View file @
03c39260
### 图片选择
```
javascript
function
selectPhoto
({
// uri: 图片在设备中的协议地址
// base64: 图片的base64编码
success
:
function
(
uri
,
base64
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 拍摄
```
javascript
function
openCamera
({
// uri: 图片在设备中的协议地址
// base64: 图片的base64编码
success
:
function
(
uri
,
base64
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 图片裁剪
```
javascript
// srcUri: 待裁剪图片在设备中的协议地址,直接传递selectPhoto、openCamera方法success中返回的uri即可
function
cropPhoto
(
srcUri
,
{
// uri: 图片在设备中的协议地址
// base64: 图片的base64编码
success
:
function
(
uri
,
base64
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 音频录制
```
javascript
// maxDuration: 录音限制时长(单位: 秒),sdk限制最大为5分钟
function
recordAudio
(
maxDuration
,
{
// uri: 音频在设备中的协议地址
// base64: 音频的base64编码
success
:
function
(
uri
,
base64
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 视频录制
```
javascript
function
captureVideo
({
// uri: 视频在设备中的协议地址
// base64: 视频的base64编码
success
:
function
(
uri
,
base64
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 扫描二维码
```
javascript
function
qrcode
({
// content: 二维码被识别后的字符串
success
:
function
(
content
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 保存字符串到本地
```
javascript
// key: 字符串所关联的key,要求为字符串类型
// value: 要保存的字符串
function
storageValue
(
key
,
value
,
{
// key: 字符串所关联的key
// value: 要保存的字符串
success
:
function
(
key
,
value
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 获取本地字符串
```
javascript
// key: 要获取的字符串所关联的key,要求为字符串类型
function
acquireValue
(
key
,
{
// key: 字符串所关联的key
// value: 要保存的字符串
success
:
function
(
key
,
value
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
### 清除保存的字符串
```
javascript
// key: 要清除的字符串所关联的key,要求为字符串类型
function
clearValue
(
key
,
{
// key: 字符串所关联的key
// value: 要保存的字符串
success
:
function
(
key
,
value
)
{
},
failed
:
function
()
{
},
complete
:
function
()
{
}
})
```
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