Skip to content

Add params for mini-program to make the surface plot better. #64

@su-chang

Description

@su-chang

The MiniProgramPayload missed one important key named thumbkey.

The old MiniProgramPayload:

export interface MiniProgramPayload {
    appid?          : string,    // optional, appid, get from wechat (mp.weixin.qq.com)
    description?    : string,    // optional, mini program title
    pagepath?       : string,    // optional, mini program page path
    thumbnailurl?   : string,    // optional, default picture, convert to thumbnail
    title?          : string,    // optional, mini program title
    username?       : string,    // original ID, get from wechat (mp.weixin.qq.com)
}

When we use this object to send MiniProgram, and then the surface plot is not good, so we need more attribute to improve it.

thumbkey? : string,    // original, thumbnailurl and thumbkey will make the headphoto of mini-program better

The thumbkey will be needed, and use it with thumbnailurl will make MiniProgram looks better.

The demo data (authorized by the owner):

const miniProgramPayload = new MiniProgram ({
  appid: 'gh_4c1db055326c',
  title: '泰国免税店免费预约',
  pagepath: 'pages/index/index.html',
  description: '提供曼谷王权免税店、芭提雅免税店、普吉岛王权免税店和普吉岛GMS免税店的免费接送、免费送机、免费餐券和免费自助餐',
  thumbnailurl: '305d0201000456305402010002045a87e2ec02033d0af802045630feb602045dc8d38c042f6175706170706d73675f373233393165353935383839643166655f313537333434323434343130375f3232303331360204010400030201000400',
  thumbkey: 'd73ae9173a9c3a994877ee463c0dea3c',
});

If only use thumbnailurl like http://xxxx.image.jpg, it looks not so good for mini-program.

This method only supported by wechaty-puppet-macpro, and we can get the data of MiniProgram from message when we received a MiniProgram message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions