游戏中截图分享二维码踩坑记录

1、策划配置相应的埋点配置

2、游戏客户端插入埋点配置

// 分享数据插入 var funcCfg = {}; funcCfg["djlq_prop"] = {orderType:[3], wxscene:0, needPriority : 1}; WebMissionControlLogic.addNoControlFuncCfg(funcCfg);
3、取到的数据如下
{
    "type": "share",
    "data": {
        "status": 0,
        "type": "share",
        "func": "djlq_prop",
        "appid": "",
        "func_type": 3,
        "material": "image",
        "materialid": 29,
        "wxid": "",
        "is_system_share": 0,
        "domain": "",
        "title": "",
        "url": "http://www.weilefly.com/weile/share/general_v3/index.html?code=QRDLFL&ctype=QRDLFL&identity=5rTUEL&rtag=15cfd6a91f0cece3&share_time=1674031900",
        "image": "https://rxfile.weileryiyt.com/share/image_contents/29.jpg?ts=1674049552",
        "desc": "",
        "strategy_id": 753,
        "landingid": 234,
        "strategy_type": 3,
        "content_type": 1,
        "qr_info": {
            "x": 403,
            "y": 306,
            "width": 73,
            "height": 73,
            "bg_image": "https://rxfile.weileryiyt.com/share/image_contents/29.jpg?ts=1674049552"
        },
        "method": 2,
        "needreport": 1,
        "syncreport": 1,
        "productid": 33,
        "forceType": "share"
    }
}

需要重新封装的是

"qr_info": {
            "x": 403,
            "y": 306,
            "width": 73,
            "height": 73,
            "bg_image": "https://rxfile.weileryiyt.com/share/image_contents/29.jpg?ts=1674049552"
        },
"url": "http://www.weilefly.com/weile/share/general_v3/index.html?code=QRDLFL&ctype=QRDLFL&identity=5rTUEL&rtag=15cfd6a91f0cece3&share_time=1674031900", 此地址为二维码扫码地址
分享截图的类
NativeQRCodeShareLayer

 

 

 

 

具体流程参考如下:

 

 



posted @ 2023-01-18 17:30  一个新星的诞生  阅读(32)  评论(0)    收藏  举报