Skip to content

[BUG] <title> 分享微信小程序页面到朋友圈,不支持自定义title和imageUrl #2425

@changshuan

Description

@changshuan

⌨️

  • Would you like to work on a fix?

Where is the bug from?

Rax Core

Minimal code and steps to reproduce the bug

export default function ComicHome() {
const shareWechatMoments = () => {
return {
title: 'Play Intime~',
imageUrl: 'https://img2.baidu.com/it/u=3724468603,2892834211&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
};
}

addNativeEventListener('onShareTimeline', shareWechatMoments);
useEffect(() => {
return () => {
removeNativeEventListener('onShareTimeline', shareWechatMoments);
}
});
}
registerNativeEventListeners(ComicHome, ['onShareTimeline']);

Current and expected behavior

onShareTimeline的回调函数返回一个对象,自定义title和imageUrl不生效

Environment

"rax": "^1.2.0",
"rax-app": "3.8.14"

build.json

No response

Possible solution

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions