sdjl
V2EX  ›  问与答

使用微信的 Donut 把小程序打包成 APP 后,是否可以正常获取用户的 openid?

  •  
  •   sdjl · Aug 25, 2023 · 1338 views
    This topic created in 1000 days ago, the information mentioned may be changed or developed.

    我的小程序是基于微信云开发的,用户身份就是使用微信的 openid 识别,如果我使用微信官方的 Donut 把小程序打包成 APP ,在 APP 中是否可以正常使用 openid 呢?

    例如,用户的数据是 { name, age, _openid } 这个格式,查询数据库时用到了 db.where({ _openid: '{openid}' }).get(),那么我打包成 APP 后,这段 js 代码是否可以用当前用户的 openid 去查询数据库呢?

    有没有用过 Donut 的朋友介绍一下?

    horizon
        1
    horizon  
       Aug 25, 2023
    openid 是微信的身份信息
    Donut 应该没有吧
    horizon
        2
    horizon  
       Aug 25, 2023
    用微信登陆可能可以
    sdjl
        3
    sdjl  
    OP
       Aug 25, 2023
    Donut 说兼容微信登录,支持微信云开发,但是没说是否支持_openid 自动识别。

    用云开发,数据库里面是没有 User 这个表的,所以并不需要一个用户注册的机制。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5206 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 08:29 · PVG 16:29 · LAX 01:29 · JFK 04:29
    ♥ Do have faith in what you're doing.