Skip to content

小程序码接口:getwxacodeunlimit,与官网比缺少两个参数 #2386

Closed

Description

@aaronyin

简要描述

小程序码接口:getwxacodeunlimit,与官网比缺少两个参数

模块版本情况

  • WxJava 模块名: 4.2.0
  • WxJava 版本号: miniapp

详细描述

getwxacodeunlimit接口缺少check_path,env_version两个参数,无法自定义生成体验版小程序码

`

/**

  • 接口B: 获取小程序码(永久有效、数量暂无限制).
  • 通过该接口生成的小程序码,永久有效,数量暂无限制。
  • 用户扫描该码进入小程序后,将统一打开首页,开发者需在对应页面根据获取的码中 scene 字段的值,再做处理逻辑。
  • 使用如下代码可以获取到二维码中的 scene 字段的值。
  • 调试阶段可以使用开发工具的条件编译自定义参数 scene=xxxx 进行模拟,开发工具模拟时的 scene 的参数值需要进行 urlencode
  • @PARAM scene 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~,
  •              其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
    
  • @PARAM page 必须是已经发布的小程序页面,例如 "pages/index/index" ,如果不填写这个字段,默认跳主页面
  • @PARAM width 默认430 二维码的宽度
  • @PARAM autoColor 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
  • @PARAM lineColor autoColor 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"}
  • @PARAM isHyaline 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码
  • @return 文件内容字节数组
  • @throws WxErrorException 异常
    */
    byte[] createWxaCodeUnlimitBytes(String scene, String page, int width, boolean autoColor,
    WxMaCodeLineColor lineColor, boolean isHyaline) throws WxErrorException;

`

日志

Activity

  1. added a commit that references this issue on Dec 5, 2021
  2. zhaowei2530 commented on Dec 13, 2021

    @zhaowei2530

    me too!

  3. binarywang commented on Dec 13, 2021

    @binarywang
    Owner

    其实都可以自己动手PR了

  4. binarywang commented on Dec 13, 2021

    @binarywang
    Owner

    env_version 参数在最新版本已添加

  5. zhaowei2530 commented on Dec 14, 2021

    @zhaowei2530

    最新版发布了吗?tag 是多少?

  6. zhaowei2530 commented on Dec 14, 2021

    @zhaowei2530

    4.2.2.B 找到了,好像还缺少个 check_path 参数

  7. binarywang commented on Dec 14, 2021

    @binarywang
    Owner

    4.2.2.B 找到了,好像还缺少个 check_path 参数

    欢迎PR另一个参数

  8. azouever commented on Jan 25, 2022

    @azouever

    4.2.2.B 找到了,好像还缺少个 check_path 参数

    欢迎PR另一个参数

    develop上面已经有代码了
    here:#2474
    close吧

  9. hostSugar commented on Feb 28, 2022

    @hostSugar

    https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.get.html

    createWxaCodeBytes
    缺少 env_version 参数,也需要加一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions