1.安装插件后,调用相应的方法,在iOS端不显示,根据在safari上调试,提示 “Not allowed to load local resource: file:///var/mobile/Containers/Data/Application/48F48A60-A3B7-4654-B49B-CB08B378192A/tmp/cdv_photo_007.jpg” 这样的错误。
2.根据网上相关提示的相关方法,已经在config.xml中做了相关的白名单配置,如下:
<access origin='*' allows-arbitrary-loads-for-media='true' allows-arbitrary-loads-in-web-content='true' allows-local-networking='true' />
在index.html中做了如下配置:<meta http-equiv="Content-Security-Policy" content="img-src * 'self' data: blob: cdvphotolibrary: filesystem: cdvfile:">。但是问题依然未解决,哪位大神求告知。
3.相关代码如下:
js: window.imagePicker.getPictures(
function(results) {
$scope.imageArr = results;
console.log($scope.imgArr);
$scope.$apply();
}, function (error) {
console.log('错误信息为: ' + error);
},{
maximumImagesCount: 9,
width:100,
height:100,
quality:50
}
);
html: <div class="item" ng-repeat="image in imageArr">
<img ng-src="{{image}}" style="width: 120px;height: 120px;margin-left:calc(50% - 60px);"/>
</div>
请问这个问题你解决了吗