PhoneGap中文网

标题: ionic解压 [打印本页]

作者: lyzml    时间: 2016-7-18 14:07
标题: ionic解压
$scope.unZipFile = function () {
            var src = cordova.file.externalDataDirectory+"11.zip";
            var dest = cordova.file.externalDataDirectory+"ldjc";

            //var src = "http://127.0.0.1:8080/ionic/testfiles/11.zip";
            //var dest = "http://127.0.0.1:8080/ionic/testfiles/";
            $cordovaZip.unzip(
                    src,
                    dest
            ).then(function () {
                console.log('success');
                $scope.succMsg = "success";
            }, function (err) {
                console.log('error');
                $scope.errMsg = "error:"+err;
            }, function (progressEvent) {
                // https://github.com/MobileChromeApps/zip#usage
                $scope.downloadProgress = progressEvent;
            });

        };


使用cordova-plugin-zip插件解压文件,总是失败,不知道什么原因,有没有哪位大神使用过




欢迎光临 PhoneGap中文网 (http://bbs.phonegap100.com/) Powered by Discuz! X3.2