uni-app ios系统app端 uni.canvasToTempFilePath显示空白

uni-app ios系统app端 uni.canvasToTempFilePath显示空白

项目 内容
产品分类 uniapp/App
PC开发环境操作系统 Windows
PC开发环境操作系统版本号 MD
HBuilderX类型 正式
HBuilderX版本号 3.3.9
手机系统 iOS
手机系统版本号 iOS 14
手机厂商 苹果
手机机型 苹果
页面类型 vue
vue版本 vue2
打包方式 云端
项目创建方式 HBuilderX

bug描述:

uni.canvasToTempFilePath 在苹果手机上分享出去显示空白,安卓机正常显示。都是app端。

示例代码:

uni.canvasToTempFilePath({  
    x: -15,  
    y: -15,  
    width: 750,  
    height: 1116,  
    destWidth: 375,  
    destHeight: 558,  
    fileType: 'jpg',  
    quality: 1,  
    canvasId: 'canvasGift',  
    success: function(res) {  
        $this.tempFilePath = res.tempFilePath  
        console.log(res)  
    },  
    fail(res) {  
        console.log(res);  
    }  
})

操作步骤:

uni.canvasToTempFilePath({  
    x: -15,  
    y: -15,  
    width: 750,  
    height: 1116,  
    destWidth: 375,  
    destHeight: 558,  
    fileType: 'jpg',  
    quality: 1,  
    canvasId: 'canvasGift',  
    success: function(res) {  
        $this.tempFilePath = res.tempFilePath  
        console.log(res)  
    },  
    fail(res) {  
        console.log(res);  
    }  
})

更多关于uni-app ios系统app端 uni.canvasToTempFilePath显示空白的实战教程也可以访问 https://www.itying.com/category-93-b0.html

1 回复

更多关于uni-app ios系统app端 uni.canvasToTempFilePath显示空白的实战教程也可以访问 https://www.itying.com/category-93-b0.html


ios x,y设置为负数会有问题

回到顶部