提交 334ae9a6 编写于 作者: Q qiang

chore: lint

上级 b6d25351
...@@ -19,7 +19,7 @@ import { ...@@ -19,7 +19,7 @@ import {
* @param {string} filePath 文件路径 * @param {string} filePath 文件路径
* @returns {Promise} 文件信息Promise * @returns {Promise} 文件信息Promise
*/ */
function getFileInfo(filePath) { function getFileInfo (filePath) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
plus.io.resolveLocalFileSystemURL(filePath, function (entry) { plus.io.resolveLocalFileSystemURL(filePath, function (entry) {
entry.getMetadata(resolve, reject, false) entry.getMetadata(resolve, reject, false)
...@@ -27,7 +27,7 @@ function getFileInfo(filePath) { ...@@ -27,7 +27,7 @@ function getFileInfo(filePath) {
}) })
} }
export function chooseImage({ export function chooseImage ({
count, count,
sizeType, sizeType,
sourceType, sourceType,
...@@ -35,7 +35,7 @@ export function chooseImage({ ...@@ -35,7 +35,7 @@ export function chooseImage({
} = {}, callbackId) { } = {}, callbackId) {
const errorCallback = warpPlusErrorCallback(callbackId, 'chooseImage', 'cancel') const errorCallback = warpPlusErrorCallback(callbackId, 'chooseImage', 'cancel')
function successCallback(paths) { function successCallback (paths) {
const tempFiles = [] const tempFiles = []
const tempFilePaths = [] const tempFilePaths = []
// plus.zip.compressImage 压缩文件并发调用在iOS端容易出现问题(图像错误、闪退),改为队列执行 // plus.zip.compressImage 压缩文件并发调用在iOS端容易出现问题(图像错误、闪退),改为队列执行
...@@ -56,17 +56,17 @@ export function chooseImage({ ...@@ -56,17 +56,17 @@ export function chooseImage({
.catch(errorCallback) .catch(errorCallback)
} }
function openCamera() { function openCamera () {
const camera = plus.camera.getCamera() const camera = plus.camera.getCamera()
camera.captureImage(path => successCallback([path]), camera.captureImage(path => successCallback([path]),
errorCallback, { errorCallback, {
filename: TEMP_PATH + '/camera/', filename: TEMP_PATH + '/camera/',
resolution: 'high', resolution: 'high',
crop crop
}) })
} }
function openAlbum() { function openAlbum () {
plus.gallery.pick(({ files }) => successCallback(files), errorCallback, { plus.gallery.pick(({ files }) => successCallback(files), errorCallback, {
maximum: count, maximum: count,
multiple: true, multiple: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册