帖子
帖子
用户
博客
课程
12
返回列表 发新帖
16
帖子
0
勋章
76
Y币
yvmer336366 发表于 2017-10-24 11:35
刚才测试了下载图片,没有问题,你换个资源测试吧

试过了,用类似这个案例中的地址是可以正常显示的,function downloadOfApk(){
                api.download({
                        url: 'http://downloadpkg.apicloud.com/app/download?path=http://**.**1.z0.glb**.**/1164331e18d313f565f107b7d740a8c7_d',
                        savePath: 'fs://123.apk',
                        cache:false,
                        allowResume:false,
                        report:true
                }, function(ret, err) {
                        if(ret){
                                if(ret.state==0){
                                    api.toast({
                                        msg: "正在下载 " + ret.percent + "%",
                                        duration: 2000
                                        });
                                api.notification({
                                        notify: {
                                        content: "正在下载 " + ret.percent + "%",
                                        updateCurrent: true
                                        }
                                  }, function(ret, err) {
                                                api.cancelNotification({
                                                id: ret.id
                                                });
                                });
                      };
                     };
                   });
                };
16
帖子
0
勋章
76
Y币
gentmomo 发表于 2017-10-24 11:41
试过了,用类似这个案例中的地址是可以正常显示的,

function downloadOfApk(){
                api.download({
                        url: 'http://downloadpkg.apicloud.com/app/download?path=http://**.**1.z0.glb**.**/1164331e18d313f565f107b7d740a8c7_d',
                        savePath: 'fs://123.apk',
                        cache:false,
                        allowResume:false,
                        report:true
                }, function(ret, err) {
                        if(ret){
                                if(ret.state==0){
                                    api.toast({
                                        msg: "正在下载 " + ret.percent + "%",
                                        duration: 2000
                                        });
                                api.notification({
                                        notify: {
                                        content: "正在下载 " + ret.percent + "%",
                                        updateCurrent: true
                                        }
                                  }, function(ret, err) {
                                                api.cancelNotification({
                                                id: ret.id
                                                });
                                });
                      };
                     };
                   });
                };
16
帖子
0
勋章
76
Y币
yvmer336366 发表于 2017-10-24 11:35
刚才测试了下载图片,没有问题,你换个资源测试吧

function downloadOfApk(){
                api.download({
                        url: 'http://downloadpkg.apicloud.com/app/download?path=http://**.**1.z0.glb**.**/1164331e18d313f565f107b7d740a8c7_d',
                        savePath: 'fs://123.apk',
                        cache:false,
                        allowResume:false,
                        report:true
                }, function(ret, err) {
                        if(ret){
                                if(ret.state==0){
                                    api.toast({
                                        msg: "正在下载 " + ret.percent + "%",
                                        duration: 2000
                                        });
                                api.notification({
                                        notify: {
                                        content: "正在下载 " + ret.percent + "%",
                                        updateCurrent: true
                                        }
                                  }, function(ret, err) {
                                                api.cancelNotification({
                                                id: ret.id
                                                });
                                });
                      };
                     };
                   });
                };
5
帖子
0
勋章
3339
Y币
gentmomo 发表于 2017-10-24 11:41
试过了,用类似这个案例中的地址是可以正常显示的,function downloadOfApk(){
                api.downl ...

那就是那个资源路径有问题
12
您需要登录后才可以回帖 登录

本版积分规则