Browse Source

IPU标准版:整理getQrCodePhotoViaCamera、getQrCodePhotoViaLibrary插件

liufl5 3 years ago
parent
commit
888753fc58

+ 16 - 0
IPUMobileFunc/IPUMobileFunc/Camera/IPUCameraPlugin.h

34
*/
34
*/
35
- (void)playVideo:(NSArray *)param;
35
- (void)playVideo:(NSArray *)param;
36
36
37
#pragma mark - 二维码相关
38
/**
39
 拍照获取包含二维码的照片
40
 @param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
41
 {"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
42
 callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
43
 */
44
- (void)getQrCodePhotoViaCamera:(NSArray *)param;
45
/**
46
 通过相册获取包含二维码的照片
47
 @param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
48
 {"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
49
 callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
50
 */
51
- (void)getQrCodePhotoViaLibrary:(NSArray *)param;
52
37
@end
53
@end

+ 12 - 8
IPUMobileFunc/IPUMobileFunc/Camera/IPUCameraPlugin.m

293
293
294
294
295
#pragma mark - 二维码相关
295
#pragma mark - 二维码相关
296
/// 拍照获取包含二维码的照片
297
/// @param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
298
/// {"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
299
/// callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
296
/**
297
拍照获取包含二维码的照片
298
@param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
299
{"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
300
callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
301
*/
300
- (void)getQrCodePhotoViaCamera:(NSArray *)param {
302
- (void)getQrCodePhotoViaCamera:(NSArray *)param {
301
    [self getQrCodePhoto:param type:UIImagePickerControllerSourceTypeCamera];
303
    [self getQrCodePhoto:param type:UIImagePickerControllerSourceTypeCamera];
302
}
304
}
303
305
304
/// 通过相册获取包含二维码的照片
305
/// @param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
306
/// {"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
307
/// callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
306
/**
307
通过相册获取包含二维码的照片
308
@param param 压缩参数,可选,不传则返回图片路径以及不对图片进行压缩
309
{"base64" : "返回图片形式,0:图片路径, 1: base64", "length" : "照片大小,单位B,如400 * 1024", "width" : "照片最小宽度,如300"}
310
callback: {"result" : "图片base64编码或者路径", "qrcodes" : ["图片中所含二维码检测结果,如无二维码则为空字符串"]}
311
*/
308
- (void)getQrCodePhotoViaLibrary:(NSArray *)param {
312
- (void)getQrCodePhotoViaLibrary:(NSArray *)param {
309
    [self getQrCodePhoto:param type:UIImagePickerControllerSourceTypePhotoLibrary];
313
    [self getQrCodePhoto:param type:UIImagePickerControllerSourceTypePhotoLibrary];
310
}
314
}

+ 0 - 1
display-center/Res/config/mobile-action.xml

52
    
52
    
53
    <action name="getQrCodePhotoViaCamera"  class="IPUCameraPlugin" method="getQrCodePhotoViaCamera"/>
53
    <action name="getQrCodePhotoViaCamera"  class="IPUCameraPlugin" method="getQrCodePhotoViaCamera"/>
54
    <action name="getQrCodePhotoViaLibrary" class="IPUCameraPlugin" method="getQrCodePhotoViaLibrary"/>
54
    <action name="getQrCodePhotoViaLibrary" class="IPUCameraPlugin" method="getQrCodePhotoViaLibrary"/>
55
56
    <action name="scanSingle"   class="IPUQRCodePlugin" method="scanSingle"/>
55
    <action name="scanSingle"   class="IPUQRCodePlugin" method="scanSingle"/>
57
    <action name="scanQrCode"   class="IPUQRCodePlugin" method="scanSingle"/>
56
    <action name="scanQrCode"   class="IPUQRCodePlugin" method="scanSingle"/>
58
    <action name="scanMultiple" class="IPUQRCodePlugin" method="scanMultiple"/>
57
    <action name="scanMultiple" class="IPUQRCodePlugin" method="scanMultiple"/>

BIN
display-center/display-center.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate