uniapp集成了原生组件,原生组件拍照后得到了Uiimage,我把uiimage,base64编码后,在uniapp中不显示,```javascript
贴上iOS代码:
//base64方法
- (NSString *)imageToString:(UIImage *)image
{
NSData *imagedata = UIImagePNGRepresentation(image);
NSString *image64 = [imagedata base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithCarriageReturn];
return image64;
}
0 个回复