收藏
回答

wx.scanCodeCode扫不出小程序码?

微信扫一扫可以扫描小程序码进入小程序,

真机上小程序扫一扫识别不出结果,开发工具可以

回答关注问题邀请回答
收藏

1 个回答

  • 唏嘘
    唏嘘
    2020-01-14

    wx.scanCodeCode扫的出小程序码,只是你要转义下 下面是我之前写的部分代码

     wx.scanCode({
                        success(res) {
                            console.log("res  扫描二维码");
                            console.log(res);
                            console.log(res.path);
    
    
                            wx.getLaunchOptionsSync((res) => {
                                console.log('getLaunchOptionsSync')
                                console.log(res)
                            })
                            if (res.path) {
                                let scene = res.path.split('?')[1].split('=');
                                const intype = scene[0];
                                console.log(scene)
                                scene = scene[1];
                                console.log(scene)
    
    

    ↓↓👍点赞是回答的动力哦

    2020-01-14
    有用 1
    回复 7
    • 2020-01-14
      2020-01-14
      回复
    • 2020-01-14
      我是安卓,一加6p,就是不行。success回调都进不去
      2020-01-14
      回复
    • 唏嘘
      唏嘘
      2020-01-14回复
      不可能呀 我之前也是这样写的  解析下就好了   和手机没有关系的
      2020-01-14
      回复
    • 2020-01-14
      不知道啊,模拟器没问题的
      2020-01-14
      回复
    • 唏嘘
      唏嘘
      2020-01-14回复
      你确定是小程序码 吗  这提示是没有码  你要对着小程序码扫描
      2020-01-14
      回复
    查看更多(2)
登录 后发表内容
问题标签