Commit 4a441ffd by lijiabin

【需求 22261】 feat: 修改分享链接相关

parent b004ced8
......@@ -8,6 +8,9 @@ const DEFAULT_SHARE_DESC = '点击查看详情'
const DEFAULT_SHARE_IMAGE =
'https://res.mail.qq.com/node/ww/wwmng/style/images/index_share_logo$13c64306.png'
const getCurrentShareUrl = () =>
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww42a2d34b42b8d721&redirect_uri=${location.href}&response_type=code&scope=snsapi_base&state=system#wechat_redirect`
interface IShareWxOption {
title: string
link?: string
......@@ -28,7 +31,7 @@ export async function wxShare(option: IShareWxOption): Promise<IShareWxResult> {
{
title: option.title || DEFAULT_SHARE_TITLE,
desc: option.desc || DEFAULT_SHARE_DESC,
link: option.link || location.href,
link: option.link || getCurrentShareUrl(),
imgUrl: option.imgUrl || DEFAULT_SHARE_IMAGE,
},
function (res: IShareWxResult) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment