s***@163.com
s***@163.com
  • 发布:2023-04-11 11:59
  • 更新:2023-04-12 14:46
  • 阅读:116

【报Bug】this.getClientInfo()云函数的返回值发生了改变是吗?

分类:uniCloud

产品分类: uniCloud/App

示例代码:
const clientInfo = this.getClientInfo()  

        let {  
            appid,  
            appVersion,  
            wgtVersion,  
        } = event;  

        const platform_Android = 'Android';  
        const platform_iOS = 'iOS';  
        const package_app = 'native_app';  
        const package_wgt = 'wgt';  
        const app_version_db_name = 'opendb-app-versions'  

        let platform = platform_Android;  
               //获取的clientInfo.OS数据是空  
        platform = clientInfo.OS === 'android' ?  
            platform_Android :  
            clientInfo.OS === 'ios' ?  
            platform_iOS :  
            platform_Android;

操作步骤:

升级中心云函数

预期结果:

升级中心云函数

实际结果:

升级中心云函数

bug描述:

在云函数中使用this.getClientInfo()方法返回的数据好像和以前不一样了。以前通过 this.getClientInfo().OS是可以获取到手机平台信息的,现在获取不到了。

2023-04-11 11:59 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

getClientInfo() OS是由客户端传上来的clientInfo内的os,确认下客户端传的参数里面的clientInfo里面有没有os。如果没有确认下客户端调用uni.getSystemInfo能不能取到os

要回复问题请先登录注册