|
function takePhoto(type) {
var param = {
sourceType: type==1 ? 'camera' : 'library', //'album',
encodingType: 'jpg',
mediaValue: 'pic',//'video',
destinationType: 'url',//'base64',
//targetWidth:300,
//targetHeight:300,
allowEdit: true
};
if(type == 1) {
param.quality = 50;
param.saveToPhotoAlbum = false;
}
api.getPicture(param, function(ret, err){
if (ret && ret.data) {
showPhotos([ret.data]);
};
});
}
showPhotos 是html上的操作,在 HTC 和小米上都没问题。
|
|